• 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

HttpServletRequest got lost

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am little confused on the httpServletRequest. I have one question

I created a simple application by using the struts. I created a one jsp file that contains some request attributes , in the same jsp page i have a hyperlink that maps to the ActionForward (which is defined in struts-config.xml), so when i click on the hyperlink , all the data which is presents in the request object get lost .

So my question when we click on the hyperlink in the jsp, will the old HttpServletrequest get lost and ActionServlet will make a new HttpServletrequest.

Will clicking on the hyperlink is same as submitting the form to actionServlet.

Thanks in advance for your prompt answer
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correct, the HttpServletRequest object just exists for one round trip to the web server. Once the page is rendered in the browser, the request is gone. A new request will be created when you submit a form or click a link,

Unless you add JavaScript to your hyperlink then no, it will not submit the form.

- Brent
 
reply
    Bookmark Topic Watch Topic
  • New Topic