File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Problem using core tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem using core tags" Watch "Problem using core tags" New topic

Problem using core tags

Indira Raghavan

Joined: Jul 06, 2004
Posts: 1

I am new to JSP.
I am running Tomcat5.0.25. I have a particular problem when I try to execute an example from a tutorial that uses JSTL core taglib.

The jsp file is :

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="" prefix="c" %>
<%@ taglib uri="/WEB-INF/functions.tld" prefix="f" %>
<head><title>Localized Dates</title></head>
<body bgcolor="white">

<jsp:useBean id="locales" scope="application" class="mypkg.MyLocales"/>

<form name="localeForm" action="index.jsp" method="post">
<c:set var="selectedLocaleString" value="${param.locale}" />
<c:set var="selectedFlag" value="${!empty selectedLocaleString}" />
<select name=localeNames>
<c:forEach var="localeString" items="${locales.localeNames}" >
<c:when test="${selectedFlag}">
<c:when test="${f:equals(selectedLocaleString,localeString)}" >
<option selected>${localeString}</option>
<c therwise>
</c therwise>
<c therwise>
</c therwise>
<input type="submit" name="Submit" value="Get Date">

<c:if test="${selectedFlag}" >
<jsp:setProperty name="locales" property="selectedLocaleString" value="${selectedLocaleString}" />
<jsp:useBean id="date" class="mypkg.MyDate"/>
<jsp:setProperty name="date" property="locale" value="${locales.selectedLocale}"/>
<b>Date: </b>${}


The class files used are placed in the WEB-INF\classes\mypkg folder.
The web.xml in my context has the following content :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

And I have obtained JSTL.jar, standard.jar and the tld files from jakarta-taglibs-standard-1.1.0 and placed them in their respective folders.

But, when the JSP executes, it does not populate the dropdown list with the locale names.

Any solutions to make this work would be of great help.

I agree. Here's the link:
subject: Problem using core tags
It's not a secret anymore!