aspose file tools*
The moose likes Struts and the fly likes populating forms in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "populating forms in jsp" Watch "populating forms in jsp" New topic
Author

populating forms in jsp

Stu Johns
Ranch Hand

Joined: Aug 11, 2008
Posts: 63
Hi I have a struts action which sets a value on an DynaActionForm



When I try and use these on the jsp with the struts taglibrary with this form i can use the value i set, (great).


However when I try and use with EL it does not work (not great!):


Does anyone know why? i thought form data was just parameters on the request, is it because parameters are supposed to be read only in which case modifying them is bad?.

thanks.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Are you loading the page with a URL parameter?
Stu Johns
Ranch Hand

Joined: Aug 11, 2008
Posts: 63
just using the struts config to do it


and in the servlet
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

JSTL's ${param.xxx} notation is looking for a request parameter. If there's no request parameters then there's nothing for JSTL to find. ActionForm properties are not the same as request parameters: request parameters go from the client to the server, not the other way around.
Stu Johns
Ranch Hand

Joined: Aug 11, 2008
Posts: 63
ok thanks,
I shall just add a request parameter with the value i want and use that on the jsp instead.
Stu,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: populating forms in jsp