Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

problem while accessing class file from a package

 
Ranch Hand
Posts: 37
  • 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 ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
 
Narasimha Raju Naidu
Ranch Hand
Posts: 37
  • 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 VI Editor Redhat
  • 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
  • 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 VI Editor Redhat
  • 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
  • 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
 
I child proofed my house but they still get in. Distract them with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!