• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

WAS 3.5 Default Error Page

 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I've set up the Default Error Page in my webapp to be /Error.jsp
When an error occurs the error page is displayed but it has problems displaying an image in the Error.jsp page. When an error occurs in a JSP (located in the web directory under the context root) the image is displayed correctly. However, when the error occurs in a servlet (located in the servlet directory under the context root) it cannot find the image. It appears that a different 'pwd' is being used in each case.
The image has the source of "images/Exit.gif" in the Error.jsp
Does anyone have a solution for this as its really annoying?
Cheers,
Steve
 
Steve Granton
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Folks,
You disappoint me. I imagine this is a fairly common problem and someone must have come up against it before - I've searched the forum and can't find an answer in the archives.
I'd really appreciate the help.
Thanks in advance,
Steve
 
Steve Granton
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
!!!Please help as I'm getting desparate and need a solution to this!!!
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't probably have the right solution
but here's what u could try ...
(1) Between your HEAD tags of ur JSP stick this
< HEAD >
<BASE HREF="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort() %><%= request.getContextPath() %>/">
< /HEAD >
<BODY>
...
(2) If 1 doesn't help try this
<img src="<%= request.getContextPath()%>/images/logo.gif">
Let me know how this turns out. If u continue
to face problems could u paste your main jsp and
the error.jsp. I can try on my WAS 4.0.1. As
you know the architecture in 4.0 is different and therefore my approach would be slightly different.
PJ
[ April 03, 2002: Message edited by: Prashanth Joisha ]
 
Steve Granton
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,
I'll give that a go. Though I'm still baffled why it uses a different directory!
I'll let you know how I get on.
Cheers,
Steve
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!