敲Servlet代码时个人笔记

2011-04-10     1. HttpServletResponse对象中的getWriter()方法返回一个可以向客户端传送text的PrintWriter对象     2.      /**     * Called by the servlet container to indicate to a servlet that the servlet is being     * placed into service.     * The servlet container calls the init method exactly once after instantiating the     * servlet. The init method must complete su…

servlet生命周期

The life cycle of a servlet is controlled by the container in which the servlet has been deployed. When a request is mapped to a servlet, the container performs the following steps. If an instance of the servlet does not exist, the Web container Loads the servlet class. Creates an instance of the servlet class. Initializes the servlet instance by calling the init method…

javax.servlet.ServletException:SRVE0207E: Uncaught initialization exception created by servlet

将写好的项目部署到webSphere服务器上,访问项目后,报: javax.servlet.ServletException:SRVE0207E: Uncaught initialization exception created by servlet se 这个错误 后来查了一下webSphere的SystemOut.log日志,发现webSphere的jdk版本是1.6的,而项目是jdk1.7的 更改了一下webSphere的jdk版本之后,项目可以正常访问。

Servlet 的生命周期

Servlet 的生命周期分为init, service, and destroy.三部分。 The init( ) Method The init method is called by the servlet container after the servlet class has been instantiated. The servlet container calls this method exactly once to indicate to the servlet that the servlet is being placed into service. The init method must complete successfully before the servlet can rece…

有关Tomcat的web.xml配置说明

Servlet部分 <servlet>元素:定义Servlet实体 <servlet-name>:Servlet实体的名称. <servlet-class>:Sevrlet实体的类名称.   <servlet-maooing>元素:定义与Servlet对应的URL <servlet-name>:Servlet的名称。(应该和上面<servlet>中定义的名称相同) <servlet-mapping>:Servlet所对应的URL。   <init-param>:定义Servlet的起始参数。 <param-name&…

Hibernate 2 与 Hibernate 3的一些区别

对 DTD 文件的引用在Hibernate 2中是这样:<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> 在Hibernate 3中必须这样设置:<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-co…

Error

Error occurred during initialization of VM java/lang/NoClassDefFoundError : java/lang/Object     Solution:   1) copy the rt.jar from your jdk/jre/lib directory to your jre/lib directory.

SpringMVC深度探险(三) —— DispatcherServlet与初始化主线

在上一篇文章中,我们给出了构成SpringMVC应用程序的三要素以及三要素的设计过程。让我们来归纳一下整个设计过程中的一些要点: SpringMVC将Http处理流程抽象为一个又一个处理单元 SpringMVC定义了一系列组件(接口)与所有的处理单元对应起来 SpringMVC由DispatcherServlet贯穿始终,并将所有的组件串联起来 在整个过程中,组件和DispatcherServlet总是维持着一个相互支撑的关系: DispatcherServlet…

spring 之ActionServlet代理

    spring 在structs 框架下对actionservlet的代理是通过在struct-config.xml植入spring plug-in来对action 进行托管的。那究竟spring在plug-in中做了哪些动作使得自己的配置文件springapplication.xml可以托管structs的action呢?     在struct-config.xml中,spring plug-in的配置一般如下: <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">    <set-property prope…

Inside the Java Virtual Machine

Inside the Java Virtual Machine Acknowledgments Introduction Part One: Java's Architecture 1 Introduction to Java's Architecture Architectural Tradeoffs Future Trends On the CD-ROM The Resources Page2 Platform independence Seven Steps to Platform Independence The Politics of Platform Independence The Resources Page3 Security Safety Features Built Into the Java Virtual …

java tips and items 20071020

    1Use nested classes for better organization 2Object initialization in Java3 关于java的hashCode方法 4 java equals5 java1.5泛型指南6 How to avoid traps and correctly override methods from java.lang.Object 7 collection framework Iterable                                Iterable                               △                                |                            C…