RE: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-20 Thread Cox, Charlie

I am using 4.0.1, so its possible that something may have changed, but see
intermixed.

 -Original Message-
 From: JavaJosh [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 19, 2002 4:08 PM
 To: [EMAIL PROTECTED]
 Subject: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
 
 Hello,
 
 Tomcat 4.0.3 is apparently not reloading a recompiled 
 servlet. According
 to the docs, this should be the default behavior.
 
 Interestingly, it WILL load a new servlet.
 
 I have 2 questions, of the where's my fish sort and of the how do I
 fish sort.
 
 Where's my fish: why isn't Tomcat reloading my changed servlet? I have
 verified that the class file has changed by checking the timestamp, so
 I'm pretty sure it's not a build problem.
 

your context needs to be set to reloadable=true.
I have noticed that it takes one request for Tomcat to realize the servlet
has changed, then the next request picks up the change. Sometimes I have to
wait 30 seconds or so for it to pick up the change(don't know why).

 How do I fish: what is a reasonable way to troubleshoot this problem?
 
A message will appear in the log for your context when the reload is done.
This, of course, is provided that you have a logger for your host in
server.xml

 While I would love to have a fish right now, I am perfectly willing to
 learn how to fish and catch my own.
 
 Some fishing I've already done:
 1) tried restarting tomcat. Picks up the new class!
this is expected. You can also use manager to restart your context. While it
doesn't solve your problem, it is less painful than restarting tomcat.
 2) tried restarting the browser. No go.
