File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can c:forTokens be used for creating new paragraphs

 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can any one please tell me if we can use c:forTokens inorder to devide our textarea into diffrent paragraphs when user clicks on enter button?

if this is possible with c:fortokens please give me example/sample code.

regards,
rahul
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean immediately when the user clicks something, or do you mean after the data is submitted to the server?

If the former, then no. JSP runs on the server in order to format the HTML page to send to the browser. Once sent, any reaction to user input must take place on the client using HTML and JavaScript.

If the latter, then that's the realm of data processing and should be taking place in a servlet, not in a JSP.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, not imeadeatly Mr. Bear Bibeault, I want to save, the data entered in the textarea, to back end system like sap, oracle or any thing.

Can you send me some sample code please.

regards,
rahul
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then the form should be submitted to a servlet that can perform whatever splitting of the text area data is necssary. A JSP will not be involved.

How are you determining what a "paragraph" is? Blank lines? Something else?
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
\n in other words enter button from the key board
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic