当前位置: 代码迷 >> Java Web开发 >> jsp标准标签使用的问题
  详细解决方案

jsp标准标签使用的问题

热度:204   发布时间:2006-09-22 17:21:44.0
jsp标准标签使用的问题

程序清单如下:
<%@ page contentType="text/html;charset=gb2312" %>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<c:if test="${param.language=='zh' || param.language==null }">
<fmt:setLocale value="zh" scope="session"/>
</c:if>
<c:if test="${param.language=='en'}">
<fmt:setLocale value="en" scope="session"/>
</c:if>
<c:if test="${param.language=='sv'}">
<fmt:setLocale value="sv" scope="session"/>
</c:if>
<c:if test="${param.language=='de'}">
<fmt:setLocale value="de" scope="session"/>
</c:if>
<fmt:setBundle basename="labels" scope="session"/>

<html>
<head>
<title>
<fmt:message key="title"/>
</title>
</head>
<body bgcolor="white">
<h1>
<fmt:message key="select_language">
</fmt:message>
</h1>
<form action="jsp1.jsp" method="get">
<p>
<c:set var="currlang" value="${pagesBundle.locale.language}"/>
<input type="radio" name="language" value="zh"/>
<c:if test="${currlang=='zh'}">checked</c:if>
<fmt:message key="chinese">
</fmt:message>
<br />

<input type="radio" name="language" value="en"/>
<c:if test="${currlang=='en'}">checked</c:if>
<fmt:message key="english">
</fmt:message>
<br />

<input type="radio" name="language" value="sv"/>
<c:if test="${currlang=='sv'}">checked</c:if>
<fmt:message key="swedish">
</fmt:message>
<br />

<input type="radio" name="language" value="de"/>
<c:if test="${currlang=='de'}">checked</c:if>
<fmt:message key="german">
</fmt:message>
<br />
</p>
<input type="submit" value="<fmt:message key="new_language"/>">
</form>
</body>
</html>

请问红色部分文字的含义是什么?

搜索更多相关主题的帖子: jsp  java  target  taglib  

----------------解决方案--------------------------------------------------------

为何将红色部分值输出结果为空呢?请知道的朋友告诉一下,谢谢!


----------------解决方案--------------------------------------------------------

没人知道吗?


----------------解决方案--------------------------------------------------------
读你本地的语言设置环境
----------------解决方案--------------------------------------------------------
  相关解决方案