我写了一个小的登录过程,可是发现项目中没有struts.proprety这个文件也能运行。我在网上查了都说要和spring配置的时
候要修改struts.property里面的属性不知道这个文件在哪找到?是不是struts2.1.6不需要struts.property这个文件么?
还有就是struts2.1.6怎么配置让spring代理?并且spring里怎么代理他呢?给个简单的代码给我看下呵呵~~~~!!
候要修改struts.property里面的属性不知道这个文件在哪找到?是不是struts2.1.6不需要struts.property这个文件么?
还有就是struts2.1.6怎么配置让spring代理?并且spring里怎么代理他呢?给个简单的代码给我看下呵呵~~~~!!
解决方案 »
- 问一个简单的问题,通过httpClient获取页面源代码的问题
- 请教java和flex如何交互?
- spring annotation注入继承的属性
- 如何处理同一个用户服务只有一人在线
- struts+hibernate开发中出现的一个问题,在线等你帮我。
- 探讨:spring的annotation是否应该大量使用,或者替代xml配置
- 100分求struts中错误Error in using tag library uri='/WEB-INF/struts-html.tld' prefix='html': 的解决方法
- 会Cocoon的请进,Weblogic中装Cocoon的问题?
- 关于struts的问题,急求!
- spring 的一个属性注入的问题
- struts2里select标签的问题
- 多对多关系,lazy怎么用
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
</param-value>
</context-param> <listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener> <filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter> <filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>struts.xml<struts>
<constant name="struts.objectFactory" value="spring" />
<package name="one" extends="struts-default">
<action name="login_form">
<result>/WEB-INF/jsp/login_form.jsp</result>
</action>
</package>
</struts>applicationContext.xml<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> <bean id="login" class="action.Login" scope="prototype">
</bean>
</beans>
like 楼上的
properties用在资源国际化的时候居多.