aspose file tools*
The moose likes Servlets and the fly likes Tomcat JSP does not recognizes my java classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Tomcat JSP does not recognizes my java classes" Watch "Tomcat JSP does not recognizes my java classes" New topic
Author

Tomcat JSP does not recognizes my java classes

Carlos Marquez
Greenhorn

Joined: Sep 10, 2007
Posts: 13

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

Joined: Jan 10, 2002
Posts: 61218
    
  66

Your structure is incorrect. Do not create anything within the ROOT folder. Create new contexts in the webapp folder.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41863
    
  63
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


Ping & DNS - my free Android networking tools app
Carlos Marquez
Greenhorn

Joined: Sep 10, 2007
Posts: 13

You're right!, thank you for your help, it is working fine right now =D
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat JSP does not recognizes my java classes