tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terje Kristensen <Terje.Kristen...@igroup.no>
Subject Why doesn't this work:
Date Wed, 30 May 2001 07:30:10 GMT
Could anyone tell my why the <jsp:include doesn't work? I'm getting an 500
error. 

<% 
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 +
".jsp";
			 %>
			 	<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>
<%
		}
	}
} %>


If I remove the < in jsp:include, the text comes out all perfect: 

jsp:include page="advanced_result_PCS.jsp" flush="true">
	jsp:param name="opn" value="3"/>
	jsp:param name="PCS" value="AC10A"/>
	jsp:param name="PCSR" value="A"/>
/jsp:include>

jsp:include page="advanced_result_PCS.jsp" flush="true">
	jsp:param name="opn" value="3"/>
	jsp:param name="PCS" value="AC20A"/>
	jsp:param name="PCSR" value="A"/>
/jsp:include>

Thanks, 

Terje K.

Mime
View raw message