This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes jstl code problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "jstl code problem" Watch "jstl code problem" New topic
Author

jstl code problem

Michael Changarovi
Greenhorn

Joined: Jan 25, 2005
Posts: 8
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

Joined: Dec 12, 2004
Posts: 28
<%@ 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!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: jstl code problem
 
Similar Threads
web container displaying jsp intead of html
Problem with localization (MyFaces and JSTL)
If-Else In JSTL
Internationalization of web service
fmt tag not working in error page