• 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

url tag

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
does the below tag mean, that I am trying to use session through url rewriting

<s:url id="url" action="download"/><s:a href="%{url}">Download image file.</s:a>
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While it is true that Struts tags involving a URL do perform URL rewriting, the main purpose of the code you've shown us is to create and use a URL for a specific action. If you're using the default suffix of ".action", the URL would translate to something like:

"http://myserver.com/myApp/action.action"

It's considered a better practice to use this method rather than specifying the ".action" because even though the default suffix is .action, you could set it to something else. The code you have shown us will work regardless of what the suffix is.
 
reply
    Bookmark Topic Watch Topic
  • New Topic