1.求jsp登录源码 急急急急急急急急急急急
2.商业源码源码分类
3.谁有做好的框架框架jsp页面 只有板式框架的就行 要源代码 谢谢各位
求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为代表。框架框架
无论是代码运行的软件还是网站,它们都是框架框架由程序员通过编写代码构建而成。在编写程序的代码过程中,程序员使用的框架框架fil上传源码“语言”就是所谓的“源码”,就像音乐家以五线谱表达音符,代码建筑师以图纸勾勒蓝图一样,框架框架源码是程序员们构建程序的“语言”。
那么,商业源码又是什么?商业源码,即商业化的导航app源码源代码,指的是在商业活动中,用于实现特定功能或提供服务的源代码。商业源码通常涉及到版权、授权和付费等问题,因此,在使用和传播商业源码时,炫彩源码需遵守相应的法律和协议。
动态源码与静态源码之间存在着明显的差异。动态源码能够根据输入数据生成动态内容,如动态网页、博客系统、电子商务平台等。青金石源码这类源码的编写较为复杂,需要考虑用户交互、数据库操作、安全性和性能优化等多个方面。
静态源码则主要以HTML为基础,用于构建网页结构和内容展示。静态源码的编写相对简单,无需进行服务器端处理,可以直接通过浏览器查看。然而,静态源码的更新和维护较为繁琐,一旦需要修改页面内容或样式,通常需要重新编写或编辑源代码。
总之,动态源码与静态源码在功能、开发难度以及维护方式上存在显著差异,但都是构建网站和软件不可或缺的重要组成部分。在选择和使用源码时,应根据实际需求、项目特点以及技术能力做出合理决策。
谁有做好的jsp页面 只有板式框架的就行 要源代码 谢谢各位
用frameset把~他可以指定左边菜单的连接跳到中间去! 比include要好! 你把代码复制过去把里面的jsp路径改成你自己的!试试! <html> <head> </head> <!-- 框架集包含一个小框架集和一个头部jsp --> <frameset rows=",*" cols="*" frameborder="NO" border="0" framespacing="0"> <frame src="<%=request.getContextPath()%>/form/index/top.jsp" name="top" scrolling="NO" noresize> <!-- 小框架集包含三个jsp,第一个:菜单,第二个:缩进条,第三个:主页面 --> <frameset name="mainframe" id="mainframe" rows="*" cols=",9,*" framespacing="0" frameborder="NO" border="0" bordercolor="#"> <frame src="<%=request.getContextPath()%>/form/index/tree.jsp" name="left" scrolling="Yes" noresize> <frame scrolling=No noresize="true" name=toogle marginwidth=0 marginheight=0 src="<%=request.getContextPath()%>/form/index/toogle.jsp"> <frame src="<%=request.getContextPath()%>/form/index/main.jsp" name="center" scrolling="Yes" noresize> </frameset> </frameset> <body> </body> </html>