Announcement Announcement Module
No announcement yet.
Absolute URI's in jsp+templates? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Absolute URI's in jsp+templates?


    I am pretty new to spring and jsp. So I have a question related to absolute uris.

    In my application's views I have views which resolve to webapp/admin/index.htm, and webapp/index.htm and so on.
    As you can see using a link <a href="logout.htm">logout</a> would redirect in the one case to webapp/admin/logout.htm, and webapp/logout.htm. As this is not what I want, I am currently using:
    <a href="<%= application.getContextPath() %>/logout.htm">logout</a>

    Is this the way one usually does that in spring/jsp? I tried to search in this forum for "absolute uri" and other keywords, but found only <%= application.getContextPath() %>/webapp/logout.htm, which is even less compatible (when for example I change the path to the webapp).

    Jan (DracoBlue)