皮皮网
皮皮网
directsound 源码

【比邻神兽大厅源码】【app 原生 源码】【智慧景区源码】jsp网上订票系统源码_java订票系统源码

时间:2024-12-24 08:59:43 分类:热点 编辑:ch生产管理系统源码
1.求jsp登录源码 急急急急急急急急急急急
2.jsp网购系统什么是上订JSP
3.急求网上招生/报名系统jsp源代码

jsp网上订票系统源码_java订票系统源码

求jsp登录源码 急急急急急急急急急急急

       登陆页面 index.jsp源码:

       <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

       <%

       String path = request.getContextPath();

       String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

       %>

       <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4. Transitional//EN">

       <html>

        <head>

        <base href="<%=basePath%>">

        <title>login</title>

        <meta http-equiv="pragma" content="no-cache">

        <meta http-equiv="cache-control" content="no-cache">

        <meta http-equiv="expires" content="0">

        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

        <meta http-equiv="description" content="This is my page">

        <!--

        <link rel="stylesheet" type="text/css" href="styles.css">

        -->

        </head>

        <body>

        <form action="LoginServlet" method="post">

        用户名:<input type="text" name="username" ><br>

        密码:<input type="password" name="userpass"><br>

        <input type="submit" value="登陆"> <input type="reset" value="取消">

        </form>

       </body>

       </html>

       -------------

       LoginServlet.java 源码:

       package servlet;

       import java.io.IOException;

       import java.io.PrintWriter;

       import javax.servlet.ServletException;

       import javax.servlet.http.HttpServlet;

       import javax.servlet.http.HttpServletRequest;

       import javax.servlet.http.HttpServletResponse;

       public class LoginServlet extends HttpServlet {

        /

**

        * Constructor of the object.

        */

        public LoginServlet() {

        super();

        }

        /

**

        * Destruction of the servlet. <br>

        */

        public void destroy() {

        super.destroy(); // Just puts "destroy" string in log

        // Put your code here

        }

        /

**

        * The doGet method of the servlet. <br>

       

*

        * This method is called when a form has its tag value method equals to get.

        *

        * @param request the request send by the client to the server

        * @param response the response send by the server to the client

        * @throws ServletException if an error occurred

        * @throws IOException if an error occurred

        */

        public void doGet(HttpServletRequest request, HttpServletResponse response)

        throws ServletException, IOException {

        //获得jsp页面传输的参数

        String username=request.getParameter("username");

        String userpass=request.getParameter("userpass");

        //判断

        if(username.equals("user")&&userpass.equals("")){

        response.sendRedirect("1.jsp");

        }else if(username.equals("admin")&&userpass.equals("")){

        response.sendRedirect("2.jsp");

        }else{

        response.sendRedirect("index.jsp");

        }

        }

        /

**

        * The doPost method of the servlet. <br>

       

*

        * This method is called when a form has its tag value method equals to post.

        *

        * @param request the request send by the client to the server

        * @param response the response send by the server to the client

        * @throws ServletException if an error occurred

        * @throws IOException if an error occurred

        */

        public void doPost(HttpServletRequest request, HttpServletResponse response)

        throws ServletException, IOException {

        this.doGet(request, response);

        }

        /

**

        * Initialization of the servlet. <br>

       

*

        * @throws ServletException if an error occurs

        */

        public void init() throws ServletException {

        // Put your code here

        }

       }

       -------------

       1.jsp:

       <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

       <%

       String path = request.getContextPath();

       String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

       %>

       <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4. Transitional//EN">

       <html>

        <head>

        <base href="<%=basePath%>">

        <title>My JSP '1.jsp' starting page</title>

        <meta http-equiv="pragma" content="no-cache">

        <meta http-equiv="cache-control" content="no-cache">

        <meta http-equiv="expires" content="0">

        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

        <meta http-equiv="description" content="This is my page">

        <!--

        <link rel="stylesheet" type="text/css" href="styles.css">

        -->

        </head>

        <body>

        This is 1.jsp <br>

        </body>

       </html>

       -------------

       2.jsp

       <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

       <%

       String path = request.getContextPath();

       String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

       %>

       <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4. Transitional//EN">

       <html>

        <head>

        <base href="<%=basePath%>">

        <title>My JSP '1.jsp' starting page</title>

        <meta http-equiv="pragma" content="no-cache">

        <meta http-equiv="cache-control" content="no-cache">

        <meta http-equiv="expires" content="0">

        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

        <meta http-equiv="description" content="This is my page">

        <!--

        <link rel="stylesheet" type="text/css" href="styles.css">

        -->

        </head>

        <body>

        This is 2.jsp <br>

        </body>

       </html>

jsp网购系统什么是JSP

       JavaServer Pages (JSP) 是一种由Sun Microsystems公司提出的强大技术,旨在简化动态Web页面的票系票系创建。它为开发者提供了一个平台,统源统源比邻神兽大厅源码允许他们在服务器端响应客户端请求时生成HTML、码j码XML或其他格式的上订app 原生 源码内容。JSP的票系票系智慧景区源码核心理念是结合Java语言作为脚本语言,为Java库与HTTP应用程序之间的统源统源交互提供了一个灵活的接口。

       JSP的码j码特点在于将Java代码和预定义的动作嵌入到静态页面中,通过XML标签形式的上订JSP动作来调用这些功能。这种方式使得开发者能够创建可重用的票系票系JSP标签库,这些库就像HTML或XML标签一样,统源统源实现了跨平台的码j码服务器性能扩展。

       在实际操作中,上订cntk源码下载JSP会被JSP编译器转换为Java Servlets。票系票系编译器可以选择将JSP编译成Java源代码,统源统源scrapy源码解析再由Java编译器转化为机器码执行,或者直接编译为二进制代码,以提高效率和性能。

急求网上招生/报名系统jsp源代码

       之前写过一个用于中小学的网上招生报名系统

       不是纯JSP代码啊, 那个都是老黄历了, 现在的课程设计一般都是servlet+JSP+jdbc搞定, servlet封装一个简单的dispatcher就行

本文地址:http://04.net.cn/news/80f457295347.html

copyright © 2016 powered by 皮皮网   sitemap