`
Junjiejkl
  • 浏览: 59810 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

servletToJSP.java

阅读更多
import javax.servlet.*;
import javax.servlet.http.*;

public class ServletToJsp extends HttpServlet {
	public void doGet (HttpServletRequest req,HttpServletResponse resp) {
	    try {
			// 设置属性并将它提交给ServletUseJsp.jsp
s		    resp.setContentType("text/html;charset=gb2312");
	        req.setAttribute ("servletName", "ServletToJsp");
	        getServletConfig().getServletContext().getRequestDispatcher
		    ("/ServletUseJsp.jsp").forward(req, resp);
	    }catch (Exception e){
	        e.printStackTrace ();
	    }
	}
}
分享到:
评论

相关推荐

    Advanced.Java.Programming.0199455503

    The state-of-the-art concepts such as SOAP, Applet, Servlet, JSP, JDBC, Hibernate, JMS, J2EE, JNDI, CORBA, JSF etc. have been discussed in the last part. The content is enhanced with numerous ...

    JAVA WEB 开发详解:XML+XSLT+SERVLET+JSP 深入剖析与实例应用.part3

    本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。.  本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...

    Advanced.JAVA.Laboratory.Manual.B01BB1

    Advanced JAVA Lab Manual: This lab manual is specially written for computer engineering and IT students for practicing ...Different approaches are used to explain various features of Advanced JAVA.

    servlet2.4doc

    Overrides the standard java.lang.Object.clone method to return a copy of this cookie. containsHeader(String) - Method in class javax.servlet.http.HttpServletResponseWrapper The default behavior of ...

    ADVANCED.JAVA.B01B6Z954E

    ADVANCED JAVA: This book is especially for those who have basic knowledge of JAVA and want to learn some advanced features of JAVA like Applet, AWT, SWINGs, Servlet, JDBC, JSP etc… Also every one ...

    An Overview of Servlet and JSP Technology.zip

    Abstract: Servlet program running in the server-side, dynamically generated Web page with the traditional CGI and many other similar compared to CGI technology, Java Servlet with a more efficient, ...

    JAVA WEB 开发详解:XML+XSLT+SERVLET+JSP 深入剖析与实例应用.part2

    本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。.  本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...

    JAVA WEB 开发详解:XML+XSLT+SERVLET+JSP 深入剖析与实例应用.part4

    本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。.  本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...

    《Java Servlet编程(第二版)》英文版 chm (含源码)

    Servlets have become the basis for JavaServer Pages (JSP) and other frameworks, and servlet technology now supports such high-traffic sites as ESPN.com and AltaVista.com. Not surprisingly, the ...

    JAVA WEB 开发详解:XML+XSLT+SERVLET+JSP 深入剖析与实例应用.part5

    本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。.  本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...

    JavaEE 5.0 Tutorial.pdf

    Java Servlet Technology .............................................................................................................. 58 JavaServer Pages Technology .....................................

    一篇不错的关于java工作流方面讲解及代码

    5.4.1 中文字符格式的转换模块(Stringto.java) 22 5.4.2 自动生成验证码(Ran.java) 22 5.4.3 数据库的连接(ConnectionFactory.java) 23 5.4.4 数据库连接的关闭(DatabaseUtils.java)--只提供接口 23 5.4.5 ...

    Wrox.Press.Professional.Java.Tools.for.Extreme.Programming.eBook-LiB.part3

    Procedures for automating servlet, JSP, and other J2EE testing using Cactus Ways to automate Swing testing with Jemmy, JFCUnit, and Abbot How to manage projects using Maven Techniques for ...

    Wrox.Press.Professional.Java.Tools.for.Extreme.Programming.eBook-LiB.part4

    Procedures for automating servlet, JSP, and other J2EE testing using Cactus Ways to automate Swing testing with Jemmy, JFCUnit, and Abbot How to manage projects using Maven Techniques for ...

    java实现工作流

    5.4.1 中文字符格式的转换模块(Stringto.java) 22 5.4.2 自动生成验证码(Ran.java) 22 5.4.3 数据库的连接(ConnectionFactory.java) 23 5.4.4 数据库连接的关闭(DatabaseUtils.java)--只提供接口 23 5.4.5 ...

    Java/JavaEE 学习笔记

    第一章 Introduction to JSP...............238 第二章 Creating,Deploying and Executing a JSP..................239 第三章 JSP Scriplets,Directives and Action .................240 第四章 Working with ...

    Java Servlet Programming(jsp教程)

    and also introduces several popular tools for easier integration of servlet technology with dynamic Web pages including JavaServer Pages (JSP), Tea, XMLC, and the Element Construction Set.

    Java for the Web with Servlets,JSP,and EJB,A Developer's Guide to J2EE Solutions

    Java for the Web with Servlets, JSP and EJB is the one book you need to master Java web programming. It covers all the technologies needed to program web applications in Java using Servlets 2.3, JSP ...

Global site tag (gtag.js) - Google Analytics