This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I have 2 jsp files where one is included in the other: MAIN FILE: Test1.jsp
Included File aramRequest.jsp
When these codes are parsed, the resulting java files are as follows: Test1_jsp.java
What I find interesting here is that part of the jsp code (starting from line Attributes in this Request:) that was in the included file[i]paramRequest.jsp[i] was not in its final generated java code, but instead can only be found in the generated main java file. My question now is what made these lines different from the rest? For your information I am using Tomcat 5.x. Thanks. Al
In Test1.jsp you have included ParamRequest.jsp statically and not dynamically, Hence all the generated code of ParamRequest.jsp is included in the generated java file for Test1.jsp. If instead of <%@ include file="/paramRequest.jsp"%> you use <jsp:include page="/paramRequest.jsp"/> result will be different.
Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Joined: May 30, 2003
Hi Prakash, But what I am wondering is why only part of ParamRequest.jsp is generated in the intermediate file ParamRequest_jsp.java. If you take a look at the file ParamRequest.jsp, you will notice that the following codes are NOT in the ParamRequest_jsp.java.
Instead, they appeared in the Test1_jsp.java ONLY. So why did the intermediate code ParamRequest_jsp.java ignored these lines? [ February 24, 2004: Message edited by: Alton Hernandez ]