Blank result for jsp_servlet in Eclipse
Hello all,
Greetings!!!
I am new to this forum and also to Eclipse..
Have created index.jsp under WebContent in Eclipse. Having firstname and surname text boxes with submit button. Contents look like :
Code:
<form action="GreetingServlet" method="POST">
First Name: <input type="text" name="firstName" size="20"><br>
Surname: <input type="text" name="surname" size="20">
<br><br>
<input type="submit" value="Submit">
and created GreetingServlet by right clicking ProjectName(HelloServlets) -> New -> Projects -> Servlet
Contents look like:
Code:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String firstName = request.getParameter("firstName").toString();
String surname = request.getParameter("surname").toString();
}
The problem is that, variables out,firstName,surname are underlined with yellow line in Eclipse's default browser . and when i keep the cursor on that variables then it displays warning message like "The local variable is never read".
SO i guess no contact between jsp and servlet files.. but when i submit the page is directing to http://localhost:8080/HelloServlets/GreetingServlet
but its blank .. Pls Help to execute this program correctly in Eclipse
Thanks in advance
Regards
Unni
Blank result for jsp servlet in Eclipse
Thank you so much Albert :)
I could run and got the answer.. Thanks for ur immediate reply.. I couldnt reply early since i went to my native..
and am expecting more from u.. nice to meet u..
Once again Thanks!!
Regards
Juni