By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,651 Members | 1,316 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,651 IT Pros & Developers. It's quick & easy.

run java code on clicking Submit button in JSP form

P: 5
I want to run java code on clicking Submit button in JSP form. I want to use the information given in the form in java code.
May 14 '13 #1
Share this Question
Share on Google+
6 Replies


10K+
P: 13,264
Post the form data to a servlet.
May 14 '13 #2

P: 5
Okay. Does the answer remain the same if the Java code that I want to run does nothing but generate a PDF file containing the information submitted in the form?
Also, I don't know how to have the form information contained in PDf file which to be generated.
May 14 '13 #3

10K+
P: 13,264
Yes, you can generate PDFs from servlets just fine. You'll need some PDF libraries like iText for creating the pdf
May 14 '13 #4

P: 5
I downloaded the iText jar file, but I don't know where exactly should I put it.
May 14 '13 #5

10K+
P: 13,264
It should end up in your web application's WEB-INF/lib.
If this is your first web application the you should start with a tutorial on servlets and JSPs
May 14 '13 #6

P: 5
Ok. Thank you very much for the information.
May 14 '13 #7

Post your reply

Sign in to post your reply or Sign up for a free account.