you may want to check your browser cache settings(request new version of
page on EVERY access)
 3) examined the tomcat logs. Nothing interesting.
 4) examined the servlet class file in the webapps dir. Yup, it sure
 changed.
 5) tried adding a second servlet. Tomcat picks it up!
 6) tried changing the second servlet. No go.
 
 I *suspect* that in the murky depths of this problem swims an enormous
 caching flounder. Is its name Tomcat 4.0.3? Is it IE 5? Either way, I
 want to hook it, filet it, and have it for dinner tonight.
 
 Thanks for your help,
 Josh Rehman
 
 Here are some more facts for you:
 Hardware: Dell Inspiron 7000 Laptop - P2-366 256M/10G
 OS: MS Windows 2000 (NT5) Professional SP2 1024x768x64k
 Java: Sun J2SE 1.3.1_01 - c:\java\jdk131
 Tomcat: 4.0.3 - c:\java\jakarta-tomcat-4.0.3
   %CATALINA_HOME%\conf\web.xml is stock
   %CATALINA_HOME%\conf\server.xml is stock
 Environment variables: 
   CATALINA_HOME=C:\java\jakarta-tomcat-4.0.3
   JAVA_HOME=c:\java\jdk131_01
   JIKES_HOME=c:\java\jikes114
   ANT_HOME=c:\java\ant14
 Project organization:
   Deploy root: %CATALINA_HOME%\webapps\tomcat40
   \WEB-INF\web.xml
   \WEB-INF\classes\joshbrain\tomcat40\FirstServlet.class
   \WEB-INF\classes\joshbrain\tomcat40\SecondServlet.class
 
 Contents of web.xml:
 !DOCTYPE web-app 
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN 
 http://java.sun.com/dtd/web-app_2_3.dtd;
 
 web-app
 display-nameTomcat 4.0.3 Evaluation Application/display-name
 
 description
   This is version 1.0 of a simple evaluation application 
   written by Josh Rehman ([EMAIL PROTECTED]).
 /description
 
 context-param
   param-namewebmaster/param-name
   param-value[EMAIL PROTECTED]/param-value
   description
 The EMAIL address of the administrator to whom questions
 and comments about this application should be addressed.
   /description
 /context-param
 
 servlet
   servlet-namefirst/servlet-name
   servlet-classjoshbrain.tomcat.FirstServlet/servlet-class
 /servlet
 
 servlet
   servlet-namesecond/servlet-name
   servlet-classjoshbrain.tomcat.SecondServlet/servlet-class
 /servlet
 
 servlet-mapping
   servlet-namefirst/servlet-name
   url-pattern/first/url-pattern
 /servlet-mapping
 
 servlet-mapping
   servlet-namesecond/servlet-name
   url-pattern/second/url-pattern
 /servlet-mapping
 
 session-config
   session-timeout30/session-timeout!-- 30 minutes --
 /session-config
 
 /web-app
 
 Contents of FirstServlet.java (SecondServlet similar):
 /*
  * FirstServlet.java
  *
  * Created on March 18, 2002, 4:56 PM
  */
 
 package joshbrain.tomcat;
 
 import javax.servlet.*;
 import javax.servlet.http.*;
 
 /**
  *
  * @author  Josh Rehman
  * @version
  */
 public class FirstServlet extends HttpServlet
 {
 public void init(ServletConfig config) throws ServletException
 {
 super.init(config);
 
 }
 protected void processRequest(HttpServletRequest request,
 HttpServletResponse response)
 throws ServletException, java.io.IOException
 {
 response.setContentType(text/html);
 java.io.PrintWriter out = response.getWriter();
 out.println(html);
 

RE: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-20 Thread JavaJosh



 -Original Message-
 From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 20, 2002 5:09 AM
 To: 'Tomcat Users List'
 Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
...
 your context needs to be set to reloadable=true.
 I have noticed that it takes one request for Tomcat to realize the
 servlet
 has changed, then the next request picks up the change. Sometimes I
 have to
 wait 30 seconds or so for it to pick up the change(don't know why).
...

Forgive me, but I am not sure what tag to use to set reloadable. I
searched spec and deployment descriptor DTD and came up only with
SRV.3.7 (p.30). Is this a tomcat specific thing?

Thanks,
Josh Rehman


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-20 Thread Ilya Khandamirov

Forgive me, but I am not sure what tag to use to set reloadable

file: %CATALINA_HOME%\conf\server.xml (or
$CATALINA_HOME/conf/server.xml)
tag: Context ...

Regards,
Ilya




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-20 Thread John Roth

In esrver.xml:

Context path=/yourcontextpath docBase=yourdocbase reloadable=true


-Original Message-
From: Ilya Khandamirov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 20, 2002 5:53 PM
To: 'Tomcat Users List'
Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)


Forgive me, but I am not sure what tag to use to set reloadable

file: %CATALINA_HOME%\conf\server.xml (or
$CATALINA_HOME/conf/server.xml)
tag: Context ...

Regards,
Ilya




--
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: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-20 Thread JavaJosh

Thanks. Where is this attribute documented? 

 -Original Message-
 From: John Roth [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 20, 2002 2:59 PM
 To: 'Tomcat Users List'
 Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
 In esrver.xml:
 
 Context path=/yourcontextpath docBase=yourdocbase
 reloadable=true
 
 
 -Original Message-
 From: Ilya Khandamirov [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 20, 2002 5:53 PM
 To: 'Tomcat Users List'
 Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
 
 Forgive me, but I am not sure what tag to use to set reloadable
 
 file: %CATALINA_HOME%\conf\server.xml (or
 $CATALINA_HOME/conf/server.xml)
 tag: Context ...
 
 Regards,
 Ilya
 
 
 
 
 --
 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!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-20 Thread Craig R. McClanahan



On Wed, 20 Mar 2002, JavaJosh wrote:

 Date: Wed, 20 Mar 2002 18:27:41 -0800
 From: JavaJosh [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)

 Thanks. Where is this attribute documented?


Start up Tomcat, and go to:

  http://localhost:8080/tomcat-docs/config/context.html

or look it up online at:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html

Since you're fishing, you might want to peruse the rest of the Tomcat
documentation that is included as well :-).

Craig


  -Original Message-
  From: John Roth [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, March 20, 2002 2:59 PM
  To: 'Tomcat Users List'
  Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
  In esrver.xml:
 
  Context path=/yourcontextpath docBase=yourdocbase
  reloadable=true
 
 
  -Original Message-
  From: Ilya Khandamirov [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, March 20, 2002 5:53 PM
  To: 'Tomcat Users List'
  Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
 
  Forgive me, but I am not sure what tag to use to set reloadable
 
  file: %CATALINA_HOME%\conf\server.xml (or
  $CATALINA_HOME/conf/server.xml)
  tag: Context ...
 
  Regards,
  Ilya
 
 
 
 
  --
  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!?
 Get your free @yahoo.com address at http://mail.yahoo.com


 --
 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: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-20 Thread JavaJosh

Actually Craig, the first thing I did when I downloaded Tomcat was read
the entire documentation tree, taking notes along the way.

Thanks for the link.

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 20, 2002 6:34 PM
 To: Tomcat Users List
 Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
 
 
 On Wed, 20 Mar 2002, JavaJosh wrote:
 
  Date: Wed, 20 Mar 2002 18:27:41 -0800
  From: JavaJosh [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: 'Tomcat Users List' [EMAIL PROTECTED],
   [EMAIL PROTECTED]
  Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
  Thanks. Where is this attribute documented?
 
 
 Start up Tomcat, and go to:
 
   http://localhost:8080/tomcat-docs/config/context.html
 
 or look it up online at:
 
   http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html
 
 Since you're fishing, you might want to peruse the rest of the Tomcat
 documentation that is included as well :-).
 
 Craig
 
 
   -Original Message-
   From: John Roth [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, March 20, 2002 2:59 PM
   To: 'Tomcat Users List'
   Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
  
   In esrver.xml:
  
   Context path=/yourcontextpath docBase=yourdocbase
   reloadable=true
  
  
   -Original Message-
   From: Ilya Khandamirov [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, March 20, 2002 5:53 PM
   To: 'Tomcat Users List'
   Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
  
  
   Forgive me, but I am not sure what tag to use to set reloadable
  
   file: %CATALINA_HOME%\conf\server.xml (or
   $CATALINA_HOME/conf/server.xml)
   tag: Context ...
  
   Regards,
   Ilya
  
  
  
  
   --
   To unsubscribe:   mailto:tomcat-user-
 [EMAIL PROTECTED]
   For additional commands: mailto:tomcat-user-
 [EMAIL PROTECTED]
   Troubles with the list: mailto:tomcat-user-
 [EMAIL PROTECTED]
  
  
   --
   To unsubscribe:   mailto:tomcat-user-
 [EMAIL PROTECTED]
   For additional commands: mailto:tomcat-user-
 [EMAIL PROTECTED]
   Troubles with the list: mailto:tomcat-user-
 [EMAIL PROTECTED]
 
 
  _
  Do You Yahoo!?
  Get your free @yahoo.com address at http://mail.yahoo.com
 
 
  --
  To unsubscribe:   mailto:tomcat-user-
 [EMAIL PROTECTED]
  For additional commands: mailto:tomcat-user-
 [EMAIL PROTECTED]
  Troubles with the list: mailto:tomcat-user-
 [EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-19 Thread Dahnke, Eric


If there is a JSP page either calling the servlet or the servlet includes or
forward to a JSP page, you may want to try to touch *.jsp in the dirs
containing the jsps.

HTH

-Original Message-
From: JavaJosh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 4:08 PM
To: [EMAIL PROTECTED]
Subject: Where's my fish? How do I go fishing? (Tomcat 4.0)


Hello,

Tomcat 4.0.3 is apparently not reloading a recompiled servlet. According
to the docs, this should be the default behavior.

Interestingly, it WILL load a new servlet.

I have 2 questions, of the where's my fish sort and of the how do I
fish sort.

Where's my fish: why isn't Tomcat reloading my changed servlet? I have
verified that the class file has changed by checking the timestamp, so
I'm pretty sure it's not a build problem.

How do I fish: what is a reasonable way to troubleshoot this problem?

While I would love to have a fish right now, I am perfectly willing to
learn how to fish and catch my own.

Some fishing I've already done:
1) tried restarting tomcat. Picks up the new class!
2) tried restarting the browser. No go.
3) examined the tomcat logs. Nothing interesting.
4) examined the servlet class file in the webapps dir. Yup, it sure
changed.
5) tried adding a second servlet. Tomcat picks it up!
6) tried changing the second servlet. No go.

I *suspect* that in the murky depths of this problem swims an enormous
caching flounder. Is its name Tomcat 4.0.3? Is it IE 5? Either way, I
want to hook it, filet it, and have it for dinner tonight.

Thanks for your help,
Josh Rehman

Here are some more facts for you:
Hardware: Dell Inspiron 7000 Laptop - P2-366 256M/10G
OS: MS Windows 2000 (NT5) Professional SP2 1024x768x64k
Java: Sun J2SE 1.3.1_01 - c:\java\jdk131
Tomcat: 4.0.3 - c:\java\jakarta-tomcat-4.0.3
%CATALINA_HOME%\conf\web.xml is stock
%CATALINA_HOME%\conf\server.xml is stock
Environment variables: 
CATALINA_HOME=C:\java\jakarta-tomcat-4.0.3
JAVA_HOME=c:\java\jdk131_01
JIKES_HOME=c:\java\jikes114
ANT_HOME=c:\java\ant14
Project organization:
Deploy root: %CATALINA_HOME%\webapps\tomcat40
\WEB-INF\web.xml
\WEB-INF\classes\joshbrain\tomcat40\FirstServlet.class
\WEB-INF\classes\joshbrain\tomcat40\SecondServlet.class

Contents of web.xml:
!DOCTYPE web-app 
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN 
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
display-nameTomcat 4.0.3 Evaluation Application/display-name

description
  This is version 1.0 of a simple evaluation application 
  written by Josh Rehman ([EMAIL PROTECTED]).
/description

context-param
  param-namewebmaster/param-name
  param-value[EMAIL PROTECTED]/param-value
  description
The EMAIL address of the administrator to whom questions
and comments about this application should be addressed.
  /description
/context-param

servlet
  servlet-namefirst/servlet-name
  servlet-classjoshbrain.tomcat.FirstServlet/servlet-class
/servlet

servlet
  servlet-namesecond/servlet-name
  servlet-classjoshbrain.tomcat.SecondServlet/servlet-class
/servlet

servlet-mapping
  servlet-namefirst/servlet-name
  url-pattern/first/url-pattern
/servlet-mapping

servlet-mapping
  servlet-namesecond/servlet-name
  url-pattern/second/url-pattern
/servlet-mapping

session-config
  session-timeout30/session-timeout!-- 30 minutes --
/session-config

/web-app

Contents of FirstServlet.java (SecondServlet similar):
/*
 * FirstServlet.java
 *
 * Created on March 18, 2002, 4:56 PM
 */

package joshbrain.tomcat;

import javax.servlet.*;
import javax.servlet.http.*;

/**
 *
 * @author  Josh Rehman
 * @version
 */
public class FirstServlet extends HttpServlet
{
public void init(ServletConfig config) throws ServletException
{
super.init(config);

}
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, java.io.IOException
{
response.setContentType(text/html);
java.io.PrintWriter out = response.getWriter();
out.println(html);
out.println(head);
out.println(titleServlet/title);
out.println(/head);
out.println(body);
out.println(bThis is the string that will change!/b);
out.println(/body);
out.println(/html);

out.close();
}

protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException
{
processRequest(request, response);
}

protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, java.io.IOException
{
processRequest(request, response);
}
}

My ant build script:

project name=Tomcat 

Re: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-19 Thread Peter Wieland

Hello,

I just started fishing some weeks ago and I had similar difficulties.

I don't know if there is an elegant way to catch some nice fish, but I can
explain you the way I got it to work. I think it is a problem of Tomcats
caches. (Not really a problem, because once an application is developped,
the servlets won't change very often).

Tomcat has a ${tomcat-home}\work directory, were it keeps many files of wich
I do not really understand very much. But it happens that after I deleted
this directory (or a relevant subpath - for tomcat 3.2 this is something
like work\localhost_8080%2Fmyapplication), my changes to servlets were
visible. Sometimes a simple restart helped, too.

All this fishing experiance was done with Tomcat 3.3 and 3.2 but I think it
should be similar with Tomcat 4.

Have a fine fish meal.

Peter

 Hello,

 Tomcat 4.0.3 is apparently not reloading a recompiled servlet. According
 to the docs, this should be the default behavior.

 Interestingly, it WILL load a new servlet.

 I have 2 questions, of the where's my fish sort and of the how do I
 fish sort.

 Where's my fish: why isn't Tomcat reloading my changed servlet? I have
 verified that the class file has changed by checking the timestamp, so
 I'm pretty sure it's not a build problem.

 How do I fish: what is a reasonable way to troubleshoot this problem?

 While I would love to have a fish right now, I am perfectly willing to
 learn how to fish and catch my own.

 Some fishing I've already done:
 1) tried restarting tomcat. Picks up the new class!
 2) tried restarting the browser. No go.
 3) examined the tomcat logs. Nothing interesting.
 4) examined the servlet class file in the webapps dir. Yup, it sure
 changed.
 5) tried adding a second servlet. Tomcat picks it up!
 6) tried changing the second servlet. No go.

 I *suspect* that in the murky depths of this problem swims an enormous
 caching flounder. Is its name Tomcat 4.0.3? Is it IE 5? Either way, I
 want to hook it, filet it, and have it for dinner tonight.

 Thanks for your help,
 Josh Rehman

 Here are some more facts for you:
 Hardware: Dell Inspiron 7000 Laptop - P2-366 256M/10G
 OS: MS Windows 2000 (NT5) Professional SP2 1024x768x64k
 Java: Sun J2SE 1.3.1_01 - c:\java\jdk131
 Tomcat: 4.0.3 - c:\java\jakarta-tomcat-4.0.3
   %CATALINA_HOME%\conf\web.xml is stock
   %CATALINA_HOME%\conf\server.xml is stock
 Environment variables:
   CATALINA_HOME=C:\java\jakarta-tomcat-4.0.3
   JAVA_HOME=c:\java\jdk131_01
   JIKES_HOME=c:\java\jikes114
   ANT_HOME=c:\java\ant14
 Project organization:
   Deploy root: %CATALINA_HOME%\webapps\tomcat40
   \WEB-INF\web.xml
   \WEB-INF\classes\joshbrain\tomcat40\FirstServlet.class
   \WEB-INF\classes\joshbrain\tomcat40\SecondServlet.class

 Contents of web.xml:
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 display-nameTomcat 4.0.3 Evaluation Application/display-name

 description
   This is version 1.0 of a simple evaluation application
   written by Josh Rehman ([EMAIL PROTECTED]).
 /description

 context-param
   param-namewebmaster/param-name
   param-value[EMAIL PROTECTED]/param-value
   description
 The EMAIL address of the administrator to whom questions
 and comments about this application should be addressed.
   /description
 /context-param

 servlet
   servlet-namefirst/servlet-name
   servlet-classjoshbrain.tomcat.FirstServlet/servlet-class
 /servlet

 servlet
   servlet-namesecond/servlet-name
   servlet-classjoshbrain.tomcat.SecondServlet/servlet-class
 /servlet

 servlet-mapping
   servlet-namefirst/servlet-name
   url-pattern/first/url-pattern
 /servlet-mapping

 servlet-mapping
   servlet-namesecond/servlet-name
   url-pattern/second/url-pattern
 /servlet-mapping

 session-config
   session-timeout30/session-timeout!-- 30 minutes --
 /session-config

 /web-app

 Contents of FirstServlet.java (SecondServlet similar):
 /*
  * FirstServlet.java
  *
  * Created on March 18, 2002, 4:56 PM
  */

 package joshbrain.tomcat;

 import javax.servlet.*;
 import javax.servlet.http.*;

 /**
  *
  * @author  Josh Rehman
  * @version
  */
 public class FirstServlet extends HttpServlet
 {
 public void init(ServletConfig config) throws ServletException
 {
 super.init(config);

 }
 protected void processRequest(HttpServletRequest request,
 HttpServletResponse response)
 throws ServletException, java.io.IOException
 {
 response.setContentType(text/html);
 java.io.PrintWriter out = response.getWriter();
 out.println(html);
 out.println(head);
 out.println(titleServlet/title);
 out.println(/head);
 out.println(body);
 out.println(bThis is the string that will 

RE: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-19 Thread JavaJosh

Nope, no JSP. Just a plain old servlet.

 -Original Message-
 From: Dahnke, Eric [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 19, 2002 2:31 PM
 To: 'Tomcat Users List'
 Subject: RE: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
 
 If there is a JSP page either calling the servlet or the servlet
 includes or
 forward to a JSP page, you may want to try to touch *.jsp in the dirs
 containing the jsps.
 
 HTH


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-19 Thread JavaJosh

Yes, I have seen that work directory. I may start fishing in those
waters.

I suspect that my own servlets will change fairly often, so dynamic
reload is very important to me. I would not be satisfied accepting that
this is the one that got away.

 -Original Message-
 From: Peter Wieland [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 19, 2002 2:47 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Where's my fish? How do I go fishing? (Tomcat 4.0)
 
 Hello,
 
 I just started fishing some weeks ago and I had similar difficulties.
 
 I don't know if there is an elegant way to catch some nice fish, but I
 can
 explain you the way I got it to work. I think it is a problem of
 Tomcats
 caches. (Not really a problem, because once an application is
 developped,
 the servlets won't change very often).
 
 Tomcat has a ${tomcat-home}\work directory, were it keeps many files
 of wich
 I do not really understand very much. But it happens that after I
 deleted
 this directory (or a relevant subpath - for tomcat 3.2 this is
 something
 like work\localhost_8080%2Fmyapplication), my changes to servlets were
 visible. Sometimes a simple restart helped, too.
 
 All this fishing experiance was done with Tomcat 3.3 and 3.2 but I
 think it
 should be similar with Tomcat 4.
 
 Have a fine fish meal.
 
 Peter
 
  Hello,
 
  Tomcat 4.0.3 is apparently not reloading a recompiled servlet.
 According
  to the docs, this should be the default behavior.
 
  Interestingly, it WILL load a new servlet.
 
  I have 2 questions, of the where's my fish sort and of the how do
 I
  fish sort.
 
  Where's my fish: why isn't Tomcat reloading my changed servlet? I
 have
  verified that the class file has changed by checking the timestamp,
 so
  I'm pretty sure it's not a build problem.
 
  How do I fish: what is a reasonable way to troubleshoot this
 problem?
 
  While I would love to have a fish right now, I am perfectly willing
 to
  learn how to fish and catch my own.
 
  Some fishing I've already done:
  1) tried restarting tomcat. Picks up the new class!
  2) tried restarting the browser. No go.
  3) examined the tomcat logs. Nothing interesting.
  4) examined the servlet class file in the webapps dir. Yup, it sure
  changed.
  5) tried adding a second servlet. Tomcat picks it up!
  6) tried changing the second servlet. No go.
 
  I *suspect* that in the murky depths of this problem swims an
 enormous
  caching flounder. Is its name Tomcat 4.0.3? Is it IE 5? Either way,
 I
  want to hook it, filet it, and have it for dinner tonight.
 
  Thanks for your help,
  Josh Rehman
 
  Here are some more facts for you:
  Hardware: Dell Inspiron 7000 Laptop - P2-366 256M/10G
  OS: MS Windows 2000 (NT5) Professional SP2 1024x768x64k
  Java: Sun J2SE 1.3.1_01 - c:\java\jdk131
  Tomcat: 4.0.3 - c:\java\jakarta-tomcat-4.0.3
  %CATALINA_HOME%\conf\web.xml is stock
  %CATALINA_HOME%\conf\server.xml is stock
  Environment variables:
  CATALINA_HOME=C:\java\jakarta-tomcat-4.0.3
  JAVA_HOME=c:\java\jdk131_01
  JIKES_HOME=c:\java\jikes114
  ANT_HOME=c:\java\ant14
  Project organization:
  Deploy root: %CATALINA_HOME%\webapps\tomcat40
  \WEB-INF\web.xml
  \WEB-INF\classes\joshbrain\tomcat40\FirstServlet.class
  \WEB-INF\classes\joshbrain\tomcat40\SecondServlet.class
 
  Contents of web.xml:
  !DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
 
  web-app
  display-nameTomcat 4.0.3 Evaluation Application/display-name
 
  description
