• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hardcoded JSP Path

 
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We need to hardcode the jsp paths into the struts-config.xml. But what about, say, we want to create a subdirectory and move some jsps into it. In this case, we need to modify all the affected jsp path one by one. Is there a simpler and more reliable way to change the jsp path?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. Use your text editor's find-and-replace function.
 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you mean this is all Struts has to offer? That is, allowing us to move the path into a few struts-config-xxx.xml files instead of hard coding them in the servlets so that they are find/replace friendly? Is it possible in Struts to take a further step by encapsulating the jsp's paths into some sort of constants so that we don't have to bother about the directory structure at the very beginning.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts uses hard-coded jsp paths in the struts-config.xml file. That's the way it works.

If that's not to your liking, I'd suggest you write an extension to Struts that does it the way you think it should, and then submit your extension as a suggested inclusion into the next version of Sruts.

Struts is open-source software that is created by volunteer developers. If there's something you don't like, all you can do is make suggestions and offer your help to make it better.
reply
    Bookmark Topic Watch Topic
  • New Topic