- 浏览: 60083 次
- 性别:
- 来自: 广州
最新评论
import javax.servlet.*; import javax.servlet.http.*; public class ServletToJSP extends HttpServlet { public void doGet (HttpServletRequest req,HttpServletResponse resp) { try { // 设置属性并将它提交给ServletUseJsp.jsp resp.setContentType("text/html;charset=gb2312"); req.setAttribute ("servletName", "ServletToJsp"); //forward //getServletConfig().getServletContext().getRequestDispatcher("/servlet_jsp/ServletUseJsp.jsp").forward(req, resp); //sendredirect System.out.println(req.getContextPath()); resp.sendRedirect(req.getContextPath() + "/servlet_jsp/ServletUseJsp.jsp"); }catch (Exception e){ e.printStackTrace (); } } }
发表评论
-
Servlet的运行过程和生命周期
2011-03-03 13:06 536Servlet的运行过程和生命周期 Demo3() 反射实 ... -
servletToJSP.java
2011-02-25 12:58 753import javax.servlet.*; import ... -
FromJspToServlet.jsp
2011-02-25 12:58 693<html> <body bgcolor= ... -
ServletUseJsp.jsp
2011-02-25 12:57 667<%@ page contentType="t ... -
JSP处理乱码问题
2011-02-25 12:54 644<form action=b.jsp method= ... -
HelloBean
2011-02-25 12:48 611<html> <head> < ... -
建立表单参数和Bean属性之间的关联
2011-02-25 12:42 831<!DOCTYPE HTML PUBLIC " ... -
jsp:useBean(application)
2011-02-25 12:38 731<%-- *********** Application ... -
jsp:useBean(session)
2011-02-25 12:36 757<%-- *************** Session ... -
jsp:useBean(request)
2011-02-25 12:34 812[code="java]<%-- ****** ... -
jsp:useBean(page)
2011-02-25 12:32 633<%-- *************** PageBea ... -
jsp:useBean
2011-02-25 12:26 676引用//=================== Counter ... -
jsp:forward / jsp:param
2011-02-25 11:27 853引用<html> <head> < ... -
jsp:include
2011-02-25 11:25 1015引用<html> <head> < ... -
TestBar.jsp
2011-02-25 11:21 720引用<%@page contentType=" ... -
TestDirective.jsp
2011-02-25 11:17 688<%@page import="java.ut ... -
Expressions.jsp
2011-02-25 11:16 490<!-- Example of JSP Expres ... -
BGColor.jsp
2011-02-25 11:15 721<HTML> <HEAD> & ... -
AccessCounts.jsp
2011-02-25 11:14 584<HTML><HEAD><TIT ... -
HelloWorld.jsp
2011-02-25 11:12 695<html> <head>< ...
相关推荐
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, ...
本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。. 本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...
本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。. 本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...
本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。. 本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...
本书共分4部分,从xml、servlet、jsp和应用的角度向读者展示了java web开发中各种技术的应用,循序渐进地引导读者快速掌握java web开发。. 本书内容全面,涵盖了从事java web开发所应掌握的所有知识。在知识的讲解...
head first serlvet and jsp(english version), it is amzing attractive, you are not going to miss it
a good tutorial about servlet. good to study and practise it.
一个简易的学生信息管理系统,用mysql数据库+JSP+SERVLET编码完成,运行环境idea+tomca。 功能:亮点功能模块是 默认分页展示学生信息,按照年龄的升序排列,展示5条; 显示页码,并且能通过点击页码、“上一页”、...
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.
在Servlet转发到JSP页面时,此时浏览器地址栏上显示的是Servlet的路径,而若JSP页面的超链接还是相对于该JSP页面的地址且该Servlet和该JSP页面不在同一个文件夹下时,则会出现路径混乱问题。 2. 绝对路径概念 相对于...
Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. -------------------------------------------------------------------------------- G ...
json解析文件ToJSP,如果使用JQuery的$.ajax()与servlet通信,就可以帮助你
本文实例讲述了基于jsp+servlet实现的简单博客系统。分享给大家供大家参考。具体如下: 没有用框架写的 小博客, 代码大量重复。 个人感觉重复代码对于新手还是有好处的,我也是新手,见谅。 完整实例代码点击此处本...
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 ...
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 ...
expert Servlet/JSP programmers should read the book to ensure that they do not overlook any exam objectives. However, since this book is a study guide, we do not try to cover advanced tricks and ...
/* ... // Tell the dispatcher to invoke its servlet and include the output dispatcher.include(request, response); } // Finally, end the HTML output out.println("</body>"); } }
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <param-name>classdebuginfo <param-value>true <load-on-startup>3 </servlet> <servlet-mapping> <servlet-name>debugjsp</...
jsp_servlet_javabean网上订餐系统 摘 要 二十一世纪是一个集数字化,网络化,信息化的,以网络为核心的社会。中国的网民 充分领略到"畅游天地间,网络无极限" 所带来的畅快。随着Internet的飞速发展,使得网络的...
入参的HttpServletRequest必须为:import jakarta.servlet.http.HttpServletRequest; 运行cmd,再该目录下执行: 执行步骤:java -jar jakartaee-migration-1.0.1.jar commons-fileupload-1.4.jar commons-...