If your form-bean is saved to the session scope under the key 'foo' the following is 
how you can access it in a scriptlet (assuming the class name of the form-bean is 
SearchResultForm)

<%
  SearchResultForm srf = (SearchResultForm)session.getAttribute("foo");
  int currPage = srf.getPageNumber();
%>

Sri

-----Original Message-----
From: Jana Navaneethan [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 27, 2003 12:01 PM
To: Struts Users Mailing List
Subject: How to assign form bean value in my JSP!


Hi,
       I have a form bean with session scope,  I want to get a value from this form 
bean and assign it to local variable in my JSP page like <% int currPage = 
searchResultForm.getPageNumber();%>,Where searchResultForm is the name of my Action 
form bean. For some reason I am getting compilation errors when I try to do this. 
Please let me know the right way of doing this.

Any help would be greatly appreciated!

Thanks,
Jana.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to