Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Servlets
Autorefreshing a servlet page
preethi Ayyappan
Ranch Hand
Posts: 518
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I want to auto refresh a
servlet
page for every 10 sec.I have checked it with a simple helloworld servlet program.But i dont find the page is getting refreshed automatically.I have used
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.getWriter().write("Helloworld"); response.setHeader("Refresh","10"); }
Is this the correct code to refresh.anyone help me please.
Thanks in advance
sudhir nim
Ranch Hand
Posts: 212
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Instead of Refresh header,
you should
use
<meta http-equiv="refresh" content="10"> inside the html head section.
This is recommended over Refresh header, as Refresh header isn't supported by Http/1.1 spec.
[Servlet tutorial]
[Servlet 3.0 Cook Book]
preethi Ayyappan
Ranch Hand
Posts: 518
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks .Its working fine.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Servlet Action not found
Refreshing a page before forwarding
Servlet -Download Jar file
Tapestry and Tomcat
Is it possible to have a dynamic content value in Meta Refresh Tag
More...