码迷,mamicode.com
首页 > 其他好文 > 详细

小学期总结2

时间:2017-07-02 13:45:49      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:info   pack   star   html   UI   override   over   context   sof   

再接下来几天,我们主要学习了springmvc等内容。

在学习过程中,我们需要定义一个类Userinfo,这是这个项目的基础。

package cn.neusoft.pojo;


public class Userinfo {
private Integer userid;
private String username;
private String pwd;

@Override
public String toString() {
return "Userinfo [userid=" + userid + ", username=" + username
+ ", pwd=" + pwd + "]";
}

public Userinfo() {
super();
}

public Userinfo(String username, String pwd) {
super();
this.username = username;
this.pwd = pwd;
}
public Integer getUserid() {
return userid;
}

public void setUserid(Integer userid) {
this.userid = userid;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
}

在登录网页时,我们需要编写代码。

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
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 ‘index.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 my JSP page. <br>
</body>
</html>

小学期总结2

标签:info   pack   star   html   UI   override   over   context   sof   

原文地址:http://www.cnblogs.com/alch/p/7105752.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!