• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to access the <param> in jsp which are set from struts.xml  RSS feed

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one tell me how to access the <param> in jsp which are set from struts.xml.



I want to access the parameter resultType in jsp.

I tried ${param.resultType } in jsp but not getting parameter.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The parameters you set on results are just that: parameters for the result implementation class--in your case, a "dispatcher" result. They are not available to your action or view side of the result.

What, specifically, are you trying to accomplish?
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh ok. becuase somewhere i read that its available in custom interceptor as a request parameter.

anyways i was trying to accomplish the same thing which i descripbed in my previous thread. but then i did it easily using topics.

http://www.coderanch.com/t/444505/Struts/Struts-d-submit-Selecting-Targets

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You wrote: oh ok. becuase somewhere i read that its available in custom interceptor as a request parameter.

Oh, maybe it is and I just never knew that. Well, maybe I did--but I think it'd be set on the action, so you'd need an action property. Maybe I'll try that out and see what happens. Learn something new every day!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!