Skip to content

Commit

Permalink
项目结构整合
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglei-workspace committed Mar 30, 2016
1 parent 876cb9b commit fc8a7da
Show file tree
Hide file tree
Showing 55 changed files with 1,555 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -6,6 +6,11 @@
.gitattributes
*.class

# Package Files #
*.jar
*.war
*.ear

#sql#

*.~sql
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/.mymetadata
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-module
type="WEB"
name="lyons.eaby"
id="myeclipse.1458093113269"
context-root="/lyons.eaby"
j2ee-spec="5.0"
archive="lyons.eaby.war">
<attributes>
<attribute name="webrootdir" value="WebRoot" />
</attributes>
</project-module>

3 changes: 3 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/WebRoot/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

56 changes: 56 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/WebRoot/WEB-INF/web.xml
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>HandleRegister</servlet-name>
<servlet-class>lyons.control.HandleRegister</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>HandleLogin</servlet-name>
<servlet-class>lyons.control.HandleLogin</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>GoodsDao</servlet-name>
<servlet-class>lyons.dao.GoodsDao</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>HandleExit</servlet-name>
<servlet-class>lyons.control.HandleExit</servlet-class>
</servlet>





<servlet-mapping>
<servlet-name>HandleRegister</servlet-name>
<url-pattern>/lyons.control/HandleRegister</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HandleLogin</servlet-name>
<url-pattern>/lyons.control/HandleLogin</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GoodsDao</servlet-name>
<url-pattern>/lyons.dao/GoodsDao</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HandleExit</servlet-name>
<url-pattern>/lyons.control/HandleExit</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>navbar.jsp</welcome-file>
<welcome-file>/jsp/join/login.jsp</welcome-file>
</welcome-file-list>
</web-app>
41 changes: 41 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/WebRoot/css/nav.css
@@ -0,0 +1,41 @@
@CHARSET "UTF-8";
*{
margin:0;
padding:0;
font-size:16px
}
.nav{
list-style:none;
height:50px;
border-bottom:5px solid #F60;
padding-left:30px;
}
.nav li{
float:left;
margin-top:25px;
}
.nav li a{
background-color:#ccc;
text-decoration:none;
display:block;
height:25px;
line-height:25px;
width:120px;
margin-right:1px;
text-align:center;
background:url(../image/page/nav.png);
}
.nav li a.on, .nav li a:hover
{
color:#fff;
background-position:0 -30px;
}

.user{list-style:none;padding-right:18px; }
.user li{float:right;}
.user li a{
text-decoration:none;
color:#f60;
height:15px;
line-height:25px;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/WebRoot/index.jsp
@@ -0,0 +1,42 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ include file="navbar.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<base href="<%=basePath%>">
<title>首页</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">
</head>

<body>
<jsp:useBean id="loginBean" class="lyons.entity.Login" scope="session"/>
<% request.setCharacterEncoding("UTF-8"); %>
<ul class="user">
<li>
<%
if(loginBean.getUsername()==""||loginBean.getUsername()==null)
{%>
<a href="jsp/join/login.jsp">登录</a>or<a href="jsp/join/register.jsp">注册</a>
<%}else
{%>
<dl>
<dt>
<a>欢迎您,<b><font color="red"><%=loginBean.getUsername() %></font></b></a>
<a href="<%= path %>/lyons.control/HandleExit"><font color="#CDC9C9">退出</font></a>
</dt>
</dl>
<%}
%>
</li>
</ul>
</body>
</html>
12 changes: 12 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/WebRoot/jsp/browse/lookClassify.jsp
@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>
</html>
12 changes: 12 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/WebRoot/jsp/browse/showDetail.jsp
@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>
</html>
70 changes: 70 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/WebRoot/jsp/browse/showGoods.jsp
@@ -0,0 +1,70 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ include file="/navbar.jsp" %>
<%@page import="com.sun.rowset.CachedRowSetImpl"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>浏览商品</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>

<%
String key = request.getParameter("key");
if(!("4".equals(key)))
{%>
<div class="showGoods"><!-- 静态包含始终不行 -->
<form name="scanGoods" action="<%= path %>/lyons.dao/GoodsDao?key=4" method="post">
<input type="submit" value="" width=0 height=0 />
</form>
<script language="JavaScript" type="text/JavaScript">
scanGoods.submit();
</script>
</div>

<%}
%>



<jsp:useBean id="goods" class="lyons.entity.Goods" scope="session"/>
<% request.setCharacterEncoding("UTF-8"); %>
<%
CachedRowSetImpl rowSet = goods.getRowSet();// 获取储存在模型中的行信息
if(rowSet==null)
{
out.print("商品数据库中没有哦");
return;
} else{out.print("u幼稚");}
%>
<center>
<!--
<form action="<%= path %>/lyons.dao/GoodsDao?key=<%= request.getParameter("scanGoods") %>">
</form>
-->
<table width="750" height="60">
<tr>
<td>
图片、价格、描述、产地
<img src=""/>¥
</td>
</tr>
</table>
</center>
</body>
</html>
14 changes: 14 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/WebRoot/jsp/join/isLogin.jsp
@@ -0,0 +1,14 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@page import="lyons.entity.Login"%>
<%
Login isLogin = (Login)session.getAttribute("loginBean");
if(isLogin==null)
{%>
<jsp:forward page="login.jsp" />
<%}
%>



51 changes: 51 additions & 0 deletions 1#Java菜鸟项目/lyons.eaby/WebRoot/jsp/join/landing.jsp
@@ -0,0 +1,51 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ include file="isLogin.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'landing.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">
<meta http-equiv="refresh" content="3; url=<%= path %>/index.jsp">

<!-- <link rel="stylesheet" type="text/css" href="<%= path %>/css/nav.css"> -->

</head>

<body>

<jsp:useBean id="loginBean" class="lyons.entity.Login" scope="session"/>
<% request.setCharacterEncoding("UTF-8"); %>

<%
if(loginBean.getBackNews()=="未登录"||loginBean.getUsername()==null)
{%>
//需要修改代码
登录失败,请<a href="<%= path %>/jsp/join/login.jsp">重新登录</a>or<a href="<%= path %>/jsp/join/register.jsp">注册</a>
<%}else
{%>
<b><font color="red"><%=loginBean.getBackNews() %></font></b>

三秒后跳转到首页.....
<%}
%>
<%--
String content = 3+"; url="+"/navbar.jsp";
response.setHeader("refresh",content);
--%>
</body>
</html>

0 comments on commit fc8a7da

Please sign in to comment.