struts-config.xml中
<plug-in className="org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn">
<set-property property="pathname" value="/WEB-INF/database.xml"/>
</plug-in>
<plug-in className="org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn">
<set-property property="pathname" value="/WEB-INF/database.xml"/>
</plug-in>
解决方案 »
- list问题(hashmap转换)
- request.getHeader("user-agent");这一方法得到的结果如何来获取浏览器和操作系统
- 我疯了!!!!!项目丢失
- 在JSP页中如何嵌入视频播放器?以及在播放视频时后台需要做什么处理?(最好是Flash为例)谢谢了!
- 发发牢骚!缓解郁闷!
- jap调用java程序
- 如何在applet中插入一个图片超链?
- 关于Tomcat事件的监听的问题
- 如果在网页上实现树状的结构,大家有没有实例代码可以给小弟参考一下!
- 怎样取一个串中字符的所以位置
- 100分,如何安装sturts?解决马上送分
- javax.servlet和javax.servlet.http包应该放在哪个目录下?
<plug-in className="org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn">
<set-property property="pathname" value="/WEB-INF/database.xml"/>
</plug-in>指定的是pathname,这个不太了解...
而
<logic:notPresent name="database" scope="application"></logic:notPresent>这句是查找当前应用范围内是否存在一个名为"database"的bean.我想这个database应该指向一个具体的bean.可是配置中没有指定呀!!!
还有
<logic:notPresent name="org.apache.struts.action.MESSAGE" scope="application"></logic:notPresent>
这个"MESSAGE"又与谁在那里关联的呢!!!!
多谢!!!
你可以认真看一下MemoryDatabasePlugIn.java
public void init(ActionServlet servlet, ModuleConfig config)
throws ServletException {
...
// Make the initialized database available
servlet.getServletContext().setAttribute(Constants.DATABASE_KEY,
database);
...
在ActionServlet里用
org.apache.struts.action.FORM_BEANS
org.apache.struts.action.FORWARDS
org.apache.struts.action.MAPPINGS
org.apache.struts.action.MESSAGE
等来关联struts-config.xml中的Element
其中org.apache.struts.action.MESSAGE关联struts-config.xml中的<message-resources> Element
而struts-config.xml中
<!-- ========== Message Resources Definitions =========================== --> <message-resources
parameter="org.apache.struts.webapp.example.ApplicationResources"/> <message-resources
parameter="org.apache.struts.webapp.example.AlternateApplicationResources"
key="alternate">
</message-resources>
和 wlz_bj() 说得还差不多
<html:html locale="true">//上边这句什么意思??<head>
<title><bean:message key="index.title"/></title>
<html:base/>
</head>
<body bgcolor="white"><logic:notPresent name="database" scope="application">还有
<html:html
<bean:message
<logic:notPresent
这几个标签是什么意思啊? 有人可以告诉我吗?
可以开贴给分的。
DJ Java Decompiler 2.9
chili1979(中国龙)
建议去用一下struts提供的例子
struts-exercise-taglib.war
里面是关于标签的例子