On Tue, 13 Apr 1999, ALEX L wrote:

> Hi there,
>   can anyone please help.
>   i would like to call a another servlet from within a servlet and
> passing in valueS to the other servlet into doGet(). how do i do
> that?....would you tell me in details please.

You can call another servlet from a servlet by getting the handle to the
other servlet like below:
>From BServlet's doGet(req,res) or doPost(req,res) you can call AServlet's
doGet() or doPost() or any public methods.

       AServlet login=
        (AServlet)getServletConfig().getServletContext().getServlet("AServlet");
                if(login != null)
                        login.doGet(req,res);


This method is possible if both the servlets are in the same server.

if they are in different servers then use oreilly's class HttpMessage
class to pass values. (www.oreilly.com).


>   also it seems that if my client is an html client, the only (in
> order to pass some values to the servlet) is by using FORM. is this
> true or is there another way to do it. can i use i url link to the
> servlet?

You can use URL link and pass values as parameters.

<html>
<body>
<a href=/servlet/AServlet?user=name>AServlet</a>
<body>
<html>


>   another question is that i implement a thread in my servlet, however
> it can only run() once, that is the first time the user invoke the
> servlet. if the user tried another time (even if i reload the page),
> the thread will never be executed until the system has been reboot. y
> is this??....
>   within a servlet how do i redirect user to a html page and for every
> 10 seconds the servlet will reload the page meaning that there will be
> a loop within the servlet. my point here is to allow the servlet to
> get new values from a file (the values inside the file will be changed
> frequently) and display it to the same window everytime with updated
> values.
>
> thanks a lot for you time.
>
> regards,
> alex
>
>
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> ___________________________________________________________________________
> 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
>

Hope my explanation helps!!!
Revathy

___________________________________________________________________________
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