aspose file tools*
The moose likes JSP and the fly likes problem while accessing class file from a package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "problem while accessing class file from a package" Watch "problem while accessing class file from a package" New topic
Author

problem while accessing class file from a package

Narasimha Raju Naidu
Ranch Hand

Joined: Mar 23, 2007
Posts: 37
hi

i am facing a problem while accessing class file from package. i am placing all my files


// connect.java which takes care abt conncetion


//test.jsp where im accessing all class files


please solve my problem as early as possible



regards


[BSouther: Added UBB CODE tags]

[ March 29, 2007: Message edited by: Ben Souther ]
[ March 29, 2007: Message edited by: Bear Bibeault ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What problems are you facing?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Narasimha Raju Naidu
Ranch Hand

Joined: Mar 23, 2007
Posts: 37
HTTP Status 500 -

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

type Exception report

message

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

exception

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

An error occurred at line: 2 in the jsp file: /test.jsp

Generated servlet error:
[javac] Compiling 1 source file

E:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\new2503\org\apache\jsp\test_jsp.java:42: package sql does not exist
sql.SqlBean sq = null;
^



An error occurred at line: 2 in the jsp file: /test.jsp

Generated servlet error:
E:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\new2503\org\apache\jsp\test_jsp.java:44: package sql does not exist
sq = (sql.SqlBean) pageContext.getAttribute("sq", PageContext.PAGE_SCOPE);
^



An error occurred at line: 2 in the jsp file: /test.jsp

Generated servlet error:
E:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\new2503\org\apache\jsp\test_jsp.java:46: package sql does not exist
sq = new sql.SqlBean();
^
3 errors


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


note The full stack trace of the root cause is available in the Tomcat logs.


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

Apache Tomcat/5.0.16
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Where did you put the class files for your sql.SqlBean class?


Also, this code looks identical to the code being posted (repeatedly) by rajesh roy. Both are being posted from the same IP.
If you're using two screen names to post the same question to this forum, please stop.

Spreading your question out among multiple threads doesn't raise your odds of getting an answer. It's more likely to annoy people into ignoring you altogether.
Narasimha Raju Naidu
Ranch Hand

Joined: Mar 23, 2007
Posts: 37
we both are working in same team and both are working on solvig this problem. sorry for that one of us will try to stop sending mails
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Ben Souther:
Where did you put the class files for your sql.SqlBean class?

Narasimha Raju Naidu
Ranch Hand

Joined: Mar 23, 2007
Posts: 37
im using apache, so i will give full story. in webapps my folder name is new2903. i that first i wrote connect.java at ./connection folder and compiled it. it got executed now i wrote SqlBean.java at ./sql folder. while trying to execute from command prompt it is giving an error package connection does not exist. can any one solve my problem. why i am not able to access connection package while compailing SqlBean.java


regards
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem while accessing class file from a package