Saad,
I think you can accomplish the behaviour you describe by redirecting the
browser to the same page that invoked the servlet.
Try the following code in your servlet:
String nextPage="/Login.jsp"; //Set this var to the name of your html
page.
// Get this servlet's context
ServletContext sc = this.getServletContext();
// Wrap the JSP Page name in a RequestDispatcher
if (nextPage != null && nextPage.length()>0) {
RequestDispatcher rd = sc.getRequestDispatcher(nextPage);
if (rd != null) {
// Pass control to the JSP page
try
{
rd.forward(request, response);
}
catch (Exception e)
{
String msg = "Problem invoking JSP Page " + nextPage;
sc.log(msg, e);
}
}
}
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Saad
> Shareef
> Sent: Saturday, June 30, 2001 1:18 AM
> To: [EMAIL PROTECTED]
> Subject: calling a servlet while the same html displayed
>
>
> Hello,
>
> usually when a servlet is called it will return an output. But, in my
> situation I want my servlet to be called without returning any output.
>
> In other words, if the broswer has an html file displayed on it,
> is there a
> way to call a servlet without affecting this html page.
>
>
> Regards,
> Saad
>
> __________________________________________________________________
> _________
> 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
___________________________________________________________________________
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