JSP package error..while importing
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   srinivas_reddy
Posted On:   Thursday, January 5, 2012 05:49 AM

I am trying to import one class from package and it giving runtime error i want to use a method in That class which was importing package. below eror i am getting please help on this org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 9 in the generated java file Only a type can be imported. thinkmap.examples.EntityFreezeBehavior resolves to a package An error occurred at line: 107 in the jsp file: /Notes.jsp EntityFreezeBehavior cannot be resolved 104: Class.forName("net.sourceforge.jtds.jdbc.Driver"); 105: con = java.sql.DriverManager.getConnection(url, id, pass); 106: System.out.p   More>>

I am trying to import one class from package and it giving runtime error


i want to use a method in That class which was importing package.

below eror i am getting
please help on this

org.apache.jasper.JasperException: Unable to compile class for JSP:


An error occurred at line: 9 in the generated java file
Only a type can be imported. thinkmap.examples.EntityFreezeBehavior resolves to a package

An error occurred at line: 107 in the jsp file: /Notes.jsp
EntityFreezeBehavior cannot be resolved
104: Class.forName("net.sourceforge.jtds.jdbc.Driver");
105: con = java.sql.DriverManager.getConnection(url, id, pass);
106: System.out.println("Connected to DB Successfully");
107: Enumeration entities= EntityFreezeBehavior.getEntities();
108: System.out.println("ok");
109: System.out.println("entities");
110: while(entities.hasMoreElements()){


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

   <<Less

Re: JSP package error..while importing

Posted By:   jester_g  
Posted On:   Saturday, January 28, 2012 03:42 AM

I am also having troubles with JSP. If someone could answer this query that would be really helpful. Thank you for your time.

Barbara D. Colburn



top acne treatments
About | Sitemap | Contact