Tomcat 5.5.12: Output unchanged when servlet changes



Hello,
I have recently started to teach myself web programming. ON my system
(Win2K, Java SDK 1.4.2_08) I have installed the lates version of Tomcat
(5.512) and the compatibilty package. I have placed a file
"tableTest.jsp" in a "tabletest" subdirectory of my webapps folder with
the following content:
//tableTest.jsp
<jsp:useBean id="testtable" class="testBeans.MyTestTable">
<jsp:setProperty name="testtable" property="rowNumber" value="120"/>
<jsp:setProperty name="testtable" property="colNumber" value="4"/>
</jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>Table Test</title>
</head>
<body>
<jsp:getProperty name="testtable" property="tableString"/>
</body>
</html>
In "WEB-INF/classes" I have a file "MyTestTable.java" with the
following content:
//MyTableTest.java
package testBeans;
public class MyTestTable
{
private int rowNumber = 1;
private int colNumber = 1;
private String tableString;
public String getTableString()
{
StringBuffer table = new StringBuffer();
table.append("<table>");
for (int r=0;r<rowNumber;r++){
table.append("<tr>");
for (int c=0;c<colNumber;c++){
table.append("<td>Cell value");
table.append(r+1);
table.append("-");
table.append(c+1);
table.append("</td>");
}
table.append("</tr>");
}
table.append("</table>");
return table.toString();
}
public void setColNumber(int colNumber)
{
this.colNumber = colNumber;
}
public void setRowNumber(int rowNumber)
{
this.rowNumber = rowNumber;
}
}
When I request "tabletest/tableTest.jsp" I see the expected table. When
I edit the jsp to get a different row number, I see the changes afte
reloading. When I edit the "MyTestTable.java", recompile it, delete the
servlet and the sourcecode from the
"work/Catalina/localhost/tabletest/org/apache/jsp", clear the browser
cache (I use Firefox 1.5beta) directory and then realod the page,
nothing changes. I can see from the timestamps that both the
MyTestTable.class and the servlet class have been freshly generated,
but I have to shutdown and restart Tomcat before I see the changes. How
is that possible? Is there an internal Tomcat "class caching"
mechanism?
The web.xml file in the WEB-INF folder is empty (i. e. the "web-app"
tag is empty).
Any pointers are appreciated.
Thanks in advance, Piet

.



Relevant Pages

  • Re: Problem with embedded Tomcat and JSP compilation.
    ... Jasper uses the Ant <javac> task to invoke javac. ... > Tomcat starts well, but is not able to compile JSP page. ... It looks like a classpath ... > public void startTomcat() throws Exception ...
    (comp.lang.java.programmer)
  • Weird Problem in using MouseListener
    ... public class MouseInputTester extends java.applet.Applet { ... private int mouseX; ... public void mousePressed{ ... paint, ...
    (comp.lang.java)
  • Weird Problem in using MouseListener
    ... public class MouseInputTester extends java.applet.Applet { ... private int mouseX; ... public void mousePressed{ ... paint, ...
    (comp.lang.java.programmer)
  • Re: Multi-Threading problem
    ... private int seconds=0; ... private void secondsThread() { ... final MyClock myClock=new MyClock; ... public void run ...
    (comp.lang.java.programmer)
  • JNDI problem in Tomcat
    ... what I've done is to use the Tomcat administration web ... My Configuration: ... public void setName ...
    (comp.lang.java.databases)