D
Dag Sunde
I have Tomcat 5.5.20 and jakarta-taglibs-standard-1.1.2
I try to use the form: "<fmt:message key="tittel"/>" in a JSP page,
but it shows up as: "???tittel???"
I've copied the jstl .jar files to my WEB-INF/lib directory, and fmt.tld &
c.tld
to the WEB-INF directory.
I have updated the web.xml file with the following:
<jsp-config>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
</jsp-config>
My .jsp file looks like this:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
<link rel="stylesheet" type="text/css"href="styles/fotoproto.css"
media="screen" />
</head>
<body>
<fmt:setBundle basename="labels"/>
<div style="text-align: center;">
<h1><fmt:message key="tittel"/></h1>
<a href="PictureResult.jsp">Ta bilde!</a>
</div>
</body>
</html>
The content of "labels.properties" id:
tittel=Press the link below to take picture
linklabel=Take picture...
I tried to put my "labels.properties" file in both the
WEB-INF/ and the WEB-INF/lib/ directory, but my
<fmt:message key="tittel"/>
show up as "???tittel???"
Can anybody explain this/help me?
TIA...
I try to use the form: "<fmt:message key="tittel"/>" in a JSP page,
but it shows up as: "???tittel???"
I've copied the jstl .jar files to my WEB-INF/lib directory, and fmt.tld &
c.tld
to the WEB-INF directory.
I have updated the web.xml file with the following:
<jsp-config>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
</jsp-config>
My .jsp file looks like this:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
<link rel="stylesheet" type="text/css"href="styles/fotoproto.css"
media="screen" />
</head>
<body>
<fmt:setBundle basename="labels"/>
<div style="text-align: center;">
<h1><fmt:message key="tittel"/></h1>
<a href="PictureResult.jsp">Ta bilde!</a>
</div>
</body>
</html>
The content of "labels.properties" id:
tittel=Press the link below to take picture
linklabel=Take picture...
I tried to put my "labels.properties" file in both the
WEB-INF/ and the WEB-INF/lib/ directory, but my
<fmt:message key="tittel"/>
show up as "???tittel???"
Can anybody explain this/help me?
TIA...