File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes jsp -> Servlet -> jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp -> Servlet -> jsp" Watch "jsp -> Servlet -> jsp" New topic

jsp -> Servlet -> jsp

Scott Minor

Joined: Nov 05, 2001
Posts: 5
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.
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
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:/// Same for style sheets.

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Scott Minor

Joined: Nov 05, 2001
Posts: 5
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.
I agree. Here's the link:
subject: jsp -> Servlet -> jsp
It's not a secret anymore!