`
春天在哪里?
  • 浏览: 13980 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类

解决struts1的配置文件中将action作为<welcome-file-list>的欢迎文件

阅读更多

<welcome-file-list>。。。不能直接把strutsAction作为欢迎文件,以下是在欢迎文件中调用struts action

在struts-config.xml配置文件中添加如下一段代码

<global-forwards>

 <forward name="welcome" path="HelloWorld.do"/>

</global-forwards>

 

 

 在welcome.jsp页面中添加如下一段代码:

<body>

<logic:forward name="welcome"/>

</body>

 

 

 

 在web.xml页面中添加如下一段代码:

<welcome-file-list>

<welcome-file>welcome.jsp</welcome-file>

</welcome-file-list>

分享到:
评论

相关推荐

    生活轨迹SSH服务端

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;listener&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt; &lt;!-- 默认找的...

    SpringStrutsHibernate的配置

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; 把servlet-name等的servlet改为filter就变成了过滤器了。 说明:要继承HttpServlet类 一、 ①处可以随便取一个名字,但一般是和...

    解决struts2.1.6+spring+hibernate 中文乱码

    &lt;filter-name&gt;struts-cleanup&lt;/filter-name&gt; &lt;filter-class&gt; org.apache.struts2.dispatcher.ActionContextCleanUp &lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts-cleanup&lt;/filter-name&gt; ...

    struts2配置2.5版

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;!-- 配置核心拦截器 --&gt; &lt;filter&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;!-- Filter的实现类 struts2.5 --&...

    struts-2.3.4.1所需的jar文件

    接触新版本出了问题后,解决了把jar文件...&lt;package name="default" namespace="/" extends="struts-default"&gt; &lt;action name="helloworld"&gt; &lt;result&gt; /helloWorld.jsp &lt;/result&gt; &lt;/action&gt; &lt;/package&gt; &lt;/struts&gt;

    Struts2整合SiteMesh技巧

    &lt;filter-name&gt;struts-cleanup&lt;/filter-name&gt; &lt;filter-class&gt;org.apache.struts2.dispatcher.ActionContextCleanUp&lt;/filter-class&gt; filter&gt; &lt;filter&gt; &lt;filter-name&gt;sitemesh&lt;/filter-name&gt; &lt;filter-class&gt;...

    struts框架jar包

    logging-1.0.4.jar&lt;br&gt;commons-validator-1.3.1.jar&lt;br&gt;jstl-1.0.2.jar&lt;br&gt;oro-2.0.8.jar&lt;br&gt;standard-1.0.2.jar&lt;br&gt;struts-core-1.3.8.jar&lt;br&gt;struts-el-1.3.8.jar&lt;br&gt;struts-extras-1.3.8.jar&lt;br&gt;struts-faces-...

    让Struts2直接支持浏览FreeMarker的FTL文件

    &lt;servlet-class&gt;org.apache.struts2.views.freemarker.FreemarkerServlet&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;freemarker&lt;/servlet-name&gt; &lt;url-pattern&gt;*.ftl&lt;/url-pattern&gt; &lt;/...

    struts2文件上传

    &lt;include file="struts-default.xml"&gt;&lt;/include&gt; &lt;constant name="struts.i18n.encoding" value="GBK"&gt;&lt;/constant&gt; &lt;!--设置临时上传目录--&gt; &lt;constant name="struts.multipart.saveDir" value="d:\"&gt;&lt;/constant&gt; ...

    struts配置元素详解

    &lt;?xml version=”1.0” encoding=”ISO-8859-1”?&gt; &lt;!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" ...&lt;/struts-config&gt;

    公司人力资源管理系统

     &lt;taglib-uri&gt;/tags/struts-bean&lt;/taglib-uri&gt;  &lt;taglib-location&gt;/WEB-INF/struts-bean.tld&lt;/taglib-location&gt;  &lt;/taglib&gt;    &lt;taglib&gt;  &lt;taglib-uri&gt;/tags/struts-logic&lt;/taglib-uri&gt;  &lt;taglib-location&gt;/...

    struts-2.5.13

    &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;!-- 过滤器的名字 --&gt; &lt;filter-class&gt;org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt; &lt;!-- 引用个具体类文件 --&gt; &lt;/...

    spring3.2+strut2+hibernate4

    spring3.2+strut2+hibernate4 注解方式。&lt;struts&gt; spring.xml &lt;beans xmlns="http://www.springframework.org/schema/beans" ... ... &lt;include file="/resource/struts-user.xml"&gt;&lt;/include&gt;

    jfreechar 整合struts2.1.8版本生成线图,饼图,柱形图

    &lt;include file="struts-default.xml"&gt;&lt;/include&gt; &lt;!-- package提供了将多个Action组织为一个模块的方式 package的名字必须是唯一的 package可以扩展 当一个package扩展自 另一个package时该package会在本身...

    Spring + Hibernate + Struts 事务配置小例子(带提示框等小技巧)

    前几天搞 Spring + Hibernate + Struts 事务配置 ,网上找了好多资料,不过好无语,大多都是 Ctrl + V,浪费俺的宝贵时间 现在我总结配出一套,给大家参考参考,可能有不足,请大家多多交流。 附:内有弹出...

    EJB+JBOSS6.0+STRUT2简单登录实例

    -- 定义包管理配置的action 继承struts-default.xml中的配置 --&gt; &lt;package name="actions" extends="struts-default"&gt; &lt;!-- 定义Action(login.action) --&gt; &lt;action name="login" class="mypack.UserAction"&gt; &lt;!...

    struts项目搭建

    &lt;include file="struts-default.xml"/&gt; &lt;/struts&gt; 然后在新建一个内容为空的struts.properties文件。 至此项目搭建完毕,然后将其发布。 3、发布项目 在myeclipse里面可以嵌入tomcat,配置外部tomcat然后将项目...

    基于EXT SSI的简单树实现

    &lt;description&gt;struts2初始配置文件&lt;/description&gt; &lt;param-name&gt;config&lt;/param-name&gt; &lt;param-value&gt;conf/struts/struts.xml&lt;/param-value&gt; &lt;/init-param&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;...

    struts1 demo

    &lt;struts-config&gt; &lt;form-beans&gt; &lt;form-bean name="LoginForm" type="com.yza.struts.form.LoginForm"&gt;&lt;/form-bean&gt; &lt;/form-beans&gt; &lt;global-exceptions /&gt; &lt;global-forwards /&gt; &lt;action-mappings&gt; &lt;action ...

    上传文件,有进度条

    &lt;package name="struts2" extends="struts-default"&gt; &lt;!-- 用于处理上传文件的ACTION --&gt; &lt;action name="uploadUtil" class="com.struts.action.UploadUtilAction" method="uploadFile" /&gt; &lt;!-- 用于展示所有...

Global site tag (gtag.js) - Google Analytics