In the code are you actually performing a redirect or a forward?
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/58064e06-94ac-4875-aa00-ebd7cab3b9fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Typo? "/app/dotCMS/sendeEmail”
Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of gsuj...@gmail.com
Sent: Tuesday, August 22, 2017 2:31 PM
To: dotCMS User Group
Subject: [dotcms] Re: Dotcms Dynamic Plugin with Filters
I have added the same code as you have suggested but still it redirects to the 404 page .The following is the code added in the Activator Class
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/8d90e61b-9e70-4d0d-8d3b-13a323121cfc%40googlegroups.com.
Add lots of debug code and write to the log.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of gsuj...@gmail.com
Sent: Tuesday, August 22, 2017 2:49 PM
To: dotCMS User Group
Subject: [dotcms] Re: Dotcms Dynamic Plugin with Filters
It is still redirecting to the 404 page .Is anything else wrong in the implimented logic of the plugin ??
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/e3bd6ba3-6e60-46a1-842e-15ea55bfa5c8%40googlegroups.com.
Also, it looks like you tied a forward and a redirect to the same pattern?
That would conflict internally somewhere I’m thinking.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of gsuj...@gmail.com
Sent: Tuesday, August 22, 2017 2:49 PM
To: dotCMS User Group
Subject: [dotcms] Re: Dotcms Dynamic Plugin with Filters
It is still redirecting to the 404 page .Is anything else wrong in the implimented logic of the plugin ??
--
I still see /dotCMS/sendEmail as a “from” in both forwards.
Why two rules?
Also add logging to the Filter class itself.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of gsuj...@gmail.com
Sent: Tuesday, August 22, 2017 3:05 PM
To: dotCMS User Group
Subject: [dotcms] Re: Dotcms Dynamic Plugin with Filters
We rectified and tried it ,But still it redirects to the 404 page .Below mentioned is the Activator class code
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/4d6530a4-ddc4-4901-89d3-f43c5f8fa1af%40googlegroups.com.
If you look at the original filter source I posted, you'll see that line and the chain code commented out.
This is because the form servlet endpoints are "outside" the system.
You are already "inside" the system. You can't "bubble up" to an external filter.
So you need to pass directly to the dotCMS core class at this point.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/1503429755725.27798%40gettysburg.edu.
Again, apologies. That’s my class. Let me get you the source.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com] On Behalf Of Nathan Keiter
Sent: Tuesday, August 22, 2017 3:26 PM
To: dot...@googlegroups.com
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/cf74de2f6bce46c4beed3ee91ec1992f%40exch13c.ms.gettysburg.edu.
Honestly, I don’t have time to look at your code. What dotCMS version are you on?
I did post a generic example here: https://github.com/nkeiter/generic-dotCMS-plugin-code-examples/tree/master/dotcms4.0.1/osgi/org.example.nkeiter.web.form.spam.filter
Maybe that can point you in the right direction.
It’s complex because of the order of events. You can’t go back “UP” the filter chain, so you need to compensate.
Core Filter
Core Filter .-> Where I need to end up.
Core Filter
Core Filter
Core Filter
Custom Filter
Custom Filter
Custom Filter
Custom Filter -> Where custom filter is flagged!
Custom Filter
Custom Filter
Custom Filter
You have to make the jump “UP” via a code shortcut.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of gsuj...@gmail.com
Sent: Tuesday, August 22, 2017 3:45 PM
To: dotCMS User Group
Subject: [dotcms] Re: Dotcms Dynamic Plugin with Filters
On success the form should go to the intended destination not to the 404 page
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/00cb994d-0cee-468f-a20b-45f3191dde0d%40googlegroups.com.
3.7 should be fine. I was just asking because I posted a 4.x example.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of gsuj...@gmail.com
Sent: Tuesday, August 22, 2017 4:24 PM
To: dotCMS User Group
Subject: [dotcms] Re: Dotcms Dynamic Plugin with Filters
I am using dotcms 3.7.1 .Will it not work on 3.7.1 OSGI dynamic Plugins .It works only on the 4.0.1 version ??
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/7ac65092-9453-4155-a7ea-17a470c11a1e%40googlegroups.com.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com] On Behalf Of Nathan Keiter
Sent: Tuesday, August 22, 2017 4:25 PM
To: dot...@googlegroups.com
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/12e7b0acad9d4b02bec9010e069aa957%40exch13c.ms.gettysburg.edu.
No, because you are past the point in the chain where you want to be. You can’t traverse back up the filter chain.
chain.doFilter(req,res) would only be helpful if it’s not a web form and you want to pass it through to a page.
So request dispatcher is your only option for what you are attempting to do.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of gsuj...@gmail.com
Sent: Wednesday, August 23, 2017 2:13 PM
To: dotCMS User Group
Subject: [dotcms] Re: Dotcms Dynamic Plugin with Filters
I have used the request Dispatcher instead of the chain.doFilter(request,response).It worked fine for me.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/44a80374-4b21-489c-ba20-b2c762faa671%40googlegroups.com.