• 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

i want no reponse from servlet

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
in my application there is a link(href) and when it is clicked a servlet is invoked.now,i don't want any response from that servlet,it should just do some session tracking tasks.so, i didn't do anything with HttpServletResponse in doGet().
so, when i click 'href' it is giving the message - document contained no data.but servlet is doing the session tracking written in it.
any response is welcome. thank you
sri

 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Browsers expect to send a request and get a response, so its going to be tricky to get around that. Why don't you use an HTML FrameSet, with one Frame being hidden - your URL can specify the invisible Frame as the target of the response so it won't matter that there is no response.
Bill
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The usual trick for this is to return the same page as the one which invoked the servlet, either by a redirect or by building the same page again. That way the browser/server interaction works as expected, but the user still sees the same page..
 
Sid Sharama
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you both.well! the problem was resolved using Response.sendRedirect() and a little bit of URLRewriting.
every doubt has an answer/answers and every answer leads to new doubt(s).
how can i make a frame invisible/hidden.is it by leaving the src attribute blank ?
correct me if i am wrong.
regards,
sri
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can make a Frame invisible by setting the size of the visible frame using 100%. It is a handy way to conceal an applet among other things.
Bill
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi sri (BMW)
can you drop the source code, how u solved the problem. i am awaiting for the response from you, as i am also facing the same problem. please help me.
thanks in advance
surya
------------------
reply
    Bookmark Topic Watch Topic
  • New Topic