You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by none none <bi...@yahoo.com> on 2005/07/22 15:39:37 UTC
Replacing a class file
Hello,
I am very new to tomcat, I hope someone is able to help me out.
There is a Java application sitting in one of the servers and I have been asked to modify some code in there.
I figured out that the code need to be changed is in one of the class files, so I found the java source code, modified it on my desktop, compile it then I simply replaced the old class file with the new one under WEB-INF.
Now, I did a "service tomcat restart" command, but the change didn't take effect. I am totally confused and don't know what to do. How do I make tomcat pick-up the new class file?
Any help would be great.
Thank you.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Replacing a class file
Posted by Tim Koop <gr...@timkoop.com>.
That sounds like it should work to me. I do the same thing every day.
Perhaps this code has also been compiled into a jar and is sitting in
WEB-INF/lib or tomcat/shared.
Or try deleting the files in the tomcat/work directory. I think
technically this shouldn't fix it, but it doesn't hurt if you're desperate.
And of course check all the obvious things like: Are you sure you are
copying the new class file? Are you sure you saved the java file when
you compiled it? Are you sure you are putting it in the right
directory? Perhaps you have more than one web app/web site on your
server. If you have more that one instance of Tomcat running maybe you
restarted the wrong one. Check file permissions. Maybe the new class
is actually running and the changes you made to the java file don't
actually fix the problem.
Tim Koop
none none wrote:
>Hello,
> I am very new to tomcat, I hope someone is able to help me out.
>
>There is a Java application sitting in one of the servers and I have been asked to modify some code in there.
> I figured out that the code need to be changed is in one of the class files, so I found the java source code, modified it on my desktop, compile it then I simply replaced the old class file with the new one under WEB-INF.
>
> Now, I did a "service tomcat restart" command, but the change didn't take effect. I am totally confused and don't know what to do. How do I make tomcat pick-up the new class file?
>
>Any help would be great.
>Thank you.
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org