hi,
try using HttpServletResponse.sendRedirect() instead.
shud serve your purpose.
about the compilation, you are trying to call the method getServletCOntext as
an attribute -- hence error.
replace with RequestDispatcher dispatcher =
this.getServletContext().getRequestDispatcher(url);
i think your code shud work them
Mahesh



UDAYAKP <[EMAIL PROTECTED]> wrote:
Hi,
        I'm trying to forward to different jsp pages from a servlet.
        For that I'm trying to use getRequestDispatcher() method.
        But It was not working....I mean I couldn't even compile it.
        Whats wrong in the following code.

        RequestDispatcher
dispatcher=getServletContext.getRequestDispatcher("/jsp/Error.jsp?Var=111");
        if(dispatcher==null)
                response.sendError(response.SC_NO_CONTENT);
        else
                dispatcher.forward(request,response);

        Is there any way to forward to diff. jsp pages from a servlet.
        Any Solution please..

Thanks in Advance
uday.


-----Original Message-----
From: Jens Andersen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 02, 2000 6:04 PM
To: [EMAIL PROTECTED]
Subject: Re: WML and JSP


Hi,

What about dynamic generation of WBMP files! Is there any classes
available??

Regards,

Jens Andersen

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Magnus Bjorkman
Sent: 2. februar 2000 08:31
To: [EMAIL PROTECTED]
Subject: Re: WML and JSP


Simon Jakesch wrote:

> hi,
>
> has anyone experince with generating WML sites with JSP. it sould be a
> problem making the sites and the content but the problem is... i need
> WML as an extension for the WAP site and the JSP enignie doesn't pick up
> anything else than .JSP to interpret it....
>
> any solution,
>
> bye,simon

Set the response content type to text/vnd.wap.wml. The charset is needed by
some
WAP GWY's inorder to transcode it.

response.setContentType("text/vnd.wap.wml; charset=iso-8859-1");
//iso-8859-1 is
just an example.

This would do it.

/M

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to