wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: URL Rewriting in Struts Application
 
Similar Threads
Explicit appending of values to url must show the error page?
internalization
Changing URL from IP to Domain Name
URL Encoding
How store more text data into mysql db in the form of paragraphs, headlines and how to get that data