From 1850f8556d0b32ccba79efde1cf9cff5054f6a84 Mon Sep 17 00:00:00 2001 From: yang wang <xyyr190304@gmail.com> Date: Sun, 26 Dec 2021 18:06:51 +0100 Subject: [PATCH 1/2] Front-end control of registration function --- .../Controller/UserController.java | 13 +++++++---- .../webapp/WEB-INF/templates/register.html | 23 ++++++++++--------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/example/j2ee_project/Controller/UserController.java b/src/main/java/com/example/j2ee_project/Controller/UserController.java index 99dc892..d53fcfc 100644 --- a/src/main/java/com/example/j2ee_project/Controller/UserController.java +++ b/src/main/java/com/example/j2ee_project/Controller/UserController.java @@ -1,7 +1,7 @@ package com.example.j2ee_project.Controller; import com.example.j2ee_project.Model.UserEntity; -import org.springframework.http.HttpCookie; + import org.springframework.http.HttpRequest; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -22,11 +22,11 @@ public class UserController { userI.setUserName("Dusan"); userI.setUserName("123"); System.out.println(userEntity); - + if(userEntity.getPassword()==userI.getPassword()){ HttpSession httpSession= request.getSession(); httpSession.setAttribute("userName",userEntity.getUserName()); - httpSession.setAttribute("login",true); + httpSession.setAttribute("login",true);} return "index"; } @@ -35,7 +35,12 @@ public class UserController { return "register"; } @RequestMapping("/Register") - public String Register(UserEntity userEntity){ + public String Register(UserEntity userEntity,HttpServletRequest request){ + HttpSession httpSession= request.getSession(); + + httpSession.setAttribute("userName",userEntity.getUserName()); + httpSession.setAttribute("login",true); + return "index"; } @RequestMapping("/Logout") diff --git a/src/main/webapp/WEB-INF/templates/register.html b/src/main/webapp/WEB-INF/templates/register.html index 51fb404..8d64d53 100644 --- a/src/main/webapp/WEB-INF/templates/register.html +++ b/src/main/webapp/WEB-INF/templates/register.html @@ -97,22 +97,23 @@ $(document).ready(function(){ <form th:action="@{/Register}"> <div class="form-group"> <label for="edit-name">Username <span class="form-required" title="This field is required.">*</span></label> - <input type="text" id="edit-name" name="name" value="" size="60" maxlength="60" class="form-text required"> + <input type="text" id="edit-name" name="userName" value="" size="60" maxlength="60" class="form-text required"> </div> <div class="form-group"> <label for="edit-pass">Password <span class="form-required" title="This field is required.">*</span></label> - <input type="password" id="edit-pass" name="pass" size="60" maxlength="128" class="form-text required"> + <input type="password" id="edit-pass" name="password" size="60" maxlength="128" class="form-text required"> </div> <div class="form-group"> <label for="edit-name">Email <span class="form-required" title="This field is required.">*</span></label> - <input type="text" id="edit-name" name="name" value="" size="60" maxlength="60" class="form-text required"> + <input type="text" id="edit-name" name="email" value="" size="60" maxlength="60" class="form-text required"> </div> + <!--- <div class="age_select"> <label for="edit-pass">Age <span class="form-required" title="This field is required.">*</span></label> <div class="age_grid"> <div class="col-sm-4 form_box"> <div class="select-block1"> - <select> + <select name="birthday"> <option value="">Date</option> <option value="">1</option> <option value="">2</option> @@ -212,25 +213,25 @@ $(document).ready(function(){ </div> <div class="clearfix"> </div> </div> - </div> + </div>---> <div class="form-group form-group1"> - <label class="col-sm-7 control-lable" for="sex">Sex : </label> + <label class="col-sm-7 control-lable">Sex : </label> <div class="col-sm-5"> <div class="radios"> <label for="radio-01" class="label_radio"> - <input type="radio" checked=""> Male + <input type="radio" name="sex" id="radio-01" checked="checked"> Male </label> - <label for="radio-02" class="label_radio"> - <input type="radio"> Female + <label for="radio-02" class="label_radio"> + <input type="radio" name="sex" id="radio-02"> Female </label> </div> </div> <div class="clearfix"> </div> </div> - <div class="form-group"> + <!--- <div class="form-group"> <label for="edit-name">Subject <span class="form-required" title="This field is required.">*</span></label> <textarea class="form-control bio" placeholder="" rows="3"></textarea> - </div> + </div>---> <div class="form-actions"> <input type="submit" id="edit-submit" name="op" value="Submit" class="btn_1 submit"> </div> -- GitLab From 083f901b6c3a78bcc2e036f62b8ec5e04faf35ca Mon Sep 17 00:00:00 2001 From: yang wang <xyyr190304@gmail.com> Date: Tue, 28 Dec 2021 00:29:41 +0100 Subject: [PATCH 2/2] Page modification --- pom.xml | 15 + .../Controller/UserController.java | 47 ++- .../com/example/j2ee_project/DAO/UserDAO.java | 8 + src/main/resources/SpringMVC.xml | 13 +- .../WEB-INF/templates/create_profile.html | 289 ++++++------------ src/main/webapp/WEB-INF/templates/index.html | 10 +- .../webapp/WEB-INF/templates/register.html | 108 +------ src/main/webapp/WEB-INF/web.xml | 8 + 8 files changed, 165 insertions(+), 333 deletions(-) create mode 100644 src/main/java/com/example/j2ee_project/DAO/UserDAO.java diff --git a/pom.xml b/pom.xml index cc9186f..5b736c8 100644 --- a/pom.xml +++ b/pom.xml @@ -16,8 +16,10 @@ <properties> <java.version>1.8</java.version> </properties> + <!--打包形å¼--> <packaging>war</packaging> <dependencies> + <!--thymeleaf--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> @@ -26,6 +28,7 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> + <!--mysql jdbc--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> @@ -36,6 +39,18 @@ <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> + <!--处ç†æ–‡ä»¶ä¸Šä¼ 下载--> + <dependency> + <groupId>commons-fileupload</groupId> + <artifactId>commons-fileupload</artifactId> + <version>1.3.3</version> + </dependency> + <!--处ç†json--> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.13.0-rc2</version> + </dependency> </dependencies> <build> diff --git a/src/main/java/com/example/j2ee_project/Controller/UserController.java b/src/main/java/com/example/j2ee_project/Controller/UserController.java index d53fcfc..c036599 100644 --- a/src/main/java/com/example/j2ee_project/Controller/UserController.java +++ b/src/main/java/com/example/j2ee_project/Controller/UserController.java @@ -11,46 +11,35 @@ import javax.servlet.http.HttpSession; @Controller public class UserController { - @RequestMapping("/ToLogin") - public String ToLogin(){ - return "login"; - } + @RequestMapping("/Login") - public String Login(UserEntity userEntity, HttpServletRequest request){ + public String Login(UserEntity userEntity, HttpSession session){ UserEntity userI=new UserEntity(); userI.setUserName("Dusan"); - userI.setUserName("123"); + userI.setPassword("123"); System.out.println(userEntity); - if(userEntity.getPassword()==userI.getPassword()){ - HttpSession httpSession= request.getSession(); + if(userEntity.getPassword().equals(userI.getPassword())){ + session.setAttribute("userName",userEntity.getUserName()); + session.setAttribute("login",true);} - httpSession.setAttribute("userName",userEntity.getUserName()); - httpSession.setAttribute("login",true);} - - return "index"; - } - @RequestMapping("/ToRegister") - public String ToRegister(){ - return "register"; + return "redirect:/Home"; } + @RequestMapping("/Register") - public String Register(UserEntity userEntity,HttpServletRequest request){ - HttpSession httpSession= request.getSession(); + public String Register(UserEntity userEntity,HttpSession session){ + - httpSession.setAttribute("userName",userEntity.getUserName()); - httpSession.setAttribute("login",true); + session.setAttribute("userName",userEntity.getUserName()); + session.setAttribute("login",true); - return "index"; + return "redirect:/Home"; } @RequestMapping("/Logout") - public String Logout( HttpServletRequest request){ - request.getSession().removeAttribute("login"); - request.getSession().removeAttribute("userName"); - return "index"; - } - @RequestMapping("/Home") - public String Home(){ - return "index"; + public String Logout( HttpSession session){ + session.removeAttribute("login"); + session.removeAttribute("userName"); + return "redirect:/Home"; } + } diff --git a/src/main/java/com/example/j2ee_project/DAO/UserDAO.java b/src/main/java/com/example/j2ee_project/DAO/UserDAO.java new file mode 100644 index 0000000..cb09186 --- /dev/null +++ b/src/main/java/com/example/j2ee_project/DAO/UserDAO.java @@ -0,0 +1,8 @@ +package com.example.j2ee_project.DAO; + +import org.springframework.stereotype.Repository; + +@Repository +public class UserDAO { + +} diff --git a/src/main/resources/SpringMVC.xml b/src/main/resources/SpringMVC.xml index 526707b..125444c 100644 --- a/src/main/resources/SpringMVC.xml +++ b/src/main/resources/SpringMVC.xml @@ -14,7 +14,7 @@ http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd"> - <context:component-scan base-package="com.example.j2ee_project.Controller"></context:component-scan> + <context:component-scan base-package="com.example.j2ee_project"></context:component-scan> <bean id="viewResolver" class="org.thymeleaf.spring5.view.ThymeleafViewResolver"> <property name="order" value="1"></property> <property name="characterEncoding" value="UTF-8"></property> @@ -32,9 +32,18 @@ </property> </bean> <mvc:view-controller path="/" view-name="index"></mvc:view-controller> - <mvc:resources mapping="fonts/**" location="/font/"></mvc:resources> + <mvc:resources mapping="fonts/**" location="/fonts/"></mvc:resources> + <mvc:resources mapping="fonts/**.ttf" location="/fonts/"></mvc:resources> + <mvc:resources mapping="fonts/**.woff" location="/fonts/"></mvc:resources> + <mvc:resources mapping="fonts/**.woff2" location="/fonts/"></mvc:resources> <mvc:resources mapping="js/**" location="/js/"></mvc:resources> <mvc:resources mapping="css/**" location="/css/"></mvc:resources> <mvc:resources mapping="images/**" location="/images/"></mvc:resources> <mvc:annotation-driven></mvc:annotation-driven> + <mvc:view-controller path="/Home" view-name="index"></mvc:view-controller> + <mvc:view-controller path="/ToLogin" view-name="login"></mvc:view-controller> + <mvc:view-controller path="/ToRegister" view-name="register"></mvc:view-controller> + <mvc:default-servlet-handler/> + + <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"></bean> </beans> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/templates/create_profile.html b/src/main/webapp/WEB-INF/templates/create_profile.html index bd87338..99a7e2d 100644 --- a/src/main/webapp/WEB-INF/templates/create_profile.html +++ b/src/main/webapp/WEB-INF/templates/create_profile.html @@ -89,7 +89,7 @@ $(document).ready(function(){ <ul> <a th:href="@{/Home}"><i class="fa fa-home home_1"></i></a> <span class="divider"> | </span> - <li class="current-page">Regular Search</li> + <li class="current-page">Creat Profile</li> </ul> </div> <!--<script type="text/javascript"> @@ -101,211 +101,118 @@ $(document).ready(function(){ }); </script>--> <div class="col-md-9 search_left"> + <form method="post" enctype="multipart/form-data"> + <div class="form_but1"> + <label class="col-sm-5 control-lable1" for="edit-intro">Photo: </label> + <div class="col-sm-7 form_radios"> + <div class="select-block1"> + <input type="file" name="photo"> + <input type="submit" value="Upload"> + </div> + </div> + + <div class="clearfix"> </div> + </div> + </form> <form th:action="@{/CreateProfile}" method="post"> - <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">Gender : </label> - <div class="col-sm-7 form_radios"> - <input type="radio" class="radio_1" /> Male - <input type="radio" class="radio_1" checked="checked" /> Female - - <!--<hr /> - <p id="sel"></p><br /> - <input id="btnRadio" type="button" value="Get Selected Value" />--> - </div> - <div class="clearfix"> </div> - </div> - <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">Marital Status : </label> - <div class="col-sm-7 form_radios"> - <input type="checkbox" class="radio_1" /> Single - <input type="checkbox" class="radio_1" checked="checked" /> Divorced - <input type="checkbox" class="radio_1" value="Cheese" /> Widowed - <input type="checkbox" class="radio_1" value="Cheese" /> Separated - <input type="checkbox" class="radio_1" value="Cheese" /> Any - </div> - <div class="clearfix"> </div> - </div> - <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">Country : </label> - <div class="col-sm-7 form_radios"> - <div class="select-block1"> - <select> - <option value="">Country</option> - <option value="">Japan</option> - <option value="">Kenya</option> - <option value="">Dubai</option> - <option value="">Italy</option> - <option value="">Greece</option> - <option value="">Iceland</option> - <option value="">China</option> - <option value="">Doha</option> - <option value="">Irland</option> - <option value="">Srilanka</option> - <option value="">Russia</option> - <option value="">Hong Kong</option> - <option value="">Germany</option> - <option value="">Canada</option> - <option value="">Mexico</option> - <option value="">Nepal</option> - <option value="">Norway</option> - <option value="">Oman</option> - <option value="">Pakistan</option> - <option value="">Kuwait</option> - <option value="">Indonesia</option> - <option value="">Spain</option> - <option value="">Thailand</option> - <option value="">Saudi Arabia</option> - <option value="">Poland</option> - </select> + <div class="form_but1"> + <label class="col-sm-5 control-lable1" for="edit-name">Name: </label> + <div class="col-sm-7 form_radios"> + <div class="select-block1"> + <input type="text" id="edit-name" name="name" value="" size="60" maxlength="60" > + </div> + </div> + + <div class="clearfix"> </div> </div> - </div> - <div class="clearfix"> </div> - </div> - <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">District / City : </label> - <div class="col-sm-7 form_radios"> - <div class="select-block1"> - <select> - <option value="">District / City</option> - <option value="">Japan</option> - <option value="">Kenya</option> - <option value="">Dubai</option> - <option value="">Italy</option> - <option value="">Greece</option> - <option value="">Iceland</option> - <option value="">China</option> - <option value="">Doha</option> - <option value="">Irland</option> - <option value="">Srilanka</option> - <option value="">Russia</option> - <option value="">Hong Kong</option> - <option value="">Germany</option> - <option value="">Canada</option> - <option value="">Mexico</option> - <option value="">Nepal</option> - <option value="">Norway</option> - <option value="">Oman</option> - <option value="">Pakistan</option> - <option value="">Kuwait</option> - <option value="">Indonesia</option> - <option value="">Spain</option> - <option value="">Thailand</option> - <option value="">Saudi Arabia</option> - <option value="">Poland</option> - </select> + <div class="form_but1"> + <label class="col-sm-5 control-lable1" for="edit-height">Height: </label> + <div class="col-sm-7 form_radios"> + <div class="select-block1"> + <input type="text" id="edit-height" name="height" value="" size="60" maxlength="60" > + </div> + </div> + + <div class="clearfix"> </div> </div> - </div> - <div class="clearfix"> </div> - </div> - <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">State : </label> - <div class="col-sm-7 form_radios"> - <div class="select-block1"> - <select> - <option value="">State</option> - <option value="">Japan</option> - <option value="">Kenya</option> - <option value="">Dubai</option> - <option value="">Italy</option> - <option value="">Greece</option> - <option value="">Iceland</option> - <option value="">China</option> - <option value="">Doha</option> - <option value="">Irland</option> - <option value="">Srilanka</option> - <option value="">Russia</option> - <option value="">Hong Kong</option> - <option value="">Germany</option> - <option value="">Canada</option> - <option value="">Mexico</option> - <option value="">Nepal</option> - <option value="">Norway</option> - <option value="">Oman</option> - <option value="">Pakistan</option> - <option value="">Kuwait</option> - <option value="">Indonesia</option> - <option value="">Spain</option> - <option value="">Thailand</option> - <option value="">Saudi Arabia</option> - <option value="">Poland</option> - </select> + <div class="form_but1"> + <label class="col-sm-5 control-lable1" for="edit-weight">Weight: </label> + <div class="col-sm-7 form_radios"> + <div class="select-block1"> + <input type="text" id="edit-weight" name="weight" value="" size="60" maxlength="60" > + </div> + </div> + + <div class="clearfix"> </div> </div> - </div> - <div class="clearfix"> </div> - </div> - <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">Religion : </label> - <div class="col-sm-7 form_radios"> - <div class="select-block1"> - <select> - <option value="">Hindu</option> - <option value="">Sikh</option> - <option value="">Jain-All</option> - <option value="">Jain-Digambar</option> - <option value="">Jain-Others</option> - <option value="">Muslim-All</option> - <option value="">Muslim-Shia</option> - <option value="">Muslim-Sunni</option> - <option value="">Muslim-Others</option> - <option value="">Christian-All</option> - <option value="">Christian-Catholic</option> - <option value="">Jewish</option> - <option value="">Inter-Religion</option> - </select> + <div class="form_but1"> + <label class="col-sm-5 control-lable1" for="edit-birthday">Birthday: </label> + <div class="col-sm-7 form_radios"> + <div class="select-block1"> + <input type="text" id="edit-birthday" name="DataOfBirth" value="" size="60" maxlength="60" > + </div> + </div> + + <div class="clearfix"> </div> </div> - </div> - <div class="clearfix"> </div> + + + <div class="form_but1"> + <label class="col-sm-5 control-lable1" for="maritalStatus">Marital Status : </label> + <div class="col-sm-7 form_radios" id="maritalStatus"> + <input type="radio" name="maritalStatus" class="radio_1" value="Single" checked="checked" /> Single + <input type="radio" name="maritalStatus" class="radio_1" value="Divorced" /> Divorced + <input type="radio" name="maritalStatus" class="radio_1" value="Widowed" /> Widowed + <input type="radio" name="maritalStatus" class="radio_1" value="Separated" /> Separated + <input type="radio" name="maritalStatus" class="radio_1" value="Any" /> Any + </div> + <div class="clearfix"> </div> </div> + <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">Mother Tongue : </label> + <label class="col-sm-5 control-lable1" for="city">City : </label> <div class="col-sm-7 form_radios"> - <div class="select-block1"> - <select> - <option value="">English</option> - <option value="">French</option> - <option value="">Telugu</option> - <option value="">Bengali</option> - <option value="">Bihari</option> - <option value="">Hindi</option> - <option value="">Koshali</option> - <option value="">Khasi</option> - <option value="">Tamil</option> - <option value="">Urdu</option> - <option value="">Manipuri</option> + <div class="select-block1" id="city"> + <select name="City"> + + <option value="">Paris</option> + <option value="">Lyon</option> + <option value="">Nice</option> + <option value="">Toulouse</option> + + </select> </div> </div> <div class="clearfix"> </div> </div> - <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">Show Profile : </label> - <div class="col-sm-7 form_radios"> - <input type="checkbox" class="radio_1" /> with Photo - <input type="checkbox" class="radio_1" checked="checked" /> with Horoscope - </div> - <div class="clearfix"> </div> - </div> - <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">Don't Show : </label> - <div class="col-sm-7 form_radios"> - <input type="checkbox" class="radio_1" /> Ignored Profiles - <input type="checkbox" class="radio_1" checked="checked" /> Profiles already Contacted - </div> - <div class="clearfix"> </div> - </div> - <div class="form_but1"> - <label class="col-sm-5 control-lable1" for="sex">Age : </label> - <div class="col-sm-7 form_radios"> - <div class="col-sm-5 input-group1"> - <input class="form-control has-dark-background" name="28" id="slider-name" placeholder="28" type="text" required=""> + <div class="form_but1"> + <label class="col-sm-5 control-lable1" for="edit-edu">Education: </label> + <div class="col-sm-7 form_radios"> + <div class="select-block1"> + <textarea type="text" id="edit-edu" name="Education" value="" rows="5" cols="61"></textarea> + </div> + </div> + + <div class="clearfix"> </div> </div> - <div class="col-sm-5 input-group1"> - <input class="form-control has-dark-background" name="40" id="slider-name" placeholder="40" type="text" required=""> + <div class="form_but1"> + <label class="col-sm-5 control-lable1" for="edit-intro">Introduction: </label> + <div class="col-sm-7 form_radios"> + <div class="select-block1"> + <textarea type="text" id="edit-intro" name="Introduction" value="" rows="5" cols="61"></textarea> + </div> + </div> + + <div class="clearfix"> </div> </div> - <div class="clearfix"> </div> - </div> - <div class="clearfix"> </div> - </div> + + + + <div class="form-actions"> + <input type="submit" id="edit-submit" name="op" value="Creat" class="btn_1 submit"> + </div> + </form> diff --git a/src/main/webapp/WEB-INF/templates/index.html b/src/main/webapp/WEB-INF/templates/index.html index cd6c35d..11fb5e5 100644 --- a/src/main/webapp/WEB-INF/templates/index.html +++ b/src/main/webapp/WEB-INF/templates/index.html @@ -6,14 +6,16 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<link href="css/bootstrap-3.1.1.min.css" rel='stylesheet' type='text/css' /> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="js/jquery.min.js"></script> -<script src="js/bootstrap.min.js"></script> + <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script> <!-- Custom Theme files --> <link href="css/style.css" rel='stylesheet' type='text/css' /> -<link href='http://fonts.useso.com/css?family=Oswald:300,400,700' rel='stylesheet' type='text/css'> -<link href='http://fonts.useso.com/css?family=Ubuntu:300,400,500,700' rel='stylesheet' type='text/css'> +<link href='http://fonts.googleapis.com/css?family=Oswald:300,400,700' rel='stylesheet' type='text/css'> +<link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700' rel='stylesheet' type='text/css'> <!----font-Awesome-----> <link href="css/font-awesome.css" rel="stylesheet"> <!--<script src="https://kit.fontawesome.com/yourcode.js"></script> diff --git a/src/main/webapp/WEB-INF/templates/register.html b/src/main/webapp/WEB-INF/templates/register.html index 8d64d53..0ea0f75 100644 --- a/src/main/webapp/WEB-INF/templates/register.html +++ b/src/main/webapp/WEB-INF/templates/register.html @@ -107,113 +107,7 @@ $(document).ready(function(){ <label for="edit-name">Email <span class="form-required" title="This field is required.">*</span></label> <input type="text" id="edit-name" name="email" value="" size="60" maxlength="60" class="form-text required"> </div> - <!--- - <div class="age_select"> - <label for="edit-pass">Age <span class="form-required" title="This field is required.">*</span></label> - <div class="age_grid"> - <div class="col-sm-4 form_box"> - <div class="select-block1"> - <select name="birthday"> - <option value="">Date</option> - <option value="">1</option> - <option value="">2</option> - <option value="">3</option> - <option value="">4</option> - <option value="">5</option> - <option value="">6</option> - <option value="">7</option> - <option value="">8</option> - <option value="">9</option> - <option value="">10</option> - <option value="">11</option> - <option value="">12</option> - <option value="">13</option> - <option value="">14</option> - <option value="">15</option> - <option value="">16</option> - <option value="">17</option> - <option value="">18</option> - <option value="">19</option> - <option value="">20</option> - <option value="">21</option> - <option value="">22</option> - <option value="">23</option> - <option value="">24</option> - <option value="">25</option> - <option value="">26</option> - <option value="">27</option> - <option value="">28</option> - <option value="">29</option> - <option value="">30</option> - <option value="">31</option> - </select> - </div> - </div> - <div class="col-sm-4 form_box2"> - <div class="select-block1"> - <select> - <option value="">Month</option> - <option value="">January</option> - <option value="">February</option> - <option value="">March</option> - <option value="">April</option> - <option value="">May</option> - <option value="">June</option> - <option value="">July</option> - <option value="">August</option> - <option value="">September</option> - <option value="">October</option> - <option value="">November</option> - <option value="">December</option> - </select> - </div> - </div> - <div class="col-sm-4 form_box1"> - <div class="select-block1"> - <select> - <option value="">Year</option> - <option value="">1980</option> - <option value="">1981</option> - <option value="">1982</option> - <option value="">1983</option> - <option value="">1984</option> - <option value="">1985</option> - <option value="">1986</option> - <option value="">1987</option> - <option value="">1988</option> - <option value="">1989</option> - <option value="">1990</option> - <option value="">1991</option> - <option value="">1992</option> - <option value="">1993</option> - <option value="">1994</option> - <option value="">1995</option> - <option value="">1996</option> - <option value="">1997</option> - <option value="">1998</option> - <option value="">1999</option> - <option value="">2000</option> - <option value="">2001</option> - <option value="">2002</option> - <option value="">2003</option> - <option value="">2004</option> - <option value="">2005</option> - <option value="">2006</option> - <option value="">2007</option> - <option value="">2008</option> - <option value="">2009</option> - <option value="">2010</option> - <option value="">2011</option> - <option value="">2012</option> - <option value="">2013</option> - <option value="">2014</option> - <option value="">2015</option> - </select> - </div> - </div> - <div class="clearfix"> </div> - </div> - </div>---> + <div class="form-group form-group1"> <label class="col-sm-7 control-lable">Sex : </label> <div class="col-sm-5"> diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 456628c..22404cb 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -18,4 +18,12 @@ <servlet-name>SpringMVC</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> + <filter> + <filter-name>HiddenHttpMethodFilter</filter-name> + <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class> + </filter> + <filter-mapping> + <filter-name>HiddenHttpMethodFilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> </web-app> \ No newline at end of file -- GitLab