• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Where does /struts/ in the url come from? and where does it resolve to?

Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wonder if anyone can help. I am in the process of creating a new struts2 theme, along with a load of new/updated tags. What I've done is copy the existing template folder and its contents, and have renamed the sub folders to represent my new theme names. So, my starting point is that I have a set of ftl's that are exactly the same as the original ones, and I'm changing the ones I need to.
I now need to change the head template in template/<my new theme>/head.ftl and it has this line within it:

I understand what its doing, and that the resultant uri to the css is /<my web app>/struts/<my new theme>/styles.css - and I understand that it relates to the physical file template/<my new theme>/styles.css - but what I dont get is the /struts/ part of the url and how it maps to the template folder.

I guess its not the end of the world, but I dont really want /struts/ in my url (ideally I'd like it to be the name of my extension); but I would really like to understand how and where this is defined and mapped.

Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's part of the S2 "serve static" process, see the struts.properties file for comments regarding its use. I don't know if it's trivially changeable or not.

In the templates you can change it to whatever you want--it's just a URL. You can also change the "templates" directory--you could even try making the value absolute to see if that works. I haven't looked in to modifying any of that, since it doesn't seem like an important issue to me.
Evil is afoot. But this tiny ad is just an ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic