How to force Tomcat to compile?
Hi, is there a method, which forces Tomcat (4.0) to compile all my class-files in WEB-INF/classes? It is a little bit troublesome to rename the classes every time I have changed it... Anja
RE: How to force Tomcat to compile?
you only have to set the reloadable=true attribute. Context path= docBase=C:\contextpath reloadable=true debug=0/ hope it helps, -reynir -Original Message- From: Anja Falkner [mailto:[EMAIL PROTECTED]] Sent: 5. febrúar 2002 18:24 To: Tomcat Users List Subject: How to force Tomcat to compile? Hi, is there a method, which forces Tomcat (4.0) to compile all my class-files in WEB-INF/classes? It is a little bit troublesome to rename the classes every time I have changed it... Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: How to force Tomcat to compile?
just do it with the following two command lines: cd .../WEB-INF/classes javac *.java Guido. -Original Message- From: Anja Falkner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 2:24 PM To: Tomcat Users List Subject: How to force Tomcat to compile? Hi, is there a method, which forces Tomcat (4.0) to compile all my class-files in WEB-INF/classes? It is a little bit troublesome to rename the classes every time I have changed it... Anja
Re: How to force Tomcat to compile?
Define a context (in your server.xml configuration file) to your web app. like: Context path=/myapp docBase=myapp debug=0 reloadable=true The reloadable=true is what do you need. Chau chau. Marcelo P.S.: To enforce TC to re-compile, you can delete all the code generated by TC 4.0 in the %CATALINA_HOME%/work directory. - Original Message - From: Anja Falkner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 10:24 AM Subject: How to force Tomcat to compile? Hi, is there a method, which forces Tomcat (4.0) to compile all my class-files in WEB-INF/classes? It is a little bit troublesome to rename the classes every time I have changed it... Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re:Re: How to force Tomcat to compile?
Hi, thanks for your advice for recompiling classes. I think I have to explain the situation more exactly. (To Reynir): The context reloadable is set to true. (To Guido): I have tried to compile the classes in WEB-INF/classes with javac. Then I get an ClassDefNotFoundError. (To Marcelo): The compiled class-Files are not in the work-directory. Now I'm at a loss. Only if I rename my Java-Classes (a little bit of work), Tomcat notices changes in the Class. I were very grateful, if anyone can give me a hint... Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: How to force Tomcat to compile?
Hello Anja, This is strange, If I understand you correctly, you are really having problems with compiling your classes with javac ? I think the ClassDefNotFoundError is thrown if you're trying to run your classes (with wrong name) with java, not with javac. which version of tomcat are you using, what system (linux, unix, windows) and which jdk version ? -reynir -Original Message- From: Anja Falkner [mailto:[EMAIL PROTECTED]] Sent: 5. febrúar 2002 19:30 To: Tomcat Users List Subject: Re: How to force Tomcat to compile? Hi, thanks for your advice for recompiling classes. I think I have to explain the situation more exactly. (To Reynir): The context reloadable is set to true. (To Guido): I have tried to compile the classes in WEB-INF/classes with javac. Then I get an ClassDefNotFoundError. (To Marcelo): The compiled class-Files are not in the work-directory. Now I'm at a loss. Only if I rename my Java-Classes (a little bit of work), Tomcat notices changes in the Class. I were very grateful, if anyone can give me a hint... Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: How to force Tomcat to compile?
Hello Reynir, my JSPs use some Java-Classes. This Java-Classes are positioned in WEB-INF/classes. Normally Tomcat compiles this classes by his own. But if I do some changes in *.java, Tomcat doesn't check, that *.java has changed and doesn't recompile. That's the problem. To found a solution, I have compiled the changed *.java with javac. The compilation runs without problems. Then, when I run my application I get a ClassDefNotFoundError. Tomcat don't want my self-compiled *.class Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: How to force Tomcat to compile?
Hi Anja, I had the same problem when I first start working with JSP. The only working way I know is restart tomcat, I normally already have all .java (my beans) copiled with javac first. Li -Original Message- From: Anja Falkner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 14:50 To: Tomcat Users List Subject: Re: How to force Tomcat to compile? Hello Reynir, my JSPs use some Java-Classes. This Java-Classes are positioned in WEB-INF/classes. Normally Tomcat compiles this classes by his own. But if I do some changes in *.java, Tomcat doesn't check, that *.java has changed and doesn't recompile. That's the problem. To found a solution, I have compiled the changed *.java with javac. The compilation runs without problems. Then, when I run my application I get a ClassDefNotFoundError. Tomcat don't want my self-compiled *.class Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: How to force Tomcat to compile?
hi, Anja, i don't think tomcat will recompile automatically. you can compile changed java file by yourself and put the class file under WEB-INF/classes. it should work. one more thing, if you set ReloadInterceptor fullReload=true, you don't need to restart tomcat. it will reload both context and servlets automatically. hope it helps, Shannon --- YI,LI (HP-USA,ex1) [EMAIL PROTECTED] wrote: Hi Anja, I had the same problem when I first start working with JSP. The only working way I know is restart tomcat, I normally already have all .java (my beans) copiled with javac first. Li -Original Message- From: Anja Falkner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 14:50 To: Tomcat Users List Subject: Re: How to force Tomcat to compile? Hello Reynir, my JSPs use some Java-Classes. This Java-Classes are positioned in WEB-INF/classes. Normally Tomcat compiles this classes by his own. But if I do some changes in *.java, Tomcat doesn't check, that *.java has changed and doesn't recompile. That's the problem. To found a solution, I have compiled the changed *.java with javac. The compilation runs without problems. Then, when I run my application I get a ClassDefNotFoundError. Tomcat don't want my self-compiled *.class Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: How to force Tomcat to compile?
Anja, I´ve never heard or used this auto-compiler feature in tomcat. I tried it by inserting a very simple heyworld.java servlet with in my classes directory, and nothing happens, at least it definately does not get compiled. I always use javac to compile everything with in my classes folder, if I'm using javabeans I usually pack'em up into a .jar file and put in the /lib directory. The reloader always sees when a jar or a class file is updated. sorry I cant help. -reynir -Original Message- From: Anja Falkner [mailto:[EMAIL PROTECTED]] Sent: 5. febrúar 2002 19:50 To: Tomcat Users List Subject: Re: How to force Tomcat to compile? Hello Reynir, my JSPs use some Java-Classes. This Java-Classes are positioned in WEB-INF/classes. Normally Tomcat compiles this classes by his own. But if I do some changes in *.java, Tomcat doesn't check, that *.java has changed and doesn't recompile. That's the problem. To found a solution, I have compiled the changed *.java with javac. The compilation runs without problems. Then, when I run my application I get a ClassDefNotFoundError. Tomcat don't want my self-compiled *.class Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: How to force Tomcat to compile?
Hi all, thanks for your help. Now I'm going to try some things. I hope, that self-compiling and restarting Tomcat will do it. Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: How to force Tomcat to compile?
Anja. Your compilation cannot be the problem, Anja. I use only self-compiled classes. I don't even put my source code into Tomcat. Use the manager app to stop and restart your web application, is my suggestion, after you compile. Or, you can stop and start Tomcat. Micael At 07:49 PM 2/5/02 +, you wrote: Hello Reynir, my JSPs use some Java-Classes. This Java-Classes are positioned in WEB-INF/classes. Normally Tomcat compiles this classes by his own. But if I do some changes in *.java, Tomcat doesn't check, that *.java has changed and doesn't recompile. That's the problem. To found a solution, I have compiled the changed *.java with javac. The compilation runs without problems. Then, when I run my application I get a ClassDefNotFoundError. Tomcat don't want my self-compiled *.class Anja -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: How to force Tomcat to compile?
my JSPs use some Java-Classes. This Java-Classes are positioned in WEB-INF/classes. Normally Tomcat compiles this classes by his own. But if I do some changes in *.java, Tomcat doesn't check, that *.java has changed and doesn't recompile. That's the problem. To found a solution, I have compiled the changed *.java with javac. The compilation runs without problems. Then, when I run my application I get a ClassDefNotFoundError. Tomcat don't want my self-compiled *.class I'm confused. I don't think I've ever heard of Tomcat autocompiling .java files for you under the /classes directory. Surely this can't be the case? I'm pretty sure that those have to be compiled manually, and that Tomcat notices the updated .class file from your hand compilation if you have set reloadable=true in the servlet context. For .jsp pages, natuarally Tomcat has to compile those automatically. Someone please enlighten me if I'm incorrect. -- Ian ~~ Ian Duggan[EMAIL PROTECTED] http://www.ianduggan.net -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]