Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error : Package does not exist

 
sumana ar
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai friends..
i'm trying to connect to the database using jdbc-odbc bridge..that worked fine when i wrtie the code in a .java file and run it at the command prompt..but when i called that java file as a bean in the jsp ..i'm getting an error...package does not exist.
i've my .class file placed in
C:\Program Files\Apache Group\Tomcat\webapps\myfirstapp\WEB-INF\classes\test\userdata.class
where test is the name of the package.
my .jsp file placed in
C:\Program Files\Apache Group\Tomcat\webapps\myfirstapp\
From my .jsp file I tried to call the bean:
<jsp:useBean id="emp" scope="page" class="test.userdata" />

please help me where i'm doing an error...do i need to set any CLASSPATH for running this JSP
thanks in advance
--sumana
 
Rangarajan Suresh
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sumana ar:
hai friends..
i'm trying to connect to the database using jdbc-odbc bridge..that worked fine when i wrtie the code in a .java file and run it at the command prompt..but when i called that java file as a bean in the jsp ..i'm getting an error...package does not exist.
i've my .class file placed in
C:\Program Files\Apache Group\Tomcat\webapps\myfirstapp\WEB-INF\classes\test\userdata.class
where test is the name of the package.
my .jsp file placed in
C:\Program Files\Apache Group\Tomcat\webapps\myfirstapp\
From my .jsp file I tried to call the bean:
<jsp:useBean id="emp" scope="page" class="test.userdata" />

please help me where i'm doing an error...do i need to set any CLASSPATH for running this JSP
thanks in advance
--sumana

you dont need to set CLASSPATH for classes located in your web-apps WEB-INF\classes folder.
Just make sure whether you have imported the package/class and give the exact compilation error that you get.
 
dimpsonu arora
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think there is no trouble with your program.Make sure that other simple beans are running on your system.If yes then I don't get the trouble.If not then use the newer version of tomcat.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic