jstl删除session,choose,动态获取request当前工程路径

时间:2014-05-25 15:34:13   收藏:0   阅读:307
1.jstl标签c:remove删除session

request.getSession().setAttribute("ssmsg", "修改成功");

<c:remove var="ssmsg" scope="session" />   

 

2.jstl标签choose说明

bubuko.com,布布扣
<c:choose>
                <c:when test="${c.activityType==0}">
                    <td><a href="${c.accessUrl}${c.id}" target="_blank">预览</a></td>
                </c:when>
                <c:otherwise>
                    <td>-</td>
                </c:otherwise>
            </c:choose>
bubuko.com,布布扣

 

3.动态获取request当前工程路径

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/";
//            activity.setAccessUrl( SysConf.APP_SERVER_ADDR + "activity/look/" );
            activity.setAccessUrl( basePath + "activity/look/" );

 

 

jstl删除session,choose,动态获取request当前工程路径,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!