• Post Reply Bookmark Topic Watch Topic
  • New Topic

tomcat and jsp  RSS feed

 
salvador rcn
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...i have not usued tomcat5 before for web application. but i use sunOne6.1.

suppose i am using a javabean in my jsp page . how does tomcat know the full path ?


example
-------
say,

<jsp:useBean id="test" class="my.Package.Test" scope="session" />


i have Test.class in folder \Root\WEB_INF\classes\my\Package

but server should know the full path to run it.

had it been SUnONE i usued like uri=C:\tomcat\webapps in server.xml. // i.e path before it

and also a server classpath for imported third party classes (like electric xml,Struts tlds, jdbc driver etc etc)


i think these are needed for any web application.

but where do i mention those things in tomcat ? does tomcat require these stuffs ?

otherwise how tomcat will find that package at runtime?


plz give an example where i use this same thing in tomcat...

sunOne's server.xml and tomcat's server.xml looks different...so i am getting difficulty to set the path.

how can i do the equivalent stuff?



QUESTION is :


i want to use a javabean in my jsp page. so what path setting i need and where to put those cofigauration? is it needed at all for tomcat ?



thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like any other class used in a servlet, your JavaBean will be found under WEB-INF/classes for the particular web application that your JSP page belongs to.
Your Tomcat 5 installation has a nice discussion of how class files are located in the tomcat-docs/class-loader-howto.html file.
Bill
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!