aspose file tools
The moose likes Struts and the fly likes how to access the <param> in jsp which are set from struts.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to access the <param> in jsp which are set from struts.xml" Watch "how to access the <param> in jsp which are set from struts.xml" New topic
Author

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

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 760
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.


Jigar Naik


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Dec 12, 2006
Posts: 760
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

Joined: Sep 29, 2008
Posts: 12617

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!
 
Don't get me started about those stupid light bulbs.
 
subject: how to access the <param> in jsp which are set from struts.xml