how to access out and request parameters from a JSP page into a bean URGENT
Amit Roy
Ranch Hand
Joined: Oct 10, 2000
Posts: 132
posted
0
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
<I>Chance Favours the Prepared minds"</I>
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12266
1
posted
0
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
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.