- 浏览: 3443179 次
- 性别:
- 来自: China
-
文章分类
- 全部博客 (536)
- ajax (1)
- Algorithm (14)
- Android (40)
- CSS/HTML... (2)
- defy (3)
- DesignPattern (2)
- dorado (0)
- Drools (6)
- English/日本語 (7)
- Flex (2)
- Framework (0)
- Google (3)
- hibernate (13)
- homework (3)
- HTML5 (0)
- IDE (29)
- java (45)
- javaee (7)
- Javascript (14)
- java组件 (5)
- jQuery (4)
- jsp (8)
- jsf (2)
- Linux (2)
- lucene (0)
- mysql (6)
- news (3)
- Oracle (8)
- other (4)
- PHP (5)
- Python (0)
- Software Engineering (3)
- spring (7)
- struts1.x (14)
- struts2.x (14)
- strolling in cloud (1)
- subject:javaEnhance (20)
- Tomcat (7)
- validator (3)
- 学习·方法·心得 (8)
- .NET (2)
- vba (6)
- groovy (5)
- grails (2)
- SWT (0)
- big data (1)
- perl (1)
- objective-c (50)
- product (1)
- mac (7)
- ios (188)
- ios-phone (2)
- ios-system (15)
- ios-network (5)
- ios-file (4)
- ios-db (1)
- ios-media (3)
- ios-ui (27)
- ios-openSource (6)
- ios-animation (5)
- ios-drawing (7)
- c (2)
- ios-app (2)
- ios-course (15)
- ios-runtime (14)
- ios-code (8)
- ios-thread (8)
- ios-LBS (2)
- ios-issue (1)
- ios-design (2)
- Jailbreak (2)
- cocos2d (0)
- swift (16)
- ios-framework (4)
- apple watch (4)
- ios-web (1)
- react native (3)
- TVOS (1)
- OpenGL (1)
最新评论
-
xiaobinggg:
...
Session机制详解 -
菜鸟学生会:
Drools规则工作流引擎开发教程网盘地址:http://pa ...
Drools入门-----------环境搭建,分析Helloworld -
wangyudong:
不是很好用,不支持自动化测试RESTful API,也不支持自 ...
Simple REST Client POST使用方法 -
Paul0523:
很棒的一篇文章,感谢楼主分享
Session机制详解 -
啸笑天:
获取原型对象的三种方法<script>functi ...
复习JavaScript面向对象技术
一。用于执行对页面的请求,并将响应结果的客户端代码存储在JSP变量中。 有三种使用方法: 1. 使用forward属性指定forward名称 2. 使用href属性指定绝对URL 3. 使用page属性指定相对于应用程序的URL 使用bean:write输出时要将其filter属性设置为false才能显示正确信息,否则显示客户端源代码 二。 <bean:inlcude>标签:与<jsp:include>标记基本相同,都是把被包含的文件先执行,再包含;
用于加载Web应用程序资源的内容并将其以String对象存储在页面范围和本地范围内的JSP变量中。另外,你可以选择指定是否只想要资源的java.io.InputStream对象的引用而不是将其内容保存在String对象中 Web应用程序资源是那些作为Web应用程序的一部分而打包的文件。如: 如果你的Web应用程序位于名为c:\tomcat\strutssample的目录中,并有以下文件: l c:\tomcat\strutssample\index.jsp l c:\tomcat\strutssample\WEB-INF\struts-config.xml 那么你就可以将index.jsp作为“/index.jsp”来访问。请注意,WEB应用程序资源的路径与该应用程序相关,且必须用斜杠(/)开头。 如果加载资源错误,则在运行resource标记时会抛出一个JspException异常。] 用resource标记加载struts-config.xml的示例: <bean:resource id=”strutsConfig” name=”/WEB-INF/struts-config.xml”/> 访问: Struts Config file contents:<%=strutsConfig%> 或 Struts Config file contents:<bean:write name=”strutsConfig”/> 以下代码帮说明如何使用资源标记来为WEB应用程序资源获得一个java.io.InputStream的引用。 <bean:resource id=”strutsConfig” input=”true” name=”/WEB-INF/struts-config.xml”/> input属性接受任何的值。只要存在值,java.io.InputStream引用将被存储在JSP变量中,而不是包含WEB资源内容的String对象。 你可以使用bean:resource标记加载web应用程序资源的内容,比用Scriplet更简洁。 -------------------------------------------------------------------------------------------------------------------------------- header.jsp
<html:html lang="true"> <head> <html:base /> <title>header.jsp</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <bean:define id="empId" value="ssssssssssssssssssssssssssssss"/> <bean:write name="empId"/> </body> </html:html> bean:include
<bean:include id=”search forward=”forward”/>
<bean:include id=”search” href=”http://www.google.com” />
<bean:include id=”search” page=”/search.jsp”/>
区别在于: <jsp:include>直接把包含的文件显示到页面上,<bean:include>标记是把内容保存到一个局部变量中,然后再处理。
<bean:include>常用属性为 id和forward、page、href三者之一。
使用这个标记可以包含外部服务器的获取XML到本地处理。
bean:resource
<%@ page language="java" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html:html lang="true"> <head> <html:base /> <title>header.jsp</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <bean:define id="empId" value="ssssssssssssssssssssssssssssss"/> <bean:write name="empId"/> </body> </html:html>
bean:resource标签true:
<%@ page language="java" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html:html lang="true"> <head> <html:base /> <title>header.jsp</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <bean:define id="empId" value="ssssssssssssssssssssssssssssss"/> <bean:write name="empId"/> </body> </html:html>
bean:resource标签false:
bean:include标签:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="zh-CN"> <head> <base href="http://localhost:8090/SS1/header.jsp"> <title>header.jsp</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> ssssssssssssssssssssssssssssss </body> </html>
bean:include标签true:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="zh-CN"> <head> <base href="http://localhost:8090/SS1/header.jsp"> <title>header.jsp</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> ssssssssssssssssssssssssssssss </body> </html>
bean:include标签false:
ssssssssssssssssssssssssssssss
发表评论
-
struts 表单中的cancel按钮出错处理
2010-05-25 21:16 1760感谢:http://hi.baidu.com/shli ... -
Struts的配置详解
2010-05-25 21:10 1377在 Struts 的应用开发中,主要涉及到两个配置文件 ... -
struts1的几个对象---哪位大哥帮忙解释下
2010-05-24 20:18 1394<%@ page language=" ... -
tomcat中的一个过滤器例子
2010-05-22 03:14 2668感谢:http://www.iteye.com/wik ... -
<html:select>,<html:option>,<html:options>,<html:optionsCollection>标签使用
2010-05-16 22:34 16130<html:select>生 ... -
<html:checkbo>标签和ActionForm中的reset()
2010-05-12 20:26 2425<html:checkbox property= ... -
Strust组件—RequestProcessor类详解 (转)
2010-05-12 13:03 2047转自:http://hi.ba ... -
[摘]actionMessages(),actionError()介绍
2010-05-11 16:35 2494转自http://linweihan.iteye.com/bl ... -
<html:messages id="">标签 <html:errors/>标签
2010-05-11 16:09 3010<html:errors>标签与<html: ... -
html:cancel按钮的作用,cancel按钮,取消按钮
2010-05-06 00:16 3005转自http://heisetoufa.iteye.c ... -
Struts的ActionForm中不同类型属性的使用方法总结(转载)
2010-04-29 01:50 1857平时做些多表格表单显示时,actionform中经常会用到 ... -
struts1.x问题集
2010-04-28 17:26 10911.MessageResources中的html标签 -
struts1.x随笔
2010-04-28 16:57 14291. <?xml version="1 ...
相关推荐
16.2.6、<bean:resource>标签 16.2.7、国际化与<bean:message>标签 16.3、Logic标签 16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算...
16.2.6、<bean:resource>标签 16.2.7、国际化与<bean:message>标签 16.3、Logic标签 16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、...
16.2.6、<bean:resource>标签 16.2.7、国际化与<bean:message>标签 16.3、Logic标签 16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算...
16.2.6、<bean:resource>标签 16.2.7、国际化与<bean:message>标签 16.3、Logic标签 16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算...
16.2.6、<bean:resource>标签 16.2.7、国际化与<bean:message>标签 16.3、Logic标签 16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、关系运算...
16.2.6、<bean:resource>标签 16.2.7、国际化与<bean:message>标签 16.3、Logic标签 16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、...
16.2.6、<bean:resource>标签 16.2.7、国际化与<bean:message>标签 16.3、Logic标签 16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、...
16.2.6、<bean:resource>标签 16.2.7、国际化与<bean:message>标签 16.3、Logic标签 16.3.1、<logic:present>标签和<logic:notPresent>标签 16.3.2、<logic:empty>标签和<logic:notEmpty>标签 16.3.3、...
spring3.2+strut2+hibernate4 注解方式。 spring.xml ... <description>Spring公共配置文件 ...-- <bean id="sessionFactory"--> ...-- class="org.springframework.... <include file="/resource/struts-user.xml"></include>
解决方案:在 FreeMarkerViewExtend.java 33行处 增加了BasePath ,通过BasePath 来控制请求目录,在 Freemarker 中可以自由使用,而 JSP 中是直接在 JSP 中获取BasePath 使用。 解决后遗症:因为我们的权限是通过...
env.include(TPL_STYLE_LIST + listStyle + TPL_SUFFIX, UTF8, true); } else if (InvokeType.userDefined == type) { if (StringUtils.isBlank(listStyle)) { throw new ParamsRequiredException(PARAM_STYLE_...
67 5.2 JSP页面的结构 68 5.3 脚本元素 68 5.3.1 Scriptlet元素 69 5.3.2 Expression元素 69 5.3.3 Declaration元素 70 5.4 指令 73 5.4.1 page指令 73 5.4.2 include指令 75 5.5 动作 76 5.5.1 Resource动作 ...