<%@ page contentType="text/html;charSet=GBK" import="java.util.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<c:if test="${param.language == 'en' || param.language == null}">
<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="input" var="inputBundle" />
<fmt:setBundle basename="input" scope="session" />

<html>
<head>
<title>
<fmt:message key="title" />
</title>
</head>
<body bgcolor="white">
<h1>
<fmt:message key="title" />
</h1>
<fmt:message key="select_language" />
<form action="input.jsp">
<c:set var="currLang"
value="${inputBundle.locale.language}" />
<c:choose>
  <c:when test="${currLang == 'en'}">
    <input type="radio" name="language" value="en" checked="checked">
  </c:when>
  <c:otherwise>
    <input type="radio" name="language" value="en">
  </c:otherwise>
</c:choose>
<fmt:message key="english" /><br>
<c:choose>
  <c:when test="${currLang == 'sv'}">
    <input type="radio" name="language" value="sv" checked="checked">
  </c:when>
  <c:otherwise>
    <input type="radio" name="language" value="sv">
  </c:otherwise>
</c:choose>
<fmt:message key="swedish" /><br>
<c:choose>
  <c:when test="${currLang == 'de'}">
    <input type="radio" name="language" value="de" checked="checked">
  </c:when>
  <c:otherwise>
    <input type="radio" name="language" value="de">
  </c:otherwise>
</c:choose>
<fmt:message key="german" /><br>
<p>
<input type="submit"
value="<fmt:message key="new_language" />">
</form>
<form action="process.jsp" method="post">
<fmt:message key="date" /><br>
<br>
<jsp:useBean id="now" class="java.util.Date"/>
<input type="text" name="date">
<fmt:formatDate value="${now}" dateStyle="full" />
<p>
<fmt:message key="number" /><br>
<br>
<input type="text" name="number">
<fmt:formatNumber value="1000.9" pattern="####.00"/>
<p>
<input type="submit"
value="<fmt:message key="submit" />">
</form>
</body>
</html>
