aspose file tools*
The moose likes JSP and the fly likes Internal Servlet Error: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Internal Servlet Error:" Watch "Internal Servlet Error:" New topic
Author

Internal Servlet Error:

numan ahmad
Ranch Hand

Joined: Jan 27, 2011
Posts: 49

i am new in jsp and making login system. when i execute my jsp page using tomcat i got an error i did not understand what kind of that error. some one please tell me what kind of that error and how can i remove it ..i excuse for my English because it is my 3rd language
thanks in advance

Error: 500
Internal Servlet Error:

org.apache.jasper.compiler.ParseException: D:\jsp\abc.jsp(0,4) Invalid directive
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:170)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1027)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1002)
at org.apache.jasper.compiler.Parser.parse(Parser.java:998)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:154)
at org.apache.jasper.runtime.JspLoader.loadJSP(JspLoader.java:226)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:137)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:148)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:255)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:360)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:403)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:224)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:347)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:144)
at org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:305)
at java.lang.Thread.run(Thread.java:662)
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
org.apache.jasper.compiler.ParseException: D:\jsp\abc.jsp(0,4) Invalid directive
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:170)
a


Some text in your JSP is confusing the Jasper parser. Whatever it is, it looks like a directive and appears in the first line (0,4).

Bill
numan ahmad
Ranch Hand

Joined: Jan 27, 2011
Posts: 49
Respected sir now i got that error :(

org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
work\localhost_8080%2Fexamples\_0005cjsp_0005cabc_0002ejspabc_jsp_0.java:74: Ambiguous class: java.beans.Statement and java.sql.Statement
Statement st=con.createStatement();


ever there is nothing wrong in my statement .
Pete Nelson
Ranch Hand

Joined: Aug 30, 2010
Posts: 147

That error tells me you have import statements like

The problem is, both of those packages have a class named "Statement". You have two options:
  • replace the wildcard imports with only the imports you need
  • specify the fully qualified class name (ie: java.sql.Statement rather than just 'Statement'))

  • The first option will give you better long-term results (and should be easy in a modern IDE), while the second option is a much quicker fix, but may leave you with similar problems in the future.


    OCPJP
    In preparing for battle I have always found that plans are useless, but planning is indispensable. -- Dwight D. Eisenhower
    Bear Bibeault
    Author and ninkuma
    Marshal

    Joined: Jan 10, 2002
    Posts: 61662
        
      67

    Or the best option of all: get the Java code out of the JSP. It has no business there. This isn't 2002!


    [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
     
     
    subject: Internal Servlet Error: