• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Internal service error..

 
Vimala
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i run my servlet, it gives me error message saying
10.5.1 500 Internal Server Error
The following is the code which compiles fine
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class TestForm extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res)throws ServletException, IOException
{
try{
res.setContentType("text/html");
PrintWriter out = res.getWriter();

String name = req.getParameter("name");
String password = req.getParameter("email");

out.println("<HTML>");
out.println("<HEAD> <TITLE>Testing Form " + "</TITLE></HEAD>");
out.println("<BODY>");
out.println(" Name:");
out.println("<INPUT TYPE = TEXT NAME = name VALUE ="" SIZE=15>");
out.println("Email:");
out.println("<INPUT TYPE = TEXT Email = email VALUE = "" SIZE=15>");
out.println("<INPUT TYPE=SUBMIT value = Ok >");
out.println("</BODY></HTML>");
}catch(IOException e){}
}
}

I am using web logic server and can't figure out why it is giving me this error but simple helloworld works.
Could anyone please help me out.
Thanks,
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This servelet is expecting two input parameters. Are you sending these parameters from some HTML form? Could you paste the code for that form too.
 
John Bateman
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I looked over your code and found the following:
It seems to be working properly now. Alot of your errors were mistakes in the way you presented the HTML code so when you clicked on OK it couldn't process your request properly.
In the future if you could also 'wrap' your code in 'code tags' and indent properly it would be easier to read.
Thanks.


[This message has been edited by John Bateman (edited April 10, 2000).]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry. I don't know what I was thinking when I posted my earlier reply to this message, and asked for the HTML form. May be I was in a hurry and didn't read the message properly. So please ignore my earlier reply to this message.
Thanks John for resolving the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic