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

values of textarea

 
adon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i make the values of textarea to be a jsp or html files when the form post?
please help me.
 
Christopher Dixon
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure I understand the question. Are you trying to write the .jsp source on the fly, like an admin screen? You can write (using the java.io package) out to disk using a FileWriter, usually wrapped in a BufferedWriter to improve performance. See
Sun IO tutorial for some pointers, and don't forget to flush() the BufferedWriter before close()ing it.
Just remember, the ability to write and execute server code from a web interface could be very badly abused (Runtime.exec("some bad code"), for starters) and should be protected accordingly.
HTH,
Chris
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
adon,
Javaranch has a naming policy. Please read the policy and change your display name to one that conforms to continue posting here. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic