Thanks a lot for this great tip. Can I ask one more question? 

What about those links in the static HTML? How does it access to context
path? 

Thanks again,

run


Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Run,
> 
> On 12/8/2009 4:39 PM, pprun wrote:
>> I will remove docBase and path attributes. 
> 
> Did Eclipse put them in there?
> 
>> I do use some hard-coded "Repromed" in the css and javascript reference,
>> for
>> example: 
>> inside /Repromed/login.jsp i used <link href="/Repromed/css/repromed.css"
>> rel="stylesheet" />
>> 
>> I tried to replace it with relative URI for example <link
>> href="./css/repromed.css" rel="stylesheet" />
>> 
>> But it becomes a problem when the login page is shown in case of session
>> timeout.
> 
> [snip]
> 
>> Is there a way to get around it?
> 
> Try:
> 
> <link rel="stylesheet"
>      href="<%= request.getContextPath() %>/css/repromed.css">
> 
> Now, do this with all your links. Better yet:
> 
> <link rel="stylesheet"
>      href="<%= request.getContextPath() %><%=
> request.encodeURL("/css/repromed.css") %>">
> 
> This will make your webapp work when you are using sessions but your
> clients don't support cookies.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkseyhcACgkQ9CaO5/Lv0PCJewCfc6K0m/RXKdoOMwjos9F35l09
> A9YAniNWBneqr4VeULkfXTIazw9PSRHE
> =ELAt
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Question-on-META-INF-context.xml-tp26700904p26712589.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to