• 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

Tomcat JSP does not recognizes my java classes

 
Greenhorn
Posts: 13
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,

I have worked a little bit with tomcat, Im currently building a site and using some java classes to interact with my database, but I dont get to the JSP pages recognice my class directory. I have my directories like this
c:\program files\apache software foundation\tomcat 7\webapps(or something)\ROOT\MySite

inside MySite I have created a WEB-INF directory and placed my class directory inside and web.xml file, yet I'm not sure about the configuration on web.xml, an example will be apreciated and if its possible to include the classpath and everything.

Im using netbeans for my classes and dreamweaver for my JSP's, my classpath in the environment variables contains the jdk path.

Best Regards!
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your structure is incorrect. Do not create anything within the ROOT folder. Create new contexts in the webapp folder.
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

c:\program files\apache software foundation\tomcat 7\webapps\ROOT\MySite

inside MySite I have created a WEB-INF directory


That's not how it works. ROOT is a web app itself - anything you want to configure for ROOT needs to go into ROOT\WEB-INF.

If you want a web app called "MySite", then all its files need to go into c:\program files\apache software foundation\tomcat 7\webapps\MySite
 
Carlos Marquez
Greenhorn
Posts: 13
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're right!, thank you for your help, it is working fine right now =D
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic