in my application i have JSP and a Java class(not servlet) ,if user clicks on the JSP it has to pass the value to the Java class , how to get the values from JSP ?

Recommended Answers

All 3 Replies

Try posting some code to help clarify your question.

Try posting some code to help clarify your question.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<form action="SendEmail" method="post" >

Name: &nbsp;&nbsp;&nbsp;<input type="text" name="name" ><br><br>
Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="email"><br><br>
Subject: &nbsp;<input type="text" name="subject"><br><br>
Enquiry: <textarea name="enquiy" rows=3> </textarea>
<input type= "submit" value="submit" name="submit">

after user clicks on submit button ,it has to go which is a Java class ,on how can i get values of User entered in Jsp ?

and ... what exactly do you mean, "isn't a servlet"?
first, look up the basics on webapps.

what you want to do, is pass the values stored in name, email, ... to your java class (which sounds pretty much like a servlet to me).

ever used HttpSession before? if not, make sure to look it up, I think you'll find this can help you getting what you need

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.