可能的原因没有将 properties 文件在Struts-config.xml里没有配置!加上
<controller processorClass="你资源文件的文件的路径"></controller>
<message-resources parameter="com.xxx.xxx.struts.ApplicationResources" />
试试.....
<controller processorClass="你资源文件的文件的路径"></controller>
<message-resources parameter="com.xxx.xxx.struts.ApplicationResources" />
试试.....
是不是这个配置文件没有copy到相应路径?
如果不行加到web.xml下看看
你的配置文件找到了,但是addressDetail有问题,仔细再看看,祝你好运
里面用到addressDetail?
看看你的spring配置文件是不是写多了
例子:beans.xml(放在hibernate包内)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING/DTD BEAN/EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="one" class="hibernateinfo.Allfind"/>
<bean id="all" class="hibernateinfo.Idfind" />
</beans>调用:
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.core.io.Resource; ApplicationContext ctx = new ClassPathXmlApplicationContext("hibernateinfo/beans.xml");
Allfind Allfind = (Allfind)ctx.getBean("one");
Idfind Idfind = (all)ctx.getBean("all");//================好了给分啊=====================