jQuery in Action, 3rd edition
The moose likes Struts and the fly likes printing values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "printing values" Watch "printing values" New topic

printing values

smitha mano
Ranch Hand

Joined: Sep 26, 2005
Posts: 70
String holdString=myForm.getHistory();
String eString=holdString.substring(0,100);

in my history values getting from database.
i needed to print value of eString to my struts jsp page
how i will print
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
You need somehow get the eString to JSP page. One posibility is to set this value as request attribute and then access it in JSP page.

SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
smitha mano
Ranch Hand

Joined: Sep 26, 2005
Posts: 70
<%out.println("eString"); %>

is it possible this in jsp page?
smitha mano
Ranch Hand

Joined: Sep 26, 2005
Posts: 70
when i click on one action ,just view data from the eString to Struts jsp page
the eString value from the database
smitha mano
Ranch Hand

Joined: Sep 26, 2005
Posts: 70
My history table contain field history varchar(1000)
in my DataBean class contains

String str1=myForm.getHistory();
String str2=str1.substring(0,100);

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>


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

please help me
I agree. Here's the link: http://aspose.com/file-tools
subject: printing values
It's not a secret anymore!