This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts Unstring the data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Unstring the data" Watch "Struts Unstring the data" New topic
Author

Struts Unstring the data

Raja Ar
Greenhorn

Joined: Mar 09, 2005
Posts: 8
Hi,
I have a long string data with row and column delimiters(say table data of 5 columns with 100 rows). I wanted to display in the html page.


Raja
Vicky Mohan
Ranch Hand

Joined: Oct 14, 2004
Posts: 130
Please explain how you are trying to implement the logic ? That might help others in providing solutions.
Raja Ar
Greenhorn

Joined: Mar 09, 2005
Posts: 8
Ok. I am very new to Struts world, So please bear with my questios. I am using WSAD 5.1 with struts 1.0

String Table_data = "COL11~COL12~COL13~COL14~COL15|COL21~COL22~COL23~COL24~COL25|........

I wanted to diaplay the above data in the JSP as a table format. I need a sample jsp code for displaying the data and how can i set the values thru the form bean.(like cell reference).
Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
in a while loop break the strings into tokens you need and add each string Obj, to a ArrayList.

then use logic:iterate tag.

refer this topic for more info
http://www.coderanch.com/t/51858/Struts/Displaying-ResultSets-View
Raja Ar
Greenhorn

Joined: Mar 09, 2005
Posts: 8
Good enough to Start. Thanks
Raja
 
 
subject: Struts Unstring the data
 
Similar Threads
array comparison
Your details online
Which JSP version I'm using?
disassembler
How to assign js variable to jsp variable