• 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

Adding a new Parameter to request

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i am unable to find a decent approach for this problem.
i want to add a new paramter to my request and pass it to a class.. not a servlet.
how do i do it?
Please help me sought this problem immediately..
Thanx
Chhaya
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a class cannot get the HttpRequest object directly. it has to be passed from the servlet. so if u want to send some object to the class use the request.setAttribute() and then pass it to the class
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Servlet2.2 the only way to mutate the HttpRequest is to use the setAttribute method.
However, in Servlet2.3, you can use the HttpServletRequestWrapper (I believe thats the correct class name) to wrap the request which allows you to basically mutate (lie) about the http request.
reply
    Bookmark Topic Watch Topic
  • New Topic