Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Building Microservices this week in the Design 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
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Struts Unstring the data
 
It's not a secret anymore!