• Post Reply Bookmark Topic Watch Topic
  • New Topic

jstl code problem  RSS feed

 
Michael Changarovi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello forum,

I am new to JSTL and I am having problems with code segments like the one bellow. The code uses resource bundles. If I remove the lines marked with an asterisk (*) the code runs (but it does not show strings from the bundles (because the fmt:bundle is removed). Instead strings with questiomarks and the keys are shown like ???[key]???. If i use the *sked lines the screen turns white as if nothing I printed. I am using Oracle10g Application server and Java 1.4 sdk. I cannot see the error where adding these two lines..

Could you point out the errors?

Thanks in advance,

Michael



<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

<%@ page language="Java" contentType="text/html;charset=utf-8" import="java.*, java.util.Enumeration"%>

<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<c:set var="sessionlang" value="${sessionScope.lang}"/>
<c:if test="${sessionlang!=null}">
<fmt:setLocale value="${sessionlang}"/>
</c:if>
<c:if test="${sessionlang==null}">
<c:redirect url="/index.jsp"/>
</c:if>

* <fmt:bundle basename="sup">
* <title><fmt:message key="l6"/></title>
<%@ include file="../Common/def.css" %>
</head>

<body>
...
<fmt:message key="..."/>
...
</body>

</fmt:bundle>
</html>
 
Yu Tao
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>


http://jakarta.apache.org/taglibs/index.html

finding you need JAR and put these JAR on you /WEB-INF/lib

Maybe is OK!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!