I've been trying to do something similar, with no luck. I know you can do
this with ASP, as shown at:
http://www.microsoft.com/downloads/search.asp?
(view the source)
but I've found no way of doing anything like this with JSP, which is a
pretty serious shortcoming. It's a pity Javascript doesn't tie into Java/JSP
the way VBScript ties into COM objects (at least, I assume what's
happening).
david
----- Original Message -----
From: "Richard Yee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 20, 2001 2:08 PM
Subject: Re: how to access servlet from the jsp page
> Alexey,
> Are you outputting anything in your JSP file? If not, you could forward
> the request to the servlet using the servlet context
> getRequestDispatcher.forward() method. Otherwise, you should redesign
your
> servlet / JSP page to do the calclulation in a JavaBean or some other
> helper class. You can't just call a servlet from the middle of a JSP page
> if you have sent some output to the browser because the servlet response
is
> going to be a complete HTML page, not just the result of the calculation.
>
> -Richard
>
> At 01:45 PM 9/20/01 +0200, you wrote:
> >Hey guys,
> >
> >how do I access the servlet from the jsp page? What's the syntax? My
servlet
> >performs the calculation and I need to show the results on the JSP page.
> >Thank much
> >
> >A.
> >
>
>===========================================================================
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets