I did what you asked me, and the files did get included, but it doesn't tell me much.
To try an clear what I am trying to do:
I want this url:
http://localhost:8080/xsql/tek/advanced_section_result.jsp?opn=1&PCS=0AC10A&PCS=AAC10A
To do this:
(info 1)
<jsp:include page="advanced_result_PCS.xsql" flush="true">
<jsp:param name="opn" value="1"/>
<jsp:param name="PCS" value="AC10A"/>
<jsp:param name="PCSR" value="0"/>
</jsp:include>
<jsp:include page="advanced_result_PCS.xsql" flush="true">
<jsp:param name="opn" value="1"/>
<jsp:param name="PCS" value="AC10A"/>
<jsp:param name="PCSR" value="A"/>
</jsp:include>
By doing so:
(info 2)
<%@ page import="java.util.*" %>
<%
String opn = request.getParameter("opn");
Enumeration paramNames = request.getParameterNames();
while(paramNames.hasMoreElements()) {
String paramName = (String)paramNames.nextElement();
String[] paramValues = request.getParameterValues(paramName);
if (paramValues.length == 1) {
String paramValue = paramValues[0];
if (paramValue.length() == 0) {
%>error<%
}
} else {
for(int i=0; i<paramValues.length; i++) {
int length = paramValues[i].length();
String fil = "advanced_result_" + paramName + ".xsql";
%>
<jsp:include page="<%= fil %>" flush="true">
<jsp:param name="opn" value="<%= opn %>"/>
<jsp:param name="<%= paramName %>" value="<%=
paramValues[i].substring(1,length) %>"/>
<jsp:param name="<%= paramName %>R" value="<%=
paramValues[i].substring(0,1) %>"/>
</jsp:include>
<%
}
}
} %>
This gets me an error. If i type in "info 1" it works perfectly, but when i try to do
"info 2" gives me an error.
What to do?
Terje
<snip>
---------- Original Message ----------------------------------
From: Ralph Einfeldt <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Wed, 30 May 2001 10:31:00 +0200
>Are there no log messages from tomcat ?
>
>How do you know that the <jsp:include ../> is not working?
>It might be working and the error is in the included page.
>
>To verify that, you could strip down the included page
>to something like:
><%
> log(this.getClass().getName() + ": I'm included");
>%>
</snip>