Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[solved] problem writing href

 
Tudor Raneti
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic