• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class in work directory

 
hong zhang
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
hong zhang
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, what is the scope of your bean?
regds.
- satya
 
hong zhang
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic