• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

populating forms in jsp

 
Stu Johns
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you loading the page with a URL parameter?
 
Stu Johns
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just using the struts config to do it


and in the servlet
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok thanks,
I shall just add a request parameter with the value i want and use that on the jsp instead.
Stu,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic