• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Forward with duplicate url

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
We don't have time for this. We've gotta save the moon! Or check this out:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic