Tomcat 5.5.12: Output unchanged when servlet changes
- From: pit.grinja@xxxxxx
- Date: 27 Nov 2005 05:53:31 -0800
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
.
- Follow-Ups:
- Re: Tomcat 5.5.12: Output unchanged when servlet changes
- From: VisionSet
- Re: Tomcat 5.5.12: Output unchanged when servlet changes
- Prev by Date: Re: Latitude to decimal degrees.
- Next by Date: Re: Tomcat 5.5.12: Output unchanged when servlet changes
- Previous by thread: Latitude to decimal degrees.
- Next by thread: Re: Tomcat 5.5.12: Output unchanged when servlet changes
- Index(es):
Relevant Pages
|