• Post Reply Bookmark Topic Watch Topic
  • New Topic

Saving a file on the server. Source: HTML Form - text area  RSS feed

 
Mohamed Hussain
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am quite new to JSP and Servlets. I am trying to get a solution to save the text entered in the text area on an HTML form to my Server as a '.java' file. Please help me with this...

Advanced:
Further on I will try to compile it on the Server (Post back any compilation errors)

And then execute it up there and post the output on the page.

- Required solution for it too, so help if you can

Thanks in advance...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Hussain A", please check your private message for an important administrative matter.
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hussain A welcome to Javaranch,
Firstly as asked by Bear, check your private messages here, its really important.

Then tell us what have you done till now and where are you stuck.
Also take some time to read the Ask Good Questions link below.


Hope this helps .
[ July 10, 2008: Message edited by: Amit Ghorpade ]
 
Jetendra Ivaturi
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Get the text what ever you get from the text box. Use file to save the data to a .java file.

Once it is stored in a local directory you have to create .bat files

for compiling and running the .java programme. To save the compilation errors and the response to a file...

Do the following

javac filename.java >compilationresult.txt
java filename >output.txt.

And use the same files to get the text from these files and output this where ever you want.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!