jsp 页面取值
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"
import="com.model.User"
%> <!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>
<%!int a = 10; %>
<%String name = "aaa";
request.setAttribute("myName", name); User user = new User();
user.setUsername("aa2");
request.setAttribute("users", user);
%>
name1:${myName }<br>
name2:<%=name %><br>
<!-- 作用域取值 -->
username1:${users.username }<br> <!-- 表达式取值 -->
username2:<%=user.getUsername() %><br> <!-- 标准动作取值 -->
<jsp:useBean id="users" class="com.model.User" scope="request"/>
username3:<jsp:getProperty name="users" property="username"/>
</body>
</html>
jsp 页面取值的更多相关文章
- 转+总结!! 关于jsp页面取值方式
1. 前台往后台传值,通过提交表单,在后台有set,get方法,可以直接取到.如果通过request.getParameter(paramName) 去获取通过会报空指针异常. 其中requ ...
- jsp页面取值
一般就用el表达式 ${recordList[4].baseRate8.split("/")[0] } <s:date name="recordList[#id]. ...
- springMVC在JSP页面取map值
在springmMVC中.jsp页面取得map值. 在controller层: Map<String, Object> map = new HashMap<String, Objec ...
- struts2的@Result annotation 如何添加params,并且在页面取值
http://www.bubuko.com/infodetail-2492575.html .............................................. 标签:lai ...
- Thymeleaf前后端传值 页面取值与js取值
参考: Thymeleaf前后端传值 页面取值与js取值 Thymeleaf 与 Javascript Thymeleaf教程 (十二) 标签内,js中使用表达式 目的: 后端通过Model传值到前端 ...
- ionic4 页面跳转传值和新页面取值
页面跳转 : <ion-row *ngFor="let item of aboutData.stockData" [routerLink]="[ '/stock-d ...
- JSP页面取不到ModelAndView里面存的值
方法1:在jsp页面上加上<%@ page isELIgnored="false" %>
- 如何解决流程开发中SheetRadioButtonList页面取值问题
分享一个常见的取值问题. 应用场景: SheetRadioButtonList控件,点击其中一项执行事件操作.如果是页面加载的情况下,值就无法取到. 具体原因如下: 我给SheetRadioButto ...
- [前端 2]常用的JQuery和Dom页面取值与赋值
导读:书到用时方恨少,需要基础知识的时候,才悔恨自己没有总结学习好.前段时间调了好长时间的页面,突然发现自己之前不怎么在意的取值和赋值,真的是自己一个很薄弱的地方,有时候查半天都找不到一个对的,现在用 ...
随机推荐
- openstack私有云布署实践【4.2 上层代理haproxy+nginx配置 (办公网测试环境)】
续上一节说明 一开始我也是使用haproxy来做的,但后来方式改了,是因为物理机controller的高配置有些浪费,我需要1组高可用的上层nginx代理服务器来实现其它域名80代理访问,很多办公网测 ...
- 利用ckeditor 富文本编辑插件静态化网页
// step5: 生成静态化html FileOutputStream fos = null; PrintStream printStream = null; ...
- table 中的td 字段超长,超过部分用....表示
#contentTable{ table-layout:fixed;}.contentShort{ text-overflow: ellipsis; overflow: hidden; white-s ...
- Codeforces Round #366 (Div. 2)_B. Spider Man
B. Spider Man time limit per test 2 seconds memory limit per test 256 megabytes input standard input ...
- jquey(判断文本框输入的网址链接是否符合规则)
今天遇到一个问题,我要在文本框中输入一个网址链接,使其跳转.但是如何验证,我首先想到了正则表达式.对的,就是你想的那样,我对正则一知半解,但在我哥哥帮助下,最终是 实现 了效果.在此,来一发,分享一下 ...
- 多尺度二维离散小波分解wavedec2
对X进行N尺度小波分解 [C,S]=wavedec2(X,N,'wname'); clc,clear all,close all; load woman; [c,s]=wavedec2(X,2,'db ...
- 分页加载的Fragment
package com.z.fragment; import android.os.Bundle; import android.os.Environment; import android.supp ...
- html5标准格式示代码
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8& ...
- erlang 常用的计算长度函数
1.size 可以计算元祖长度和标准binary长度 2.tuple_size 计算元祖长度 3.length 计算列表长度 4.byte_size 计算标准和非标准binary的长度 非标准 < ...
- 在block函数中规避错误信息 "capturing self strongly in this block is likely to lead to a retain cycle”
以形如 _fontValueChangedBlock = ^(){ [self.fontSmallButton addTarget:self action:@selector(btnFontSmall ...