Hi Noel,

thanks for your mail,let me make my problem more clearer, when i click on a
link in the 1st HTML page , a new(2nd) HTML page(with frames) opens up with
a .html extension.So it means when i click on the link in the 1st HTML page
a servlet is not generated instead a new page(this page has 4 frames in it)
with .html extension opens up. And in one of the frame a servlet with
SRC="/servlet/servletname" is specified , the rest of the frames have
SRC="some.html".Now this servlet requires an Initial Parameter for
displaying some data in this particular frame only.This Initial Parameter is
required to be fetched from the 1st HTML page.

any suggestions from your side will be welcomed by me,

Kind Regards ,

Rohit



----- Original Message -----
From: "Noel E. Lecaros" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 12:32 AM
Subject: Re: how to get initparameter ?


> Hi, Rohit
>
> A servlet is not created every time you click on a link referencing one.
There
> is only one instance of the servlet class associated with every registered
> servlet name (unless your servlet implements the SingleThreadModel
interface, in
> which case the servlet container may pre-create a pool of instances).  A
servlet
> has access to its initialization parameters by calling
> GenericServlet.getInitParameter(String name) for each named parameter.
The
> initialization parameters thus obtained are set on server startup in your
web
> application's web.xml deployment descriptor, which means they don't vary
at
> runtime.
>
> I'm just guessing at what you're trying to do, but it seems you want to
perform
> a query on the second HTML page based on a selection criterion from a
parameter
> passed in the first.  In this case, if the parameter does not vary, you
can
> embed something like this in your first page:
>
>     <a href="/myapp/myservlet?param=myparam">
>
> If your parameter varies, then you probably have to set up a form to
receive the
> parameter before sending it.
>
> I realize that the above explanation might seem rather concise for someone
new
> to servlets.  I can help you best by directing you to Sun's Tutorial on
Servlets
>
> Hope this helps.
>
> Regards,
> Noel Lecaros
>

___________________________________________________________________________
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