Hi David,
To use something similar to VBScript/COM objects in java you would use
JSP/JavaBeans.
You then have compiled java classes (your beans) like your COM objects which
are used by JSP pages (like your ASP pages).
You can also include any java class you like in your JSP page with the
'import' tag. I can't see really why you'd want to access a servlet from a
JSP, but you can send the http request to a servlet from a JSP. I think you
need to read up a bit more about how to use JSP, servlets and beans in a web
application since you can do everything with JSP that you can with ASP and
more.
Javascript and Java are seperate technologies - ASP and COM are designed to
be used together. Oh, and of course they're (to all intents and purposes)
platform specific and proprietry, limitations java doesn't have.
Hope this clarifies things a little (even though I havn't really said
anything different to the previous answer).
cheers
Paul
> -----Original Message-----
> From: David Gee (MAYA Design) [mailto:[EMAIL PROTECTED]]
> Sent: 21 September 2001 15:18
> To: [EMAIL PROTECTED]
> Subject: Re: how to access servlet from the jsp page
>
>
> 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
>
===========================================================================
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