troubleshooting Question

Save form attributes to a text file

Avatar of ramoore
ramoore asked on
2 Comments1 Solution265 ViewsLast Modified:

I need to create a simple form with 2 buttons; After filling out the form, clicking the first button would save his/her field entries into a plain text file and place in a specifed network folder. The second button would simply submit the form in the typical manner ifor regular processing (javamail, etc) and not create the file. I know how to create a basic form, but saving the field entries to a file is where I am unsure what to do. Can someone help?  Regards.

<!-- My Simple Form -->
<form action="processform.jsp" method="get">

Your Name <input type="text" name="user">
Your Address <input type="text" name="location">

<input type="button" value="Save entries as a text file" onclick="do something here?...">
<input type="submit" value="SUBMIT FORM">
// processform.jsp
String NAME = request.getParameter("user");
String ADDRESS = request.getParameter("location");
//printout fields
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros