aspose file tools*
The moose likes Servlets and the fly likes sending response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "sending response" Watch "sending response" New topic
Author

sending response

Sree kanth
Ranch Hand

Joined: Feb 02, 2005
Posts: 53
hi all

How do i send an httpservletresponse to a client or to all the clients of my servlet without a resonse from the client. I am using J2EE servler.

please help me

Sree


Sree
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 641
Originally posted by Sree kanth:
hi all

How do i send an httpservletresponse to a client or to all the clients of my servlet without a resonse from the client. I am using J2EE servler.

please help me

Sree


Do u mean without a request to your serlvet?

-Praful


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Sree kanth
Ranch Hand

Joined: Feb 02, 2005
Posts: 53
oh yes.
The client has already logged in. now what i want is without the client refreshing the browser,response is to be sent to him
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You can't.

HTTP is a stateless protocol. The server doesn't know the clients exist until they make a request. Then, after the response is sent, it forgets they exist.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Sripathi Krishnamurthy
Ranch Hand

Joined: Mar 07, 2005
Posts: 232
the Meta tag can be used.

<META HTTP-EQUIV="REFRESH" CONTENT="60;URL=anypage.jsp">

This is equivalent on clicking "Reload" button and will create a new Get request.

This tag will reload the page every 60 seconds. replace 60 with any number of your choice(in seconds).
[ March 14, 2005: Message edited by: Sripathi K S ]
Sree kanth
Ranch Hand

Joined: Feb 02, 2005
Posts: 53
Thank you very much
Raja gopal Y
Greenhorn

Joined: Mar 08, 2005
Posts: 15
Hi Srikanth,

Is the META tag Working for you, for me it's not.

Regds
Rajagopal


CHEERS !!!<br /> <br />RAJAGOPAL Y
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sending response