This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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
posted
0
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
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
posted
0
well, what is the scope of your bean? regds. - satya
hong zhang
Ranch Hand
Joined: Jun 07, 2001
Posts: 30
posted
0
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