• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error : Package does not exist

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic