0

I have this page:

http://example.com/folder/page.jsp

I would like to redirect/forward, in case of error/exception to the page http://example.com/page.jsp (as you can see the path is different).

doing <jsp:forward page="/page.jsp"> does work but all css and img ref now searches for http://example.com/folder/css , http://example.com/folder/img , without keeping the example.com/page.jsp layout.

How can I fix this?

Johnny Bones
  • 8,786
  • 7
  • 52
  • 117
Mauro
  • 361
  • 1
  • 4
  • 14
  • Related: http://stackoverflow.com/questions/3655316/servlets-browser-cant-access-css-images-when-doing-a-forward-to-a-jsp – BalusC May 29 '11 at 12:41

1 Answers1

1

Reference you css, javascript and images in a absolute way like this:

<link rel="stylesheet" type="text/css" href="/css/my.css" />