日期:2014-05-17  浏览次数:20792 次

Java Web 新手问题,吐血求助各位大侠
大家好!我是一个刚学习Java web 开发的新手,遇到以下问题困扰了很多天,吐血求助!我安装的Tomcat6.0,安装在了F:盘
并且手工建立了一个web项目,没用整合工具,web项目我放在了E盘,目录结构E:/JavaWebApp/test/WEB-INF,
JavaWebApp/test/WEB-INF/web.xml,JavaWebApp/test/WEB-INF/lib,JavaWebApp/test/WEB-INF/lib/jstl.jar,
JavaWebApp/test/WEB-INF/lib/standard.jar, JSP文件我放在了JavaWebApp/test/目录下面,
结果我一运行就报错如下:



我的jsp文件代码如下:
文件名TestTaglib.jsp
<%@ page language="java" contentType="text/html; charset=gb2312" pageEncoding="gb2312" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>JSTL核心标签库</title>
</head>
<body>
JSTL核心标签库输出: <br>
<c:out value="Hello! JSP!"/>
</body>
</html>
如果去掉<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>运行就没问题
但是一加上就报错,但是我把这个jsp文件放在tomcat的webapps下的examples下面就可以正常运行
我的web.xml代码如下
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
</web-app>
我的项目WEN-INF下面明明有web.xml,但是tomcat为什么会报错呢?说找不到呢?
为什么去掉<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>一切都正常了呢?
我的lib下面已经复制了jstl.jar和standard.jar两个包,
Tomcat的server.xml文件代码如下:
<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,