Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

need help on bean define

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

I am migrating my code to struts 2 .I am getting problem with bean:define tag

in struts 2 i have use the the <s:set> teg for that but i am unable to get the value in my action class
the code snippet is a s follows
In struts 1
<bean:define id="itemId" name="groupAdminEditForm" property="itemId" type="java.lang.Integer"/>
In struts 2
<s:set name="itemId" value="%{itemId}" />

In action class
public void setItemId(int itemId){ this.itemId = itemId; }
public int getItemId(){ return itemId; }

if i say <s:property name="itemId"/> I am getting the value in jsp but I am not able to get that value in action class

am I doing some thing wrong

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean, you're unable to get the value in the action class? The action class is what's providing the variable to the JSP!
 
prasanthh reddy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry devid I have asked the wrong question what you said is correct I got the value in jsp
thank you
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic