• 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

how to access out and request parameters from a JSP page into a bean URGENT

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello friends
I have a JSP page where i am doing request.getParameternames() i want to do the same thing in a bean how can i do it URGENT
 
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
There is nothing to prevent you from calling a bean method with the request object or any other object that the JSP knows about. You just have to write your bean code that way.
Bill
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are several answers. Bill is correct, you could write the bean to have a method which recieves the request or out objects.
The classic answer for request parameters is to provide a setXXX for every parameter on the submit and set them in your bean with a simple call to
< jas:setProperty name="beanName" property="*" />
There isn't a simple way to do that for the out Object hawever. The canned answer that you find is simply refactor your bean into a JSP Taglib. The Tag package has access to all the implicate Objects on a JSP page through the use of the PageContext object.
 
Police line, do not cross. Well, this tiny ad can go through:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic