• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp standard actions or tags instead of scriplet

 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic