Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP/SERVLET CSS STYLE

843841Jun 3 2005 — edited Jun 6 2005
I am trying to use the good old MVC pattern where I have my JSP call on a servlet to direct me to my Java class where I do my business logic then I have this servlet redirect me back to my JSP page. The problem is this: When I have my servlet do the

RequestDispatcher dispatacher =
getServletContext().getRequestDispatcher("/index.jsp");
dispatacher.forward(request,response);

I lose all my CSS formating in my index.jsp page. This is a problem. Does anybody know how to work around this.

It is weird the URL: ends up looking like this:
http://localhost:8080/quickAdvising/servlet/AddServlet?code=t

instead of http://localhost:8080/quickAdvising/index. jsp
Which I thought it would.

Help!

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2005
Added on Jun 3 2005
6 comments
593 views