- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
spring mvc重成json 5、页面读取 script type=text/javascript src=js/jquery.js/script script type=text/javascript//读取集合 $(function(){ $.post(mvc/json.do, function(msg) { for (i = 0; i msg.length; i++){ alert(name: + msg[i].name + ,age + msg[i].pass); } }, json); }); /script script type=text/javascript //读取单个对象 $(function() { $.post(mvc/user.do, function(msg) { alert( + , + msg.pass) }, json); }); /script * ?xml version=1.0 encoding=UTF-8? web-app xmlns:xsi=/2001/XMLSchema-instance xmlns=/xml/ns/javaee xsi:schemaLocation=/xml/ns/javaee /xml/ns/javaee/web-app_2_5.xsd id=WebApp_ID version=2.5 !-- springmvc 前置核心控制器 -- servlet servlet-namespring/servlet-name servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class /servlet servlet-mapping servlet-namespring/servlet-name url-pattern*.do/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list /web-app * * package com.baidu.controller; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.baidu.entity.Student; @Controller @RequestMapping(/mvc) public class HelloMvc { @RequestMapping(/hello) public String hello(){ return helloworld;//用来决定要显示的MVC的 V 视图层 是哪个 } @RequestMapping(/login0) public String login0(HttpServletRequest request){ String name=request.getParameter(name); String pass=request.getParameter(pass); request.setAttribute(name, name); request.setAttribute(pass, pass); return hello; } @RequestMapping(/login
您可能关注的文档
最近下载
- 高标准农田项目施工部项目管理班子的人员岗位职责工.docx VIP
- 电气二次培训基地继电保护试题库填空题 .pdf VIP
- DeepSeek+AI大模型赋能智能制造数字化工厂供应链大数据解决方案.pptx VIP
- JEDEC JESD85-2001Methods fo 国外国际规范.pdf VIP
- 免疫治疗-(精品课件).ppt VIP
- 赛迪:中国大数据区域发展水平评估报告.docx VIP
- 全国灌溉水有效利用系数测算分析技术指导细则(2024修订版)知识培训.pptx VIP
- 生物化学与基础分子生物学实验智慧树知到课后章节答案2023年下中山大学.docx VIP
- 中考词汇1600分类速记表 (1)(1)(1).pdf VIP
- 全季酒店--香氛设备布点原则.pdf VIP
文档评论(0)