This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Forward with duplicate url" Watch "Forward with duplicate url" New topic

Forward with duplicate url

az ziz
Ranch Hand

Joined: Dec 17, 2008
Posts: 50
in the html i have a link "<contextpath>/transaction/". 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?

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 file of the struts, using the srcKey attribute. in the file the values uses the ../../ for locating the resources. can i include the context path in the properties file? how do i do?
jQuery in Action, 2nd edition
subject: Forward with duplicate url
Similar Threads
Deploying struts1.29 appl to struts 1.3.10
Struts modules and html:form
Problem while creating Struts application
Servlet action is not available
forwarding to a servlet instead of a jsp