比如:
<%
String name = "zhansan";%>
<jsp:include page="a.jsp?abc=<%=aa%>" flush="true">
            <jsp:param name="name" value="<%=name %>" />
</jsp:include>搜了不少,都说可以,但我这里是不行的,固定的参数倒是可以。

解决方案 »

  1.   

     flush="true"  去掉在接收页面接收试试看 
      

  2.   

    类似这样写写:
    <s:include value="a.jsp">
    <s:param name="name" value="'zhansan'"/>
    </s:include>
      

  3.   

    忙了一下午,没来得及看回复,我的情况是这样子的,我要根据不同类型的参数include不同的jsp页面,我在主的jsp页面里面用<%@include file="/include_page.jsp"%>引入include_page.jsp页面,然后在include_page.jsp页面里作判断进行跳转,我要是在include_page.jsp页面里面像
    <s:include value="a.jsp">
    <s:param name="name" value="'zhansan'"/>
    </s:include>
    这样子写,是没有问题的,a.jsp也能取到参数,但如果我将value="<%=aa%>"这样的动态参数,页面就出不来了,整个面页就提示:
    500 Servlet Exceptionillegal utf8 encoding
      

  4.   

    最后使用这种方式又可以了
    <%
    String id = request.getParameter("id");
    int k = Integer.valueOf(id);
    switch(k){
    case 1:
    %>
    <%@include file="b.jsp" %>
    <%
    break;
    case 2:
    %>
    <%@include file="c.jsp" %>
        <%
    break;
    default:
    %>
    <%@include file="d.jsp" %>
    <%
    }%>