Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts2 and tuckey rewrite filter

 
Darvesh Niz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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






 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic