这篇文章讲的是jsp页面不是会传一些参数到Action中,那么Action怎么去接受这个数据呢?
方案:
案例结构如下:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAGSCAIAAADW32snAAAgAElEQVR4nO2dX3QU14Gnyw95mwfOcc7x+GFOMh4PJuGsCTIwO70O8SZZi2z2rL1OBCgJMWtnKiZ2zJ84iTBWkMBSFBniSiIRbIyQgyV3ZEhIZNpobAZkDUIkCsjY2Aq9MggJkFrqtgwCWghy96Gqq+6tulVdrf5zq6p/37kP3dW3qm5Dfbq3quv+SiJ540RfV8PrW1e3tze8vvVEX1f+dgSAr5HytN0TfV2r29ujvc3Jiz2r29tD+9+FhwBwyZmE7+xdrxdCSPjNfjJ55oOTjUcGave/92J5Y9uyinCu9pUBUSUkhZSogD3nkohckC8RkSU5or2OKiFJkoz34ujuqKwfIITEwuHKVb0x0c1hGOptKO04le1WciNh35717NuK1e3te/76/u7DO1+JfKVp55cfr9xV/mQ2EkZkSSOzw2KGEqqHoHXFiMxdnBER2fIt9G9ns+mCSxhVQmn/oQfaShsrSxvbutVjsZFjSHdHZWljQzjB34C6ll7qB/jVcizhQJvaZo1E5yq6haa36fCAhI3VP2us/lljdd310abro01Xz2wbf+e5oc7Kv/5x7er29i92Dpa37K/87pd++OSah578/doNW2e6n4hsHLVRJVSAv85RJSSFQiHTka/1DjP3IaqEJCkky8wRTv2doL8oTcEldLPDgTb9+BvqbSgNN6wKdw7RFRKdqxrTSejiCE5JmCtO1VNNMv/5GGgrNX0LRwol4aFDh+rq6rgf/WzD1ppf9JCP37aWE31d32o69qXn33tk7Z6lj+xe+sjmmZ8TRhWzDXknqoQkWTF1B1ElFFKU7H1guxnmnU0P5AcJOzrDYcaWod6GVb2d9Z6TkOlRuzsq6zuYL5JRZ1sQCQ8ePDh37tzZs2fbVVi39ldkrJ1TCDnR17W18tVHv/PiM+sUWwNdjTG4HYR6vFqHqdTykBI1juqILIUURbYM+6ihoCGYthpzLKpvtEXMMNfUlzmOL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bjceeecO+6ucl+RS17181Lnt2uFmKJirGX0HVPSDQzFE5P5l5C60VT/no2EqY0lCFhMPGWhGNjY2nPCVueuDPZX5fsr9u7bp76Qi3ETVQMyeyckBCSUoh6l6mE5txB2xxCWwkzuDAL/Ie3JHRzdbTp4X9I9lXsXTcv2VdFF72Cc1SMO5ij3Bzty/+d0PRjguGI1TmuhdbfCa05pJAwkHhIQpe/Ez7/0O17181L9lWYivqpn6JiACCEeEpC9zTJd1mL6EYBMEN8KaED/oiKAYAiaBIC4DsgIQCCgYQACAYSAiAYSAiAYCAhAIKBhAAIBhICIBi/SpjXjBnTvZ2mpyCl3nIyZohpxoTNVD/EyQAaX0qY94wZZuatWZLUh/y7qE1TBx3mWSBOBqh4UcJDhw7V1dXZfVqIjBmm74vIkizL9BRb7tPhiV5bX9N5shPiZICK5yQ8ePDg3LlzZ8+ebVehkBkzhGjTkti0CfMrGoc5gWmqIU6mWPGWhKqBy5cvd5KwEBkzxrGvTQ3U+z9jqiA/Y8bNOSFBnAyg8JCEuoHl5eUOEhYkY0a3jh58Mlkzboaj1Ekh4mSALV6RkDbQWcKCZMwQYxhKpTIx791IaJ+thjgZoOMVCevq6mZT1NbW2tUsSMYMIakLMky3xrzPqCd0qIY4mWLHKxK6pyAZM4QQbQhpCmwy91mW8zU2WY2vD+JkAI3/JETGDAgY/pOQIGMGBAtfSugAMmaA7wiahAD4DkgIgGAgIQCCgYQACAYSAiAYKQkAEIr0oQsGUgwODnZ1dbW0tDQ0NDQ0NDRSWJcAkEMaWFpaWrq6ugYDwf8HOl7/5RFitWcAAAAASUVORK5CYII=" alt="" />
用的还是前一篇博客的案例,只是在上面做一些改动:这个案例用到的文件有:1.UserActio.java(控制类)2.Spring.xml(总的配置文件)3.springmvc_006.xml(这个项目独有的配置文件)4.adduser.jsp(有两个表单的jsp页面)
第一步:编写web.xml文件。
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>SpringMvc_10day_self</display-name>
<!-- Spring提供了一个Filter专门用来解决Post提交中文的乱码问题 -->
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter </filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <servlet>
<!--这个名字可以随便取得,但是这个名字取了之后,以后在 WEB-INF下面创建SpirngMVC的配置文件是,命名必须以这个开头, 所以这里取名叫做DispatcherServlet,那么之后的xml文件取名必须为DispatcherServlet-servlet.xml(一个字都不能差) -->
<servlet-name>DispatcherServlet</servlet-name>
<servlet-class> org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!-- 通知DispatcherServlet去指定目录下找到springmvc.xml配置文件 -->
<!--
注意这里的 <param-name>contextConfigLocation</param-name>一个字母都不能有错
一旦有错就会去WEB-INF下面去找
-->
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<url-pattern>*.action</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list>
</web-app>
第二步:编写spring.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"
>
<import resource="com/guigu/shen/Action6/springmvc_006.xml"/>
</beans>
第三步:编写com/guigu/shen/Action6/springmvc_006.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"
>
<!-- 控制器(程序员)(必须配置) -->
<context:component-scan base-package="com.guigu.shen.Action6"/>
<!-- <bean name="/hello.action" class="com.guigu.shen.Action5.HelloAction"></bean> --> <!-- 基于注解的映射器(可选)
这个类和以前的xml方式的类不同,专门是注解用的
-->
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> <!-- 基于注解的适配器(可选)
这个类和以前的xml方式的类不同,专门是注解用的
-->
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/> <!-- 视图解析器(可选)
这个类和以前的xml方式的类一样
-->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> </bean> </beans>
第四步:编写控制类UserAction.java。(这一步也是这篇文章的核心)
package com.guigu.shen.Action6; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
/**
*
*
请求路径可以拆分为:根模块的名字+分模块的名字
就是相当于当访问http://127.0.0.1:8080:项目名/user/register时就会进入到
registerMethod方法。 */
@Controller
@RequestMapping(value="/user")//根模块的请求名字
public class UserAction {
/*
* 员工注册
*
*/
@RequestMapping(value="/register")//分模块的请求名字
/*
* 重点注意我这里写的参数名字。String username,String salary这里的username,salary和
* 表单提交上来的那个名字是一模一样的。神奇的是只要保证一模一样,就可以收集页面上的值,
* 这也是Springmvc和Struts2很不同的一点,Spring是基于参数收集数据的。Struts2是基于实体去
* 收集数据的。造成这个问题的原因是SpringMvc里面的Action(控制器类是单例模式),如果我们采用和Struts2
* 中一个的方式,里面定义一个Emp emp这样,emp只有一个,如由80个人提交这个请求执行这个方法的话,
* 会导致第80个人会把之前的人的数据都替换掉。所以SpringMvc这么做的话,80个人执行80个方法,就能把每次的
* 数据都保存下来了。
*
*
*/
public String registerMethod(Model model,String username,String salary)
{ model.addAttribute("message", "员工注册成功");
/*
* username参数只要和页面中的name属性一样,就会被赋值。
* salary同理
*/
System.out.print("员工的信息"+username+";"+salary);
return "/jsp/success.jsp";
}
@RequestMapping(value="/login")//分模块的请求名字
public String loginMethod(Model model,String username)
{
model.addAttribute("message", "员工注册成功");
System.out.println(username);
return "/jsp/success.jsp"; } }
第六步:测试 输入hhttp://127.0.0.1:8080/SpringMvc_10day_self/adduser.jsp
出现aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAU8AAADoCAIAAADgwfFHAAARj0lEQVR4nO3dX2sTWQPH8fNuGjGQG9+Gmt5EKOTKN1DUsXfWyyYgpdZWvPHC6tWyMPhYWRAp+Ie9XHYJIi1LJZal1pS627RCWuhzkczMmZnzL8mcOXPm/D4ErJNJM0n67ZlMpjPkAgDcQEwvAADkBLUDuAK1A7gCtQO4ArUDuAK1A7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aW79+aIVcfxm4xc8tPfJ/YlLR+v4/aSwa1mzFZ7XlC7eWD2s0Q1P5XMaD28kHtZvBqPz4+/rMYjo+PUXvJoHYzmLV7ntftdnu93h+m9Xq9breL49KVDGo3g1l7u91eXl7e29s7Nm1vb295ebmNY86WC2o3g1n7xcXF0tKS53k6DxWvxPO8paUlemnzfXpAC9RuBq/2YkLt5YDazUDtkD/UbgZd+5YNTD5ZkBHUbgYSgvyhdjNQO+QPtZuxtbX19OnTOYDcmf7Z16W4tSN1MMX0z74uxa0dALKF2gFcgdoBXIHaAVyB2gFcgdoBXIHaAVyB2gFcgdoBXIHaAVyB2gFcgdoBXIHaAVyB2gFc8X8ikf+ghKMPlgAAAABJRU5ErkJggg==" alt="" />
输入:姓名(年后)和薪水(100)。按下注册按钮。会进入到http://127.0.0.1:8080/SpringMvc_10day_self/user/register.action。从而执行控制类UserAction里面的public String registerMethod(Model model)方法。在控制台打出
员工的信息年后;100
---------------------------------------------------------------------------------------------------------------------------------------
但是上面的方法很明显有一个弊端。如果我的jsp页面上有很多的参数。不止姓名,薪水,还有年龄啊什么,那岂不是在Action中的处理方法
中要写很多的参数了啊。怎么解决?在之后的文章里面再讲。