Home Tutorialhelp Allcomments Struts Struts Struts Controltags Set Tag

 
 

Comments

 
User Comments for the tutorial:

Set Tag (Data Tag) Example



Total comments: 4      View Tutorial    Discuss: Set Tag (Data Tag) Example
Advertisement
Comments

How can I access the variable from within scriptle
Hi, I set a parameter in the above manner using a s:set (Analogous to bean:define in struts 1). But I am unable to access that new parameter in any jsp scriptlets. It always says cannot be resolved when used in scriptlets. Now there is a parameter  

struts2
If you set a parameter <s:set name="test" value="%{This is a test!}"/> You can access it like this pageContext.getAttribute("test") in scriptlets 

pageContext.getAttribute("test")
Hi, when I use pageContext.getAttribute("test") I receive null. Any ideas why I dont get the attribute? thanks 

Comment
You people have given such a nice explanation about Struts2. We are very happy after learning it. Please make one book on struts2 and publish it for free. Thanks again. 

Related Tutorial and Articles
Struts Questions

tree tag in struts2 - Struts
tree tag in struts2  I have an arraylist of values retrieved from the database and i want all the values in the arraylist to be viewed in a subtree...,Delhi,Hyderabad. USA has Los angels,Newyork,Chicago. UK has London,Scotland. i 

Struts Questions

Struts2 - Struts
Struts2  S:select tag is being used in my jsp, to create a drop down.... Please can i get some help?   Hi friend, please, Can you send... state; } Please can you tell me where i am doing wrong? Please its urgent 

Struts Questions

How to Assign struts2 property to jsp variable
How to Assign struts2 property to jsp variable  In Struts2 <s... will provide you a good example that will illustrate you struts property tag easily.   But i wants to assign the value to jsp variable   I wants 

Struts Questions

How to Assign struts2 property to jsp variable
How to Assign struts2 property to jsp variable  In Struts2 <s:property value='count'/> I wants to assign <% int count = %><s... will provide you a good example that will illustrate you struts property tag easily 

Struts Questions

Struts2
Struts2  Hi, I need a solution for displaying success message in same page in struts2. how to redirect same page in struts2.Please help me.   hi friend, To know how redirect action can be done in struts 2 you can go 

Struts Questions

select tag in Struts2 to handle Enums - Struts
select tag in Struts2 to handle Enums  I have an java enum in my object. I am trying to set its values from struts2 select tag. I tried with "#list... to handle enums in struts2 select tag ?   Hi friend, Code to solve 

Struts Questions

Achor tag. Struts2 code - Struts
Achor tag. Struts2 code  Hi All, How to send the values form one jsp page to another using anchor tag (or any which is similar to achor) in Struts? Please help me. I am waiting for the answer. Regards, Sandeep 

Struts Questions

Achor tag. Struts2 code - Struts
Achor tag. Struts2 code  Hi All, How to send the values form one jsp page to another using anchor tag (or any which is similar to achor) in Struts? Please help me. I am waiting for the answer. Regards, Sandeep   

JSP Servlet Questions

How to access the following tag from xml to jsp
How to access the following tag from xml to jsp  How can i get the title where cat="1" and "My Title" from XML File?   Please visit the following link: http://www.roseindia.net/jsp/parsing-xml.shtml The above link 

Java Beginners

struts2
struts2  sir.... i am doing one struts2 application and i have to make pagination in struts2....how can i do 

Advertisements Advertisements
 

 

 

DMCA.com