安装jstl中的web.xml配置问题
2008-02-23 09:24:59来源:互联网 阅读 ()
到http://apache.towardex.com/jakarta/taglibs/standard/下载了最新的jstl,然后把standard.jar和jstl.jar文件拷贝到\Web-INF\lib\下,\tld\下的8个tld类型文件拷到"\WEB-INF\"下。
接下来配置web.XML文件,这里我就有些糊涂了。
下面这个是《JSP设计》的web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com//dtd/web-app_2_3.dtd">
<web-app>
<!-- Used by the JSTL I18N actions -->
<context-param>
<param-name>
Javax.Servlet.jsp.jstl.fmt.fallbackLocale
</param-name>
<param-value>
en
</param-value>
</context-param>
<!-- Used by the JSTL database actions -->
<context-param>
<param-name>
javax.servlet.jsp.jstl.sql.dataSource
</param-name>
<param-value>
JDBC:MySQL:///test,org.gjt.mm.mysql.Driver
</param-value>
</context-param>
<!-- Used by the ResourceManagerListener in Chapter 18 -->
<context-param>
<param-name>driverClass</param-name>
<param-value>
org.gjt.mm.mysql.Driver
</param-value>
</context-param>
<context-param>
<param-name>jdbcURL</param-name>
<param-value>
jdbc:mysql:///test
</param-value>
</context-param>
<!-- Filter and listener configurations for Chapter 18 -->
<filter>
<filter-name>AccessControl</filter-name>
<filter-class>
com.ora.jsp.servlets.AccessControlFilter
</filter-class>
<init-param>
<param-name>loginPage</param-name>
<param-value>/ch18/login.jsp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>accessControl</filter-name>
<url-pattern>/ch18/protected/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
com.ora.jsp.servlets.ResourceManagerListener
</listener-class>
</listener>
<listener>
<listener-class>
com.ora.jsp.servlets.SessionCounterListener
</listener-class>
</listener>
<!-- Servlet for showing JSP source. NOTE! Remove this in production -->
<servlet>
<servlet-name>jspSource</servlet-name>
<servlet-class>JSPSourceServlet</servlet-class>
</servlet>
<!--
Servlet for handling both servlet and JSP errors, see Chapter 18
-->
<servlet>
<servlet-name>errorDispatcher</servlet-name>
<servlet-class>com.ora.jsp.servlets.ErrorDispatcherServlet</servlet-class>
<init-param>
<param-name>errorPage</param-name>
<param-value>/ch9/errorpage.jsp?debug=resp</param-value>
</init-param>
</servlet>
<!-- Struts Controller servlet, see Chapter 18 -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jspSource</servlet-name>
<url-pattern>/jspSource/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>errorDispatcher</servlet-name>
<url-pattern>/errorDispatcher</url-pattern>
</servlet-mapping>
<!-- Struts Controller servlet mapping, see Chapter 18 -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!--
Uncomment if you want all exceptions and 500 status codes to
be handled by the customized error page.
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/errorDispatcher</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/errorDispatcher</location>
</error-page>
-->
<!--
This resource reference is only used to test the JNDI config described
in Chapter 23. None of the examples use it.
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash