Hi Danny Rubis,
   Thanks.
 
   I will explain u the problem completely.
   I am using JApplet(Swing) as GUI. From there i am making applet to servlet communication. I m forwarding the request from the servlet to another JSP file using "getServletConfig().getServletContext().getRequestDispatcher.forward(File name)". In the jsp i am forming the <html> page(using style sheet ie .css file) to display. Here problem is, when i am forwarding the request for the first time to JSP file, the page is not formatted according to style sheet(that is the first page is not formatted according to style sheet), from then on, i mean from the second page, the page is formatted well. 
 
  Here the actual problem is,  when the page is displayed for the first time, the URL in address bar is that "Servlet file" URL. From then on(that is from second page), the URL in the address bar is JSP file's URL.
 
   In the Servlet file i can not use out.print() to include the .css file, because i am forwarding the request. Even if i use out.print() to include the .css file,  Compilation error is thrown. Is there any other way to do this?.
 
  If the problem is not clear, plse ask me again.
 
Rgds.,
C.Raja
 
----- Original Message -----
Sent: Monday, December 24, 2001 5:50 PM
Subject: Re: Style Sheet

Hey!

Unless I am misunderstanding the question, you just add the style like you say you did in the JSP
with an HTML include tag or you hard code the style with the <style> tag.

Sans adieu,
Danny Rubis

rajac wrote:

Hi all,   I have have a standard style sheet(.css file). I am able to include this in  jsp and able to form the page. How to include this in Servlet to form the page. I tried with charset attribute in response.setContentType(). But it is not working. Thanks,Rgds.,C.Raja

Reply via email to