• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jsp -> Servlet -> jsp

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following problem that I have been working on for several days and I can't find an answer to it anywhere.
I have a JSP page that gets loaded when the user enters the site. Depending on what the user selects it is sent them to a servlet and the servlet processes the request and then forwards to a new JSP. The problem that I have is that when the JSP that is forwarded to I don't get my images or my style sheets.
I am using an include for the header, menu and footer. I get all of the items but not formatted correctly because I am not getting back to the root of the wed server after I call the servlet.
Thanks for the help.
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The root of the Web server may be different from the WEB APPLICATION context or "root".
Usually the style sheets and images etc should be accessible from the application context. Or you can try using fully qualified URLs like http:///www.myserver.com/images/hello.gif. Same for style sheets.
 
Scott Minor
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tony,
I have everything in the right directories because I have a default.jsp file that is in the root. It includes all of my other JSP's and images that are needed. This page is displayed correctly when rendered. The page that the servlet forwards to is also in the root. It is actually a copy of index.jsp renamed. I just want to see it work.
I am using IBM WebSphere v3.5.3.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic