wood burning stoves 2.0*
The moose likes JSP and the fly likes jsp standard actions or tags instead of scriplet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp standard actions or tags instead of scriplet" Watch "jsp standard actions or tags instead of scriplet" New topic
Author

jsp standard actions or tags instead of scriplet

Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
Hi

I have following scriplet in my jsp. I want to get rid of it and want to do the same things with the tag. Can someone please tell me the code to replace it
.......
<bean efine id="s" name="results" type="com.r911.core.model.Message"/>
<% java .util.HashMap params = new java.util.HashMap();
params.put("messageType", s.getMessageType().getType());
params.put("messageFileName", s.getFileName());
pageContext.setAttribute("paramsName", params);
%>
...........

Thanks
Imad
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Usually I will set up such structures in the servlet controller for a page prior to invoking the JSP. However, if you must set up a Map on-page:



The values for the <c:set> attributes property and value can be dynamic.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp standard actions or tags instead of scriplet
 
Similar Threads
use html:link pass two param
Struts html:link problem
geting only l;ast vale from hashmap
Passing values in a form with multiple actions
does html link provide