It's not a secret anymore!*
The moose likes Struts and the fly likes Forward with duplicate url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Forward with duplicate url" Watch "Forward with duplicate url" New topic
Author

Forward with duplicate url

az ziz
Ranch Hand

Joined: Dec 17, 2008
Posts: 50
in the html i have a link "<contextpath>/transaction/product.do". this link will take to an action motorproduct. but for web search and other reasons the client has asked to change this url to "<contextpath>/car-product".
in web.xml


where CustomActionServlet is sub classesed from ActionServlet for session maintenance and other our own specific reasons. it will call the super class operation after doing small preliminary things with the request.
I duplicated this with

now with the above i can access the action even without ".do".

i duplicated the action mapping in the struts-config.xml like

this worked.

the problem i am now facing is with the resources. the images are not loaded properly. the url links inside that page loaded are not loading properly. any other solution to get around this?

V
az ziz
Ranch Hand

Joined: Dec 17, 2008
Posts: 50
more info on the above,

the images inside the pages are struts html:image tag with the image url loaded using the message.property file of the struts, using the srcKey attribute. in the message.properties file the values uses the ../../ for locating the resources. can i include the context path in the properties file? how do i do?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Forward with duplicate url