aspose file tools*
The moose likes Servlets and the fly likes class in work directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "class in work directory" Watch "class in work directory" New topic
Author

class in work directory

hong zhang
Ranch Hand

Joined: Jun 07, 2001
Posts: 30
Hi,
I'm using tomcat 4.0. and everytime I made some changes in JSP, it would not reflect, because of the classes files created in work/localhost directory. I have to delete the class file, then the JSP will show the changes made. Any way I can override this? Any ideas will be appreciated. Thanks in advance.
Hong
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Is the JSP you changed the TOP level JSP or
does it get included in another JSP (which
you haven't changed)?
You may already know this, but...
If it is a TOP level JSP then this is a problem,
but if it is included in another JSP which is
not changed, then it is the expected behavior.
regds.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
hong zhang
Ranch Hand

Joined: Jun 07, 2001
Posts: 30
Thanks for your response.
This is the only JSP file with a JavaBean. The bean class was created in the work directory the first time run JSP. Then I have to manually deleted that class to let any changes made to the JSP. Is that normal, or is that default? Can I override that?
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
well, what is the scope of your bean?
regds.
- satya
hong zhang
Ranch Hand

Joined: Jun 07, 2001
Posts: 30
I'm using the book examples. The Java bean and JSP are:
package com.wrox.projsp.ch09;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class HelloUser extends TagSupport {
private String username = "";
public String getUsername() {
return this.username;
}
public void setUsername(String newUsername) {
this.username = newUsername;
}
public int doStartTag() throws JspException {
try {
pageContext.getOut().print("Hello " + this.getUsername() + "!");
} catch (Exception ioException) {
System.err.println("IO Exception thrown in HelloUser.doStartTag():");
System.err.println(ioException.toString());
throw new JspException(ioException);
}
return SKIP_BODY;
}
}
<!-- HelloUser.jsp -->
<%@ page errorPage="error.jsp" %>
<HTML>
<HEAD>
<TITLE>Hello User Example</TITLE>
</HEAD>
<BODY>
<%@ taglib uri="/helloworldtags.tld" prefix="chap09" %>
<% String user = "Homer"; %>
<chap09:hellouser username="<%=user%>"/>
</BODY>
</HTML>
Thanks,
Hong
 
 
subject: class in work directory