One way to solve your problem might be to use a redirect to the JSP instead
of a forward.

-Richard

At 06:29 AM 12/25/2001 +0530, you wrote:
>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 -----
>>From: <mailto:[EMAIL PROTECTED]>Danny Rubis
>>To: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
>>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

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to