Re: problem with Sitemesh and jsp files in www subdirectory
Joe Walnes <[email protected]> Sun, 26 Jun 2005 11:01:28 +0100
| Newsgroups | gmane.comp.web.sitemesh.general |
|---|---|
| Message-ID | <[email protected]> |
A couple of ideas:
1) Use absolute links instead of relative links by using
HttpServletRequest.getContextPath().
For example: <img src="<%= request.getContextPath() %>/images/blah.gif">
2) Use the HTML <base> tag to tell the browser where all your links
are relative from. You can do this in the decorator:
<head>
...
<base href="<%= request.getContextPath() %>"/>
</head>
-Joe
On 6/25/05, legolas <[email protected]> wrote:
> Hi
> I have a very strange problem with my web application
> I used SiteMesh successfully with my web application
> Now the problem is that :
> some of my web pages (.jsp) files are in subdirectory of my root www
> you think that in :
> jsp/pages/products/aaaa.jsp
> when i click on link wich should open aaaa.jsp
> it opens the page but all other part of my page scrambe
> it seems that application context changes
> images are lost , links does not works correctly ..
>
> e.g : an image with links like this does not open
> images/search.gif
>
> when i check the image src in html page it was :
> its images/search.gif
>
>
> What should i do pleas?
>
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=3652&messageID=9227#9227
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]