• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forward with duplicate url

 
az ziz
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic