Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URL Rewriting in Struts Application

 
Siva Reddya
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the following tags that are available on web.xml



 
Siva Reddya
Greenhorn
Posts: 12
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic