Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem while accessing class file from a package

 
Narasimha Raju Naidu
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What problems are you facing?
 
Narasimha Raju Naidu
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
Where did you put the class files for your sql.SqlBean class?

 
Narasimha Raju Naidu
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic