Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

500 Internal Server Erroor

  Asked By: Kiswar    Date: Jul 13    Category: Java    Views: 866
  

I have very quick question. I am trying to working userinput form.
but When I run it its give me 500 Internal Server Erroor. Here is
the example that I trying to use.

File jspformtest1.htm
<html>
<body>
<form method="POST" action="jspformtest2.jsp">
Please enter your name:<br>
<input type="text" name="Name"><br>
<input type="submit">
</form>
</body>
</html>


File jspformtest2.jsp
<html>
<body>
<% String strName = request.getParameter( "Name" ) ;
if ( strName.length() == 0 )
%>
Please enter a name and try again.
<% else %>
Hello, <%= strName %>
</body>
</html>

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Michele Grant     Answered On: Jul 13

Your code seems to be right. Could you provide the complete error
statement?

 
Answer #2    Answered By: Aberto Rossi     Answered On: Jul 13

Apache Tomcat/4.0.4 - HTTP Status 500 - internal  Server Error

----------------------------------------------------------------------
----------

type Exception report

message Internal server  Error

description The server encountered an internal error (Internal Server
Error) that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
at org.apache.jsp.newmemo$jsp._jspService
(newmemo$jsp.java:117)
at org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service
(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process
(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run
(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:479)

 
Didn't find what you were looking for? Find more on 500 Internal Server Erroor Or get search suggestion and latest updates.




Tagged: