• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jstl code problem

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic