You cannot call methods of JSP or Serlvets from outside.
A calling servlet or jsp is one that forwards itself to
another jsp or serlvet and does not return.
A Servlet or JSP loads once and thereafter is loaded, until changed again.
Once loaded, a calling jsp or serlvet will not cause it to reload. It is
like a mini server -- running or waiting always.
To pass String values in a forwarding process do this:
request.setAttribute("SomeNum", "1234567");
then:
<jsp:forward page="MyRelativeURL.jsp"/>
And in the called JSP:
<%
int Num = Integer.parseInt(request.getAttribute("SomeNum"));
%>
>From: "Choi Jong Myung(SS)" <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Calling Servlet methods from JSP - <basic>
>Date: Wed, 31 May 2000 09:49:16 +0900
>
>Marc Krisjanous wrote:
>
> > Hi all,
> > Could someone please answer my question.
> >
> > Question: How can a JSP that is "Loading" call a servlet method? Servlet
>A
> > calls a JSP and while the JSP is "Loading" it needs to use some of the
> > methods in Servlet A.
> >
> > Cheers
> >
> > Marc
> >
> >
>===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
> > 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
>
>Hello.
>I don't understand the question exactly, but how about using static methods
>of servlet.
>
>You can use static methods with class name.
>
>
>Choi Jong Myung
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>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
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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