File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts2 and tuckey rewrite filter" Watch "struts2 and tuckey rewrite filter" New topic

struts2 and tuckey rewrite filter

Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 121

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

Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 121
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
<name>Redirector Rewrite</name>
<to type="forward">/$1</to>

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

I agree. Here's the link:
subject: struts2 and tuckey rewrite filter
It's not a secret anymore!