• 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

[solved] problem writing href

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got a weird problem: i use <a href="jsp/main.jsp"> from jsp\main.jsp which goes http://localhost:8080/appname/jsp/main.jsp (which is right), but then i lose sight of css files (which are in \css), and if i push the link again it goes http://localhost:8080/appname/jsp/jsp/main.jsp , how do i write the href properly?

P.S. this is part of a struts 2 app with this mapping:


EDIT1: seems that one solution was: <a href="mainAction.action">
Are there any other solutions?
 
Tudor Raneti
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. There is a second problem with relative paths, that if i prepend with / or ../ the appName gets cut from the URL. But i learnt my lesson, i will use struts 2s tags for it, especially since it seems to do some url rewriting as well.
reply
    Bookmark Topic Watch Topic
  • New Topic