• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Internal service error..

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
machines help you to do more, but experience less. Experience this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic