Meaningless Drivel is fun!*
The moose likes Struts and the fly likes URL rewriting in Struts1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "URL rewriting in Struts1" Watch "URL rewriting in Struts1" New topic
Author

URL rewriting in Struts1

June Rajkhowa
Greenhorn

Joined: Mar 11, 2011
Posts: 10
Hi folks,

I am developing a web application using Struts1 as web framework. My url pattern in web.xml is:

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

I want to get rid of .do pattern in urls. So if my url is

http://localhost:38330/MyProject/editFunction.do?function=1

i want it to be like http://localhost:38330/MyProject/editFunction/ . How do I acheive this type of url rewriting ?
Thanks for any help
sri ramvaithiyanathan
Ranch Hand

Joined: Nov 20, 2010
Posts: 109
I think you have to use post method.

Regards,
Sriram.V


For java examples,ebooks,interview questions,visit this blog
http://periodicupdates.blogspot.com/
June Rajkhowa
Greenhorn

Joined: Mar 11, 2011
Posts: 10
Have anybody used the Tuckey UrlRewriteFilter ? Please help. This is urgent.
 
 
subject: URL rewriting in Struts1
 
Similar Threads
URL-Pattern mappings must contain /servlet/?
Problem with Faces Servlet
security web application
Not Found Error
Apply schema to the response