This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes How to read and write text file generated by java code in HTML file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to read and write text file generated by java code in HTML file?" Watch "How to read and write text file generated by java code in HTML file?" New topic
Author

How to read and write text file generated by java code in HTML file?

Yatin Shah
Ranch Hand

Joined: Sep 11, 2004
Posts: 72
Hello All,

I would like to store user comments / feedback entered in HTML file should store as a file name. As soon as user click on submit button of web page, I would like to get email of htat user's feedback. That's way I am using java code to read and write user's comments / feedback in text file and sending mail using JavaxMail API.

Is anyone help me, how can I do this in HTML?

I sincerely look forward to your support.

Regards,
Yatin
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

I am not quite understanding what you are asking here. Are you saying that you have this working fine using Java but that you want to do it HTML without Java?

If so, no. HTML is a markup language not a programming language. Neither it, nor client-side JavaScript have the ability to send emails or to write to files.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Yatin Shah
Ranch Hand

Joined: Sep 11, 2004
Posts: 72
Hi Bear,

Thans for your reply. I want to call java file in to my HTML page to collect the user's feedback and send it to my email id.

Thanking You,
Yatin
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19679
    
  18

You'll need to use an HTML form that posts the data to another page; this page can be a servlet, JSP page, PHP page, ASP page, ASP.NET page, etc. This page can run code to send an email.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to read and write text file generated by java code in HTML file?