This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

pass value  RSS feed

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my struts program..





after this code execute,go to second.jsp



myquestion is


how can i pass String a value to second.jsp???

how can i get Stirng a value in second.jsp???


how can i pass value from action class to jsp page???

how can i pass value from jsp page to action class???

 
Sheriff
Posts: 9643
42
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sihani, when your action returns a result value, the action object itself is put on the ValueStack. So you can access the action's properties in the JSP using OGNL. So if lets say you want to access the String user property in your JSP, you can access it using s:property tag as

<s:property value="user" />
 
Ranch Hand
Posts: 118
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the simple way is to set an attribute into session,
and get the same attribute on the different page by using session.getAttribute("attributeName");
 
Forget Steve. Look at this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!