Bean标签库 1. Here: => Here: zh-cn,en-us;q=0.5 2. 请求的图书编号为: => 请求的图书编号为: 8 请求的客户姓名有: <% for( int i = 0 ; i < custNames.length; i++ ) { out.print(custNames[i] + "__"); } %> => 请求的客户姓名有: cheyo__vsftpd__Google__ 3. Cookies: 您好, => Cookies: 您好,cheyo 4. 当前会话创建时间: => 当前会话创建时间: 1111993122390 5. <1> <2> <% request.setAttribute("stringBean", "test.nick"); %> <3> <% SomeBean bean = new SomeBean(); bean.setName("hello"); request.setAttribute("someBean", bean); %> <4> 6. 以下为test页面的内容: 7. => /hello.jsp 8. 以下为include进的内容: 以下为include进的内容3: 9. <1> <2> <% User user = new User(); user.setUserName("cheyo"); request.setAttribute("userBean", user); %> 当前用户姓名: <%-- 注意: 上面加下划线的"user"这一变量名不应与红色下划线的"currUser"这一变量名相同! 否则会报错! --> 10. <% HashMap lines = new HashMap(); lines.put("1", "line1"); lines.put("2", "line2"); lines.put("3", "line3"); request.setAttribute("lines", lines); %> 线的数量: 11. <1> <% request.setAttribute("floatval", Float.valueOf("3.14159")); Calendar gc = GregorianCalendar.getInstance(); gc.setTime(new Date(session.getCreationTime())); request.setAttribute("now", gc); %> Pi is : Session Started at: <2> <% String boldStart = ""; String boldEnd = ""; request.setAttribute("bs", boldStart); request.setAttribute("be", boldEnd); %> => <B>哈哈哈哈</B> 加粗的哈哈哈哈 |
|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )
GMT+8, 2024-9-30 01:39 , Processed in 0.173049 second(s), 12 queries , Gzip On, MemCache On.
Powered by Discuz! X3.5
© 2001-2023 Discuz! Team.