日期:2014-05-20  浏览次数:20667 次

请各位高手帮忙解决struts问题
struts-config.xml中    
<action-mappings   >
        <action
            attribute= "searchForm "
            input= "/search.jsp "
            name= "searchForm "
            path= "/search "
            scope= "request "
            type= "com.cuisi.action.SearchAction "   >
            <forward   name= "success "   path= "/success.jsp?code=1 "   /> 这里可不可以象这样加参数啊,如果能,我怎么在页面上获得这个参数啊
        </action>


------解决方案--------------------
应该可以加吧,request.getParameter( "code ");试试
------解决方案--------------------
在你的jsp页面中加上
<%String code = request.getParameter( "code ");%>
在页面中直接调用 <%=code%>