Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Unstring the data

 
Raja Ar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain how you are trying to implement the logic ? That might help others in providing solutions.
 
Raja Ar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good enough to Start. Thanks
Raja
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic