Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat JSP does not recognizes my java classes

 
Carlos Marquez
Greenhorn
Posts: 13
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your structure is incorrect. Do not create anything within the ROOT folder. Create new contexts in the webapp folder.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right!, thank you for your help, it is working fine right now =D
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic