It's been a long time since I last used Tomcat, but I seem to remember that you modify server.xml to reflect every additional application home in webapps.  server.xml is well documented with internal comments....
 
Mark
-----Original Message-----
From: kaustubh [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 10, 2001 11:20 PM
To: [EMAIL PROTECTED]
Subject: Re: JSP - Bean problem : plz help

Hi Mark & Piotr,
Thanks for u're suggestions...
I have already tried that...and it still doesn't work...
:((
I even made a ".war" file of my application so that when Tomcat started it expanded the war file
into proper directories.....but that too did not help...
the key here is that my bean class is exposed to my application from catalina_home/common/classes....
but not from my own application....r there any settings to be done to server.xml?
I did not find any help on this on the net.....
I also have a "context" for my application in the server.xml...
but that doesnot help....
Thanks & Best Regards,
Kaustubh Vaze
Internet Programmer
[EMAIL PROTECTED]
----- Original Message -----
Sent: Wednesday, April 10, 2002 5:25 PM
Subject: Re: JSP - Bean problem : plz help

After your language declaration, try
 
<%@ page import="trial.TestBean" %>
 
Mark
-----Original Message-----
From: kaustubh [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 10, 2001 6:04 AM
To: [EMAIL PROTECTED]
Subject: JSP - Bean problem : plz help

Hi people,
I am a newbie to JSP / Servlets
I am trying to write a JSP which instantiates a Bean...
here is my code for the JSP :
<%@ page language="java"%>
<jsp:useBean id="testBean" scope="session" class="trial.TestBean"/>
<jsp:setProperty name="testBean" property="height" value="15"/>
<html>
<head>
<title>Simple JSP Example</title>
</head>
<body>
<p>
<% for(int i=0;i<5;i++)
   {
%>
 Hello World !!<br>
<% } %>
This is my first bean example : <jsp:getProperty name="testBean" property="height"/>
</p>
</body>
</html>
 
I have written a TestBean class with package declaration as "trial" and put this class in
/my_application_home/web-inf/classes/trial/TestBean.class
 
When I startup Tomcat and I access my applications other .jsp pages which donot access beans, they work fine...
but when I access the above bean, it says, java.lang.ClassNotFoundException : trial.TestBean not found.
Now here is the climax....when I put this "trial" directory in tomcat_home/common/classes/
the bean is found and the jsp executes perfectly....
why is it so??
I want to start development on a small project and cant find a way to solve this problem....
Please would u help me?
 
Thanks & Best Regards,
Kaustubh Vaze
Internet Programmer
[EMAIL PROTECTED]
Kaustubh Vaze
Internet Programmer
[EMAIL PROTECTED]

Reply via email to