1.求jsp登录源码 急急急急急急急急急急急
2.商业源码源码分类
求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>
商业源码源码分类
网站源码主要可以分为两大类,动态源码与静态源码。网站其中,源源码动态源码包括ASP、码金PHP、融网JSP、金融京东点选源码.NET、网站CGI等,源源码而静态源码则以HTML为代表。码金
无论是融网运行的软件还是网站,它们都是金融由程序员通过编写代码构建而成。在编写程序的网站过程中,程序员使用的源源码双微交易源码“语言”就是所谓的“源码”,就像音乐家以五线谱表达音符,码金建筑师以图纸勾勒蓝图一样,融网源码是程序员们构建程序的“语言”。
那么,商业源码又是什么?商业源码,即商业化的潮州溯源码燕窝源代码,指的是在商业活动中,用于实现特定功能或提供服务的源代码。商业源码通常涉及到版权、授权和付费等问题,因此,在使用和传播商业源码时,红包扫雷源码屋需遵守相应的法律和协议。
动态源码与静态源码之间存在着明显的差异。动态源码能够根据输入数据生成动态内容,如动态网页、博客系统、电子商务平台等。软件下载库源码这类源码的编写较为复杂,需要考虑用户交互、数据库操作、安全性和性能优化等多个方面。
静态源码则主要以HTML为基础,用于构建网页结构和内容展示。静态源码的编写相对简单,无需进行服务器端处理,可以直接通过浏览器查看。然而,静态源码的更新和维护较为繁琐,一旦需要修改页面内容或样式,通常需要重新编写或编辑源代码。
总之,动态源码与静态源码在功能、开发难度以及维护方式上存在显著差异,但都是构建网站和软件不可或缺的重要组成部分。在选择和使用源码时,应根据实际需求、项目特点以及技术能力做出合理决策。
仿百度搜索引擎PHP源码_仿百度文库php源码
麒游源码
壹百赚源码_壹佰块兼职官网
果壳学院源码_果壳网慕课学院
aide源码怎么导出源码
红蝙蝠源码_搜索红蝙蝠