• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

display value in Struts jsp page

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My history table contain field history varchar(1000)
in my DataBean class contains

if(rs.next()){
myForm.setHistory(rs.getString("history"));
String str1=myForm.getHistory();
String str2=str1.substring(0,100);
myForm.setHistory(rs.getString(str2));
}

in my action class

MyForm myForm = (MyForm) form;
new DataBean().displayHistory(myForm);
return mapping.findForward("moreHistory");


here what i wanted

str2 value print on the jsp page
when i click on the History link page it will display first 100 characters of history


in my jsp page

<html:form action="history.do" enctype="multipart/form-data">
<table width="42%" border="1" align="center">

<td><%=request.getAttribute(str2);%><html:link action="history.do">more hostory>></html:link></td>

</tr>
</table>
</html:form>

when i click on th emore history link, it will display in fully data in the jsp page


please help me
 
reply
    Bookmark Topic Watch Topic
  • New Topic