String type = request.getParameter("type");
    type = type == null ? "basic" : type; <c:if test="${type=='basic'}">

</c:if>
这里怎么写的?第2个问题String test = "test";怎样用JSTL,或者el输出 test

解决方案 »

  1.   

    ${empty param.type ? 'basic' : param.type}
      

  2.   

    String test = "test";
    这是后台代码吧,用EL不可以访问的,除非用<%%>
      

  3.   

    1.<c:if test="${type==null}">
    basic
    </c:if>
    <c:if test="${type!=null}">
    ${type}
    </c:if>
    2.${test }
      

  4.   


        <%
        String test = "a";
        %>
    ${test}
    test没有被打印
      

  5.   

    这样就只能<%=test%>了 反正已经在jsp写java代码了
      

  6.   

    param是EL表达式中的隐式对象,
    相当于调用request.getParameter()方法