Problems that I see:

1. Spring bean is defined as "helloWorld" but referred to as
"HelloWorld" in Struts config (case is incorrect).

2. You're saying that your action class is under src/action so I would
think the fully qualified name of the class might be
action.HelloWorldAction but that's now how you're referring to it in
the Spring config.  Also, is your class called HelloWorldAction or
HelloWorld? Just pick one and use that as your Java file name and the
class name.

3. <result name="none">: Usually result is success but I guess you
could actually return ActionSupport.NONE in your action but I get a
feeling you're not doing that either.

Zarar


On 10/18/07, Ádamo Azambuja <[EMAIL PROTECTED]> wrote:
>  i Have this problem and i lost 2 days trying do fix, what can i do in this
> case?
>
> I use java 1.4.2 / Struts 2 J4 / Hibernate and Spring.
>
> i have the HelloWorld.java in the src and src/action to test.
>
>
> *struts.xml *
> <include file="struts-default.xml"/>
>
> <constant name="struts.objectFactory" value="
> org.apache.struts2.spring.StrutsSpringObjectFactory" />
>
> <constant name="struts.devMode" value="true" />
> <package name="action" extends="struts-default">
> <action name="HelloWorld" class="HelloWorld">
> <result name="none">/HelloWorld.jsp</result>
> </action>
> </package>
>
> *applicationContext.xml *
> <bean class="
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter" />
> <bean id="helloWorld"
> class="HelloWorldAction" singleton="false">
> </bean>
>
> *web.xml *
> <filter>
> <filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
> <filter-class>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
> </filter-class>
> </filter>
> <filter-mapping>
> <filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <filter>
> <filter-name >struts</filter-name>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-c lass>
>
> </filter>
> <filter-mapping>
> <filter-name>struts</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> --
> Ádamo B. Azambuja
> JEE Developer
> icq: 112102893
> msn: [EMAIL PROTECTED]
> E-Mail 1: [EMAIL PROTECTED]
> E-Mail 2: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to