You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Ken M. Mevand" <ge...@yahoo.com> on 2001/11/13 05:54:36 UTC
Caching of Classes
hi,
this question has probably been asked a lot, but i can't seem to find the
answer.
how do i get tomcat to reload the classes without restarting it? my
classes are stored in /WEB-INF/classes and compiled manually by javac.
thanks for the patience, i'm very new to tomcat.
-ken
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Caching of Classes
Posted by Bo Xu <bo...@cybershop.ca>.
----- Original Message -----
From: "Ken M. Mevand" <ge...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Monday, November 12, 2001 11:54 PM
Subject: Caching of Classes
> hi,
>
> this question has probably been asked a lot, but i can't seem to find the
> answer.
>
> how do i get tomcat to reload the classes without restarting it? my
> classes are stored in /WEB-INF/classes and compiled manually by javac.
>
> thanks for the patience, i'm very new to tomcat.
>
>
> -ken
>[...]
with TC4.0, one way is use the "manager" mentioned in another email,
the doc is here:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html
in "Administrators", there are several "HOW-TO", click Manager App
HOW-TO:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html
another way is "auto-reloading", for ex., in conf/server.xml, in the
"context defination/declarition" for the webapp named "examples":
<Context path="/examples" docBase="examples" debug="0"
reloadable="true">
^^^^^^^^^^^^^^
then if the old-version of MyServlet has already been invoked, and you
updated
its class(a file), then after a while, MyServlet will be reloaded, and its
init(...)
method will be invoked again automaticaly(by container)
Bo
Nov.13, 2001
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Filters in Tomcat
Posted by "Craig R. McClanahan" <cr...@apache.org>.
Are you running on a Windows platform? If so, you need to remember that
output to the log files is buffered until they are closed.
Craig
On Mon, 12 Nov 2001, BacardiWasabi wrote:
> Date: Mon, 12 Nov 2001 21:06:40 -0800 (PST)
> From: BacardiWasabi <se...@yahoo.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Filters in Tomcat
>
> Below code not working... why?
>
>
> package filters;
>
> import java.io.*;
> import java.util.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
>
> public final class FilterServlet implements Filter {
>
> private FilterConfig filterConfig = null;
> public void destroy() {
> this.filterConfig = null;
> }
>
> public void doFilter(ServletRequest req ,
> ServletResponse resp , FilterChain fchain) throws
> IOException , ServletException {
> if (!req.isSecure()){
> System.out.println("inside filter....");
> fchain.doFilter(req , resp);
> }else {
> System.out.println("sfasfdsdfaf");
> }
> }
> public void init(FilterConfig config) throws
> ServletException{
> }
>
> }
>
>
> my web.xml
>
> <filter>
> <filter-name>Secure</filter-name>
> <filter-class>filters.FilterServlet</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>Secure</filter-name>
> <url-pattern>*.jsp</url-pattern>
> </filter-mapping>
>
> when i try to access say a.jsp - I dont see any output
> from doFilter in stdout.log
>
> Any help? ;-)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
>
> --
> To unsubscribe: <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Filters in Tomcat
Posted by BacardiWasabi <se...@yahoo.com>.
Below code not working... why?
package filters;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public final class FilterServlet implements Filter {
private FilterConfig filterConfig = null;
public void destroy() {
this.filterConfig = null;
}
public void doFilter(ServletRequest req ,
ServletResponse resp , FilterChain fchain) throws
IOException , ServletException {
if (!req.isSecure()){
System.out.println("inside filter....");
fchain.doFilter(req , resp);
}else {
System.out.println("sfasfdsdfaf");
}
}
public void init(FilterConfig config) throws
ServletException{
}
}
my web.xml
<filter>
<filter-name>Secure</filter-name>
<filter-class>filters.FilterServlet</filter-class>
</filter>
<filter-mapping>
<filter-name>Secure</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
when i try to access say a.jsp - I dont see any output
from doFilter in stdout.log
Any help? ;-)
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Caching of Classes
Posted by BacardiWasabi <se...@yahoo.com>.
try this..
for context - attribute
reloadable Set this attribute to true if you wish to
have Catalina check the classes in WEB-INF/classes and
WEB-INF/lib for modification, and automatically reload
this application if a change is detected. This feature
is very useful during development; however, it
requires significant runtime overhead so it is not
recommended for production deployment scenarios.
--- "Ken M. Mevand" <ge...@yahoo.com> wrote:
> hi,
>
> this question has probably been asked a lot, but i
> can't seem to find the
> answer.
>
> how do i get tomcat to reload the classes without
> restarting it? my
> classes are stored in /WEB-INF/classes and compiled
> manually by javac.
>
> thanks for the patience, i'm very new to tomcat.
>
>
> -ken
>
>
>
>
>
_________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at
> http://mail.yahoo.com
>
>
> --
> To unsubscribe:
> <ma...@jakarta.apache.org>
> For additional commands:
> <ma...@jakarta.apache.org>
> Troubles with the list:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>