This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes struts2 and tuckey rewrite filter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts2 and tuckey rewrite filter" Watch "struts2 and tuckey rewrite filter" New topic
Author

struts2 and tuckey rewrite filter

Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
Hello

i am having trouble running application with struts2 and turkey rewrite.

My app was fine until i included turkey rewrite the first one in filter chain.

When i try to access my jsp at localhost:8080/mycontent/test.jsp, and of course in my test.jsp i am using struts tag. i also put debug and i see that the request come to tuckey first and then comes to FilterDispatcher and still i get this error
"This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]"

Unfortunately the app was written in such a way that i can access jsp, and i think i have to live with it, is there any advice

Thanks
Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
Just a correction i am running the webapp as ROOT.
i can access the jsp as

http://localhost:8080/customer/login.jsp and the page show up fine , my requirement is to add an extra element in url with tuckey rewrite i want the user to enter urlas

http://localhost:8080/era/customer/login.jsp and this is where i added the tuckey filter condition saying
<rule>
<name>Redirector Rewrite</name>
<from>/era/(.*)$</from>
<to type="forward">/$1</to>
</rule>

all url which are http://localhost:8080/era/customer/login.jsp will be forwarded to http://localhost:8080/customer/login.jsp and thats happening and the struts error happens only for jsp which has struts tags
One other correction i want to make it the request only comes to tuckey filter and that it never comes to struts filter (FilterDispatcher)

Any idea






 
jQuery in Action, 2nd edition
 
subject: struts2 and tuckey rewrite filter