hi
i'ave made the servlet,compiled.deployed ,and tested it
but now my real problem is that how should i connect it with my contact form.i wrote
ACTION Thanks.do
METHOD post
Thanks is my servlet and it looks like
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class Thanks extends HttpServlet {
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws IOException {
response.setContentType ( "text/html" );
PrintWriter out = response.getWriter();
String f_name = request.getParameter ( "fname" );// gets first name
String l_name = request.getParameter ( "lname" );// gets last name
String e_mail = request.getParameter ( "email" );// gets email
String phone = request.getParameter ( "phn" );// gets phone no.
String address = request.getParameter ( "add" );// gets address
String cty = request.getParameter ( "city" );// gets city
String sta = request.getParameter ( "state" );// gets state
String pn_code = request.getParameter ( "pincode" );// gets pin code
String com = request.getParameter ( "comment" );// gets comments
out.println (" <html> " +
"<body> " +
"<h1 style = text-align : center>" +
" Vardhman Udhyog </h1>" +
"<br>First Name " + f_name +
"<br>Last Name " + l_name +
"<br>email address " + e_mail +
"<br>Phone number " + phone +
"<br>Address " + address +
"<br>City Name " + cty +
"<br>State " + sta +
"<br>Pincode " + pn_code +
"<br>comment " + com );
}
}
my deployment discriptor looks like
<servlet>
<servlet-name>thankyou</servlet-name>
<servlet-class>Thanks</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>thankyou</servlet-name>
<url-pattern>/Thanks.do</url-pattern>
</servlet-mapping>
please solve my problem.