Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

java.sun.com/jsp/jstl/core cannot be resolved

843838Feb 2 2007 — edited Feb 5 2007
Hi All Gurus,

I am using Struts 1.2.9, Java 1.5.
I develop application with BetBeans 5.5 and make it .war and deploy it on Tomcat 5 which has virtual hosting.

There are all .jar file in WEB-INF/lib including struts.jar, jstl.jar, standard.jar and etc.
And there are all .tld files including struts-bean.tld, struts-config.tld and etc.
Every tagli-uri and taglib-location is mentioned in web.xml.

First time, I got an error - /WEB-INF/struts-bean.tld not found.
I fixed it by changing taglib path to ../WEB/INF/struts-bean in jsp file.
The first question is that why I have to use relative path for the taglib path. I am not user what I did is right.

Second, after fixing taglib path by doing 'not-sure' solution,
I got an another error that I do not understand as well.

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

When I run on localhost, there is no problem.
But I deply it on remote tomcat5 and get errors.

Do any guru have an idea?
I put segement of web.xml and .jsp down below.

If you need more information to solve problem, I will post more.

Thanks in advance.
Sean


- web.xml -
<jsp-config>
<taglib>

<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
</jsp-config>


- *.jsp -
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ page language="java" %>
<%@ taglib uri="../WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="../WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="../WEB-INF/struts-logic.tld" prefix="logic" %>

<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html:html locale="true">
<head>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2007
Added on Feb 2 2007
7 comments
769 views