Can i omit .xml file??? If I don't want to use .xml files, how to solve it? bcoz according the reference book, I have no need to use the .xml file.
Main Topics
Browse All TopicsI m a JSP beginner. When i try out include JSTL into my jsp page(sample from WROX reference) as following, I got this error msg:
type: Exception report
description: The server encountered an internal error () that prevented it from fulfilling this request.
Is the
--------------------------
<%@ taglib uri="http://java.sun.com/j
<html>
<body>
You sent the following request headers:
<p/>
<table border="1">
<tr>
<th>
Header
</th>
<th>
Value
</th>
</tr>
<c:forEach var="entry" item="${header}">
<tr>
<td>
${entry.key}
</td>
<td>
${entry.value}
</td>
</tr>
</c:forEach>
</table>
</body>
</html>
I tried to change the uri from http://java.sun.com/jsp/js
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
this is a special file called a "web.xml" file which sets parameters specific to a web application. most servlet containers require this file. you should definitely learn what it is and how to use it. don't try to skip this part. here is a good reference:
http://developer.java.sun.
JSTL is suppose to be easy to learn. I agree with all "tbone" has posted but there is a bare bones approach. Look at this
http://developer.java.sun.
but it can be even simpler. If you downloaded jakarta-taglibs-standard-1
"To use this distribution with your own web applications, simply copy the JAR
files in the 'lib' directory to your application's WEB-INF/lib directory.
Then, import JSTL into your pages with the following directives:
CORE LIBRARY
EL: <%@ taglib prefix="c" uri="http://java.sun.com/j
.
.
. etc "
There is no need for the newbie to fool around with .tld or .xml files. Yes, your web app will run JSP without a web-xml file. First have fun with JSTL then start dig deeper.
Instead of
><%@ taglib uri="http://java.sun.com/j
did you try
<%@ taglib prefix="c" uri="http://java.sun.com/j
<%@ taglib prefix="c_rt" uri="http://java.sun.com/j
i change <%@ taglib uri="http://java.sun.com/j
Don't use runtime ( c_rt ) tag.
Use <%@ taglib prefix="c" uri="http://java.sun.com/j
>where did you define header ?
also you can't use EL in template text.
>try this,
<c:forEach var="entry" item="${header}">
<tr>
<td>
<c:out value="${entry.key}"/>
</td>
<td>
<c:out value="${entry.value}"/>
</td>
</tr>
</c:forEach>
Are you using Tomcat ?
Please tell us what you did to install JSTL.
Yah, I m using Tomcat5. I have a RequestHeaders folder under c:\Java\Tomcat5.0\webapps\
Sorry that I reply so late. Actually have not much error, just change the taglib uri from
<%@ taglib uri="http://java.sun.com/j
<%@ taglib prefix="c" uri="http://java.sun.com/j
<%@ taglib prefix="c_rt" uri="http://java.sun.com/j
<%@ taglib uri="http://java.sun.com/j
<%@ taglib uri="http://java.sun.com/j
<html>
<body>
You sent the following request headers:
<p/>
<table border="1">
<tr>
<th>
Header
</th>
<th>
Value
</th>
</tr>
<c:forEach var="entry" item="${header}">
<tr>
<td>
${entry.key}
</td>
<td>
${entry.value}
</td>
</tr>
</c:forEach>
</table>
</body>
</html>
Business Accounts
Answer for Membership
by: tbone343Posted on 2003-08-07 at 07:28:56ID: 9100142
Go here:
com/pub/ap ache/dist/ jakarta/ ta glibs/stan dard/jakar ta-taglibs -standard- current.zi p
dtds/web-a pp_2.2.dtd ">
b-uri> tld/c.tld< /taglib-lo cation>
http://mirror2.telentente.
download, open the zip, and do the following:
(1) copy everything under standard-1.0.3/lib to your WEB-INF/lib directory
(2) copy everything under tld to your WEB-INF/tld directory
(3) edit your web.xml file to include:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Sun Public License Notice
The contents of this file are subject to the Sun Public License
Version 1.0 (the "License"). You may not use this file except in
compliance with the License. A copy of the License is available at
http://www.sun.com/
The Original Code is NetBeans. The Initial Developer of the Original
Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
Microsystems, Inc. All Rights Reserved.
-->
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/
<web-app>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
<welcome-file>
index.html
</welcome-file>
<welcome-file>
index.htm
</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/jstl-c</tagli
<taglib-location>/WEB-INF/
</taglib>
</web-app>
(4) change your first line in your JSP to:
<%@ taglib uri="/jstl-c" prefix="c" %>