aspose file tools*
The moose likes Struts and the fly likes URL Rewriting in Struts Application 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 "URL Rewriting in Struts Application" Watch "URL Rewriting in Struts Application" New topic
Author

URL Rewriting in Struts Application

Siva Reddya
Greenhorn

Joined: Nov 28, 2012
Posts: 12
How to Change url of my application ,i have url like http://localhost:8001/Kinara/login.do?method=loginPage ....i have to change this url to any short form ......

How to do this any body help me.........

Thanks In Advance,
SivaReddy
manjunatha hv
Greenhorn

Joined: Jan 01, 2013
Posts: 2

You can use the following tags that are available on web.xml



Siva Reddya
Greenhorn

Joined: Nov 28, 2012
Posts: 12
Siva Reddya wrote:How to Change url of my application ,i have url like http://localhost:8001/Kinara/login.do?method=loginPage ....i have to change this url to any short form ......like anyname/login/.....

How to do this any body help me.........

Thanks In Advance,
SivaReddy
Siva Reddya
Greenhorn

Joined: Nov 28, 2012
Posts: 12
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>

is used to execute any default pages like jsp , html .....in my case i have to change every url for that we can use urlrewritefilter concept ,but i don't know how to use <rule> in urlrewrite.xml for struts application if any body knows please tell me.

i am using this below rule in urlrewrite.xml, but it is not rewrite the url........

<urlrewrite>
<rule>

<from>/login.do?method=([a-zA-Z]+)$</from>
<to type="redirect">/Bricks2Home/$1</to>
</rule>
</urlrewrite>

Thanks In Advance,
SivaReddy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URL Rewriting in Struts Application