RE: [beginner question] reloading classes

2003-02-12 Thread Nandish A
add  
in you server.xml file

-Original Message-
From:   Bert Catsburg [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, February 12, 2003 9:00 PM
To: Tomcat Users List
Subject:Re: [beginner question] reloading classes

Hm, I do not understand why I should restart Tomcat.
The manager webapp should do the trick according to the
documentation. Why does this not work, or does it?

   http://localhost:8080/manager/reload?path=/PAQ

I hope to hear from somebody since I have this same solution.

Thanks,

Bert Catsburg


Richie Chauhan wrote:
> touch the jsp file where the bean is being loaded.
> touch and recompile the bean
> restart tomcat
> try and pull up jsp page now
> 
> That should work - it takes a while to get used to that.
> 
> Richie
> 
> -Original Message-
> From: Jacques Capesius [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 21, 2003 9:31 AM
> To: 'Tomcat'
> Subject: [beginner question] reloading classes
> 
> 
> Hi folks,
> 
> I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a change
> to a class that's being loaded into it as a bean, but I can't get the page
> to use the new class and not the old one.
> 
> My question, thus, is: when I make changes to a class, how do I get Tomcat
> to reload the class?
> 
> Restarting Tomcat doesn't seem to do the trick.
> 
> Searching the web, I found a doc that made mention that "touching" the
> web.xml file would force the reloading of the class. I tried that and it
> didn't work.
> 
> I also read somewhere that going to the application (where the JSPs are) and
> typing ANT would force the recompile of everything. Still, the old class is
> being used.
> 
> I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it into
> the jsp by means of the following line of code:
> 
> 
> 
> I've made sure there are no other versions of PSQ.class in any other places
> it might be used, for example, the WEB-INF/classes directory.
> 
> Thanks for whatever advice you can give, and I apologize if this question
> has been asked many times before.
> 
> -jacques :)
> 
> Jacques Capesius
> CNT Web Marketing Developer
> [EMAIL PROTECTED]
> (763) 268-6749
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [beginner question] reloading classes

2003-02-12 Thread Bert Catsburg
Hm, I do not understand why I should restart Tomcat.
The manager webapp should do the trick according to the
documentation. Why does this not work, or does it?

  http://localhost:8080/manager/reload?path=/PAQ

I hope to hear from somebody since I have this same solution.

Thanks,

Bert Catsburg


Richie Chauhan wrote:

touch the jsp file where the bean is being loaded.
touch and recompile the bean
restart tomcat
try and pull up jsp page now

That should work - it takes a while to get used to that.

Richie

-Original Message-
From: Jacques Capesius [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 9:31 AM
To: 'Tomcat'
Subject: [beginner question] reloading classes


Hi folks,

I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a change
to a class that's being loaded into it as a bean, but I can't get the page
to use the new class and not the old one.

My question, thus, is: when I make changes to a class, how do I get Tomcat
to reload the class?

Restarting Tomcat doesn't seem to do the trick.

Searching the web, I found a doc that made mention that "touching" the
web.xml file would force the reloading of the class. I tried that and it
didn't work.

I also read somewhere that going to the application (where the JSPs are) and
typing ANT would force the recompile of everything. Still, the old class is
being used.

I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it into
the jsp by means of the following line of code:



I've made sure there are no other versions of PSQ.class in any other places
it might be used, for example, the WEB-INF/classes directory.

Thanks for whatever advice you can give, and I apologize if this question
has been asked many times before.

-jacques :)

Jacques Capesius
CNT Web Marketing Developer
[EMAIL PROTECTED]
(763) 268-6749

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: [beginner question] reloading classes

2003-01-21 Thread Richie Chauhan
touch the jsp file where the bean is being loaded.
touch and recompile the bean
restart tomcat
try and pull up jsp page now

That should work - it takes a while to get used to that.

Richie

-Original Message-
From: Jacques Capesius [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 9:31 AM
To: 'Tomcat'
Subject: [beginner question] reloading classes


Hi folks,

I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a change
to a class that's being loaded into it as a bean, but I can't get the page
to use the new class and not the old one.

My question, thus, is: when I make changes to a class, how do I get Tomcat
to reload the class?

Restarting Tomcat doesn't seem to do the trick.

Searching the web, I found a doc that made mention that "touching" the
web.xml file would force the reloading of the class. I tried that and it
didn't work.

I also read somewhere that going to the application (where the JSPs are) and
typing ANT would force the recompile of everything. Still, the old class is
being used.

I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it into
the jsp by means of the following line of code:



I've made sure there are no other versions of PSQ.class in any other places
it might be used, for example, the WEB-INF/classes directory.

Thanks for whatever advice you can give, and I apologize if this question
has been asked many times before.

-jacques :)

Jacques Capesius
CNT Web Marketing Developer
[EMAIL PROTECTED]
(763) 268-6749

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: [beginner question] reloading classes

2003-01-21 Thread Tolles, James
Hey, no problem - ok to save yourself a bit of time!

Actually, I think my suggestion is incomplete. If tomcat is configured correctly, it 
will auto detect when a new servlet has been loaded, and then re-load the web app, 
grabbing the new servlet. I seems to me it tries to serialized the session object and 
re-start - but for us this usually doesn't succeed, so jsps get reloaded ok on update, 
servlets require a restart of the specific webapp.


-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 11:41 AM
To: 'Tomcat Users List'
Subject: RE: [beginner question] reloading classes


Sorry, posted spur of the moment before I even checked the docs... I will do
my homework :-P  Thanks!!

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Tolles, James [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 2:11 PM
To: 'Tomcat Users List'
Subject: RE: [beginner question] reloading classes


We use the little "manager" servlet/application. As I recall there is a
pretty good "HowTo" on it for Tomcat 4.

-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 11:12 AM
To: 'Tomcat Users List'
Subject: RE: [beginner question] reloading classes


Sorry to sneak the question into this post, but is stopping and starting the
service the only way to get the class reloaded?  For example, my java and
class files are in
TOMCAT_HOME/webapps/ROOT/WEB-INF/classes/com/complusdata/beans/ and there is
nothing in here is nothing in TOMCAT_HOME/common/classes/ so I would imagine
the higher classloader scenario you gave wouldn't apply...

Why is it then that whenever I make a change to my java file and recompile,
I have to restart Tomcat in order for the changes to take effect.  Is there
a better way to do this?

Thanks :)

Denise 


-Original Message-
From: Jeremy Nix [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 12:53 PM
To: Tomcat Users List
Subject: RE: [beginner question] reloading classes


If you're stopping and starting tomcat and seeing that the change has not
been picked up, then you're experiencing a classloader issue where that
class is being picked up in a higher classloader before your version of that
class is.

For instance:
TOMCAT_HOME/webapps/your_app/WEB-INF/classes/com/example/MyClass.class
TOMCAT_HOME/common/classes/com/example/MyClass.class

The 2nd one would be loaded prior to first because it will be loaded in a
higher classloader.

As for the touching of the web.xml file to reload the class.  This only
works for classes loaded in the web application's classloader, and not for
classes loaded within tomcat's internal classloader.  I don't have the
specific Tomcat classloader hierarchy on hand, but I can tell you that a
change made outside the context of your app to a class loaded within
common/lib or server/lib requires a restart of Tomcat.

_
Jeremy Nix
Senior Application Developer
Southwest Financial



-Original Message-
From: Jacques Capesius [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 12:31 PM
To: 'Tomcat'
Subject: [beginner question] reloading classes


Hi folks,

I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a change
to a class that's being loaded into it as a bean, but I can't get the page
to use the new class and not the old one. 

My question, thus, is: when I make changes to a class, how do I get Tomcat
to reload the class?

Restarting Tomcat doesn't seem to do the trick. 

Searching the web, I found a doc that made mention that "touching" the
web.xml file would force the reloading of the class. I tried that and it
didn't work.

I also read somewhere that going to the application (where the JSPs are) and
typing ANT would force the recompile of everything. Still, the old class is
being used.

I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it into
the jsp by means of the following line of code:



I've made sure there are no other versions of PSQ.class in any other places
it might be used, for example, the WEB-INF/classes directory.

Thanks for whatever advice you can give, and I apologize if this question
has been asked many times before. 

-jacques :)

Jacques Capesius
CNT Web Marketing Developer
[EMAIL PROTECTED]
(763) 268-6749

--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: [beginner question] reloading classes

2003-01-21 Thread Denise Mangano
Sorry, posted spur of the moment before I even checked the docs... I will do
my homework :-P  Thanks!!

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: Tolles, James [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 2:11 PM
To: 'Tomcat Users List'
Subject: RE: [beginner question] reloading classes


We use the little "manager" servlet/application. As I recall there is a
pretty good "HowTo" on it for Tomcat 4.

-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 11:12 AM
To: 'Tomcat Users List'
Subject: RE: [beginner question] reloading classes


Sorry to sneak the question into this post, but is stopping and starting the
service the only way to get the class reloaded?  For example, my java and
class files are in
TOMCAT_HOME/webapps/ROOT/WEB-INF/classes/com/complusdata/beans/ and there is
nothing in here is nothing in TOMCAT_HOME/common/classes/ so I would imagine
the higher classloader scenario you gave wouldn't apply...

Why is it then that whenever I make a change to my java file and recompile,
I have to restart Tomcat in order for the changes to take effect.  Is there
a better way to do this?

Thanks :)

Denise 


-Original Message-
From: Jeremy Nix [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 12:53 PM
To: Tomcat Users List
Subject: RE: [beginner question] reloading classes


If you're stopping and starting tomcat and seeing that the change has not
been picked up, then you're experiencing a classloader issue where that
class is being picked up in a higher classloader before your version of that
class is.

For instance:
TOMCAT_HOME/webapps/your_app/WEB-INF/classes/com/example/MyClass.class
TOMCAT_HOME/common/classes/com/example/MyClass.class

The 2nd one would be loaded prior to first because it will be loaded in a
higher classloader.

As for the touching of the web.xml file to reload the class.  This only
works for classes loaded in the web application's classloader, and not for
classes loaded within tomcat's internal classloader.  I don't have the
specific Tomcat classloader hierarchy on hand, but I can tell you that a
change made outside the context of your app to a class loaded within
common/lib or server/lib requires a restart of Tomcat.

_
Jeremy Nix
Senior Application Developer
Southwest Financial



-Original Message-
From: Jacques Capesius [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 12:31 PM
To: 'Tomcat'
Subject: [beginner question] reloading classes


Hi folks,

I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a change
to a class that's being loaded into it as a bean, but I can't get the page
to use the new class and not the old one. 

My question, thus, is: when I make changes to a class, how do I get Tomcat
to reload the class?

Restarting Tomcat doesn't seem to do the trick. 

Searching the web, I found a doc that made mention that "touching" the
web.xml file would force the reloading of the class. I tried that and it
didn't work.

I also read somewhere that going to the application (where the JSPs are) and
typing ANT would force the recompile of everything. Still, the old class is
being used.

I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it into
the jsp by means of the following line of code:



I've made sure there are no other versions of PSQ.class in any other places
it might be used, for example, the WEB-INF/classes directory.

Thanks for whatever advice you can give, and I apologize if this question
has been asked many times before. 

-jacques :)

Jacques Capesius
CNT Web Marketing Developer
[EMAIL PROTECTED]
(763) 268-6749

--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: [beginner question] reloading classes

2003-01-21 Thread Tolles, James
We use the little "manager" servlet/application. As I recall there is a pretty good 
"HowTo" on it for Tomcat 4.

-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 11:12 AM
To: 'Tomcat Users List'
Subject: RE: [beginner question] reloading classes


Sorry to sneak the question into this post, but is stopping and starting the
service the only way to get the class reloaded?  For example, my java and
class files are in
TOMCAT_HOME/webapps/ROOT/WEB-INF/classes/com/complusdata/beans/ and there is
nothing in here is nothing in TOMCAT_HOME/common/classes/ so I would imagine
the higher classloader scenario you gave wouldn't apply...

Why is it then that whenever I make a change to my java file and recompile,
I have to restart Tomcat in order for the changes to take effect.  Is there
a better way to do this?

Thanks :)

Denise 


-Original Message-
From: Jeremy Nix [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 12:53 PM
To: Tomcat Users List
Subject: RE: [beginner question] reloading classes


If you're stopping and starting tomcat and seeing that the change has not
been picked up, then you're experiencing a classloader issue where that
class is being picked up in a higher classloader before your version of that
class is.

For instance:
TOMCAT_HOME/webapps/your_app/WEB-INF/classes/com/example/MyClass.class
TOMCAT_HOME/common/classes/com/example/MyClass.class

The 2nd one would be loaded prior to first because it will be loaded in a
higher classloader.

As for the touching of the web.xml file to reload the class.  This only
works for classes loaded in the web application's classloader, and not for
classes loaded within tomcat's internal classloader.  I don't have the
specific Tomcat classloader hierarchy on hand, but I can tell you that a
change made outside the context of your app to a class loaded within
common/lib or server/lib requires a restart of Tomcat.

_
Jeremy Nix
Senior Application Developer
Southwest Financial



-Original Message-
From: Jacques Capesius [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 12:31 PM
To: 'Tomcat'
Subject: [beginner question] reloading classes


Hi folks,

I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a change
to a class that's being loaded into it as a bean, but I can't get the page
to use the new class and not the old one. 

My question, thus, is: when I make changes to a class, how do I get Tomcat
to reload the class?

Restarting Tomcat doesn't seem to do the trick. 

Searching the web, I found a doc that made mention that "touching" the
web.xml file would force the reloading of the class. I tried that and it
didn't work.

I also read somewhere that going to the application (where the JSPs are) and
typing ANT would force the recompile of everything. Still, the old class is
being used.

I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it into
the jsp by means of the following line of code:



I've made sure there are no other versions of PSQ.class in any other places
it might be used, for example, the WEB-INF/classes directory.

Thanks for whatever advice you can give, and I apologize if this question
has been asked many times before. 

-jacques :)

Jacques Capesius
CNT Web Marketing Developer
[EMAIL PROTECTED]
(763) 268-6749

--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: [beginner question] reloading classes

2003-01-21 Thread Denise Mangano
Sorry to sneak the question into this post, but is stopping and starting the
service the only way to get the class reloaded?  For example, my java and
class files are in
TOMCAT_HOME/webapps/ROOT/WEB-INF/classes/com/complusdata/beans/ and there is
nothing in here is nothing in TOMCAT_HOME/common/classes/ so I would imagine
the higher classloader scenario you gave wouldn't apply...

Why is it then that whenever I make a change to my java file and recompile,
I have to restart Tomcat in order for the changes to take effect.  Is there
a better way to do this?

Thanks :)

Denise 


-Original Message-
From: Jeremy Nix [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 12:53 PM
To: Tomcat Users List
Subject: RE: [beginner question] reloading classes


If you're stopping and starting tomcat and seeing that the change has not
been picked up, then you're experiencing a classloader issue where that
class is being picked up in a higher classloader before your version of that
class is.

For instance:
TOMCAT_HOME/webapps/your_app/WEB-INF/classes/com/example/MyClass.class
TOMCAT_HOME/common/classes/com/example/MyClass.class

The 2nd one would be loaded prior to first because it will be loaded in a
higher classloader.

As for the touching of the web.xml file to reload the class.  This only
works for classes loaded in the web application's classloader, and not for
classes loaded within tomcat's internal classloader.  I don't have the
specific Tomcat classloader hierarchy on hand, but I can tell you that a
change made outside the context of your app to a class loaded within
common/lib or server/lib requires a restart of Tomcat.

_
Jeremy Nix
Senior Application Developer
Southwest Financial



-Original Message-
From: Jacques Capesius [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 12:31 PM
To: 'Tomcat'
Subject: [beginner question] reloading classes


Hi folks,

I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a change
to a class that's being loaded into it as a bean, but I can't get the page
to use the new class and not the old one. 

My question, thus, is: when I make changes to a class, how do I get Tomcat
to reload the class?

Restarting Tomcat doesn't seem to do the trick. 

Searching the web, I found a doc that made mention that "touching" the
web.xml file would force the reloading of the class. I tried that and it
didn't work.

I also read somewhere that going to the application (where the JSPs are) and
typing ANT would force the recompile of everything. Still, the old class is
being used.

I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it into
the jsp by means of the following line of code:



I've made sure there are no other versions of PSQ.class in any other places
it might be used, for example, the WEB-INF/classes directory.

Thanks for whatever advice you can give, and I apologize if this question
has been asked many times before. 

-jacques :)

Jacques Capesius
CNT Web Marketing Developer
[EMAIL PROTECTED]
(763) 268-6749

--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: [beginner question] reloading classes

2003-01-21 Thread Erik Price
Is it possible that you need to re-compile the JSP file itself?  I don't 
know the mechanics of JSPs, but I know that whenever I include one JSP 
into another at compile time, if I change the "included" JSP, then I 
need to make sure that the "including" JSP is recompiled too.  Otherwise 
the "including" JSP still contains code from the original "included" JSP.

Ant won't update the "including" JSP if it hasn't been touched or 
changed, so if you're using ant, you need to touch the "including" JSP 
and then use ant to deploy your entire webapp.  Are you using ant?  It 
doesn't sound like you're very sure!  If not, ignore what i just said, 
and remove your deployed webapp, then redeploy the whole thing.  You 
should get the changes you are looking for.


Erik




Jacques Capesius wrote:
Hi folks,

I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a change
to a class that's being loaded into it as a bean, but I can't get the page
to use the new class and not the old one. 

My question, thus, is: when I make changes to a class, how do I get Tomcat
to reload the class?

Restarting Tomcat doesn't seem to do the trick. 

Searching the web, I found a doc that made mention that "touching" the
web.xml file would force the reloading of the class. I tried that and it
didn't work.

I also read somewhere that going to the application (where the JSPs are) and
typing ANT would force the recompile of everything. Still, the old class is
being used.

I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it into
the jsp by means of the following line of code:



I've made sure there are no other versions of PSQ.class in any other places
it might be used, for example, the WEB-INF/classes directory.

Thanks for whatever advice you can give, and I apologize if this question
has been asked many times before. 

-jacques :)

Jacques Capesius
CNT Web Marketing Developer
[EMAIL PROTECTED]
(763) 268-6749

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [beginner question] reloading classes

2003-01-21 Thread Jeremy Nix
If you're stopping and starting tomcat and seeing that the change has
not been picked up, then you're experiencing a classloader issue where
that class is being picked up in a higher classloader before your
version of that class is.

For instance:
TOMCAT_HOME/webapps/your_app/WEB-INF/classes/com/example/MyClass.class
TOMCAT_HOME/common/classes/com/example/MyClass.class

The 2nd one would be loaded prior to first because it will be loaded in
a higher classloader.

As for the touching of the web.xml file to reload the class.  This only
works for classes loaded in the web application's classloader, and not
for classes loaded within tomcat's internal classloader.  I don't have
the specific Tomcat classloader hierarchy on hand, but I can tell you
that a change made outside the context of your app to a class loaded
within common/lib or server/lib requires a restart of Tomcat.

_
Jeremy Nix
Senior Application Developer
Southwest Financial



-Original Message-
From: Jacques Capesius [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 12:31 PM
To: 'Tomcat'
Subject: [beginner question] reloading classes


Hi folks,

I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a
change to a class that's being loaded into it as a bean, but I can't get
the page to use the new class and not the old one. 

My question, thus, is: when I make changes to a class, how do I get
Tomcat to reload the class?

Restarting Tomcat doesn't seem to do the trick. 

Searching the web, I found a doc that made mention that "touching" the
web.xml file would force the reloading of the class. I tried that and it
didn't work.

I also read somewhere that going to the application (where the JSPs are)
and typing ANT would force the recompile of everything. Still, the old
class is being used.

I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it
into the jsp by means of the following line of code:



I've made sure there are no other versions of PSQ.class in any other
places it might be used, for example, the WEB-INF/classes directory.

Thanks for whatever advice you can give, and I apologize if this
question has been asked many times before. 

-jacques :)

Jacques Capesius
CNT Web Marketing Developer
[EMAIL PROTECTED]
(763) 268-6749

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




[beginner question] reloading classes

2003-01-21 Thread Jacques Capesius
Hi folks,

I'm new to Tomcat, but not as new to J2EE. I have a jsp, and I made a change
to a class that's being loaded into it as a bean, but I can't get the page
to use the new class and not the old one. 

My question, thus, is: when I make changes to a class, how do I get Tomcat
to reload the class?

Restarting Tomcat doesn't seem to do the trick. 

Searching the web, I found a doc that made mention that "touching" the
web.xml file would force the reloading of the class. I tried that and it
didn't work.

I also read somewhere that going to the application (where the JSPs are) and
typing ANT would force the recompile of everything. Still, the old class is
being used.

I'm storing the class in %catalina_home%/classes/PSQ/. I'm loading it into
the jsp by means of the following line of code:



I've made sure there are no other versions of PSQ.class in any other places
it might be used, for example, the WEB-INF/classes directory.

Thanks for whatever advice you can give, and I apologize if this question
has been asked many times before. 

-jacques :)

Jacques Capesius
CNT Web Marketing Developer
[EMAIL PROTECTED]
(763) 268-6749

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




beginner question...

2002-09-19 Thread Padhu Vinirs


Tomcat 4.0.4.

I am trying to use the Manager application to deploy and start a 
web-app. Have created the directory under CATALINA_HOME/webapps ( 
c:\tomcat40\webapps\ExamBuilder ). Even have a default web.xml under 
web-inf. Have put a one-liner index.html under my app directory.

I call manager app as follows:

http://localhost:8080/manager/install?path=/myapp&war=file:/tomcat40/webapps/ExamBuilder

Install is successful. I can do a list and it shows up.

Now I try:

http://localhost:8080/manager/start?path=/exambuilder

I get the following error:

FAIL - Application at context path /exambuilder could not be started


I checked the logs:

2002-09-19 09:16:43 Manager: start: Starting web application at 
'/exambuilder'
2002-09-19 09:16:43 StandardHost[localhost]: standardHost.start /exambuilder
2002-09-19 09:16:43 StandardContext[/exambuilder]: Error initializing 
resources: Document base 
C:\tomcat40\webapps\tomcat40\webapps\ExamBuilder does not exist or is 
not a readable directory
2002-09-19 09:16:43 StandardContext[/exambuilder]: Context startup 
failed due to previous errors
2002-09-19 09:16:43 StandardContext[/exambuilder]: Exception during 
cleanup after start failed
LifecycleException:  Container StandardContext[/exambuilder] has not 
been started
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1147)
..


Why is the server looking at 
C:\tomcat40\webapps\tomcat40\webapps\ExamBuilder and not 
C:\tomcat40\webapps\ExamBuilder ?


Even during installation, I see an exception:

2002-09-19 09:16:26 Manager: install: Installing web application at 
'/exambuilder' from 'file:/tomcat40/webapps/ExamBuilder'
2002-09-19 09:16:26 StandardHost[localhost]: Installing web application 
at context path /exambuilder from URL file:/tomcat40/webapps/ExamBuilder
2002-09-19 09:16:26 StandardContext[/exambuilder]: Error initializing 
resources: Document base 
C:\tomcat40\webapps\tomcat40\webapps\ExamBuilder does not exist or is 
not a readable directory
2002-09-19 09:16:26 StandardContext[/exambuilder]: Context startup 
failed due to previous errors
2002-09-19 09:16:26 StandardContext[/exambuilder]: Exception during 
cleanup after start failed
LifecycleException:  Container StandardContext[/exambuilder] has not 
been started
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1147)
at 
org.apache.catalina.core.StandardContext.stop(StandardContext.java:3495)


But if I try,

http://localhost:8080/manager/install?path=/myapp&war=file:/ExamBuilder

the install itself fails.



Any ideas appreciated.


Thanks

-- padhu





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Beginner question

2001-04-02 Thread Joey A. Gartin

Thank you! 






RE: Beginner question

2001-04-02 Thread Trakhtenberg, Victor

The JAVA_HOME should be : /usr/java/jdk1.3

> -Original Message-
> From: Joey A. Gartin [SMTP:[EMAIL PROTECTED]]
> Sent: á 02 àôøéì 2001 17:59
> To:   [EMAIL PROTECTED]
> Subject:  Beginner question
> 
> Hi,
> 
> I just installed Tomcat, and set the TOMCAT_HOME and JAVA_HOME environment
> variables in profile, when I export them and try to run startup.sh it is
> no
> go.  I get an error message that says there is no such directory 
> /usr/java/jdk1.3/bin/bin/java .  If you take the /bin/java off the end you
> have my path for the JAVA_HOME, but I do not get where the concatenation
> of
> the last portion is coming from. 
> 
> If I do not export the variables and run startup.sh it guesses the
> TOMCAT_HOME and runs fine.  Any suggestions?
> 
> Thank you all in advance.
> 
> New to Linux
> 
> 



Beginner question

2001-04-02 Thread Joey A. Gartin

Hi,

I just installed Tomcat, and set the TOMCAT_HOME and JAVA_HOME environment
variables in profile, when I export them and try to run startup.sh it is no
go.  I get an error message that says there is no such directory 
/usr/java/jdk1.3/bin/bin/java .  If you take the /bin/java off the end you
have my path for the JAVA_HOME, but I do not get where the concatenation of
the last portion is coming from. 

If I do not export the variables and run startup.sh it guesses the
TOMCAT_HOME and runs fine.  Any suggestions?

Thank you all in advance.

New to Linux






Re: Beginner question - revised

2001-04-01 Thread Mr.Y.SHIVAKANT


-Original Message-
From: Gabe Mahoney <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, April 02, 2001 2:49 AM
Subject: Beginner question - revised


>Hey all, I sent a mail earlier about having trouble with configuring tomcat
>to handle extension types other than .jsp. The problem is not exactly as I
>thought. I have modified web.xml so that type .rt is now handled by tomcat.
>My .rt file is just a jsp page with a different extension. I get the error
>below whenever I access a .rt file in my context, whether the .rt file
>exists or not! Which seems really weird to me...Thoughts?
>
>Error: 500
>Location: /djmalloc/foo.rt
>Internal Servlet Error:
>
>java.lang.InstantiationException: malloc.servlet.PageGetter
> at java.lang.Class.newInstance0(Native Method)
> at java.lang.Class.newInstance(Class.java:237)
> at
>org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:268)
> at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
> at org.apache.tomcat.core.Handler.service(Handler.java:254)
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:7
9
>7)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Http
C
>onnectionHandler.java:210)
> at
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
>
>
>

 i am getting a port number is null  not an integer error can anyone please
help me.Thanks in advance


YOURS SINCERELY
Shivakanth




Beginner question - revised

2001-04-01 Thread Gabe Mahoney

Hey all, I sent a mail earlier about having trouble with configuring tomcat
to handle extension types other than .jsp. The problem is not exactly as I
thought. I have modified web.xml so that type .rt is now handled by tomcat.
My .rt file is just a jsp page with a different extension. I get the error
below whenever I access a .rt file in my context, whether the .rt file
exists or not! Which seems really weird to me...Thoughts?

Error: 500
Location: /djmalloc/foo.rt
Internal Servlet Error:

java.lang.InstantiationException: malloc.servlet.PageGetter
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:237)
 at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:268)
 at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
 at org.apache.tomcat.core.Handler.service(Handler.java:254)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)






Beginner question

2001-03-31 Thread Gabe Mahoney

Hey all, I have figured out how to map files other than *.jsp to Tomcat. I
am trying to cause .rt (RealText files) to be created dynamically. They are
like xml files.
I created a .rt file that looks like this:


<%@ taglib uri="firstsong.tld" prefix="djmalloc" %>



When I load it I get the following error:
Error: 500
Location: /djmalloc/new.rt
Internal Servlet Error:

java.lang.InstantiationException: malloc.servlet.PageGetter
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:237)
 at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:268)
 at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
 at org.apache.tomcat.core.Handler.service(Handler.java:254)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

However, if I rename the exact same file with a .jsp extension, the page
appears correctly! Any thoughts?