This is version 1.0 of a simple evaluation application
written by Josh Rehman ([EMAIL PROTECTED]).
  /description
 
  context-param
param-namewebmaster/param-name
param-value[EMAIL PROTECTED]/param-value
description
  The EMAIL address of the administrator to whom questions
  and comments about this application should be addressed.
/description
  /context-param
 
  servlet
servlet-namefirst/servlet-name
servlet-classjoshbrain.tomcat.FirstServlet/servlet-class
  /servlet
 
  servlet
servlet-namesecond/servlet-name
servlet-classjoshbrain.tomcat.SecondServlet/servlet-class
  /servlet
 
  servlet-mapping
servlet-namefirst/servlet-name
url-pattern/first/url-pattern
  /servlet-mapping
 
  servlet-mapping
servlet-namesecond/servlet-name
url-pattern/second/url-pattern
  /servlet-mapping
 
  session-config
session-timeout30/session-timeout!-- 30 minutes --
  /session-config
 
  /web-app
 
  Contents of FirstServlet.java (SecondServlet similar):
  /*
   * FirstServlet.java
   *
   * Created on March 18, 2002, 4:56 PM
   */
 
  package joshbrain.tomcat;
 
  import javax.servlet.*;
  import javax.servlet.http.*;
 
  /**
   *
   * @author  Josh Rehman
   * @version
   */
  public class FirstServlet extends

Re: Where's my fish? How do I go fishing? (Tomcat 4.0)

2002-03-19 Thread Joel Rees

JavaJosh wrote (about the cache getting stale):

 Nope, no JSP. Just a plain old servlet.

I think this is a known issue, and I think there is even a tool for forcing
the cache to pick up your changes.

It's really difficult to trace dependencies through a program without
executing it. That is why there seems to be a wall there.

Joel Rees
Alps Giken Kansai Systems Develoment
Suita, Osaka




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]