Hi again,
I decided to start everything over, then I recreated the web application
and tested each step, so to find what was that I was doing that triggered
the strange errors I was receiving.
I managed to create an action, pass parameters to it and display them at
the velocity result page. The validation framework worked fine this time.
Everything worked this far.
When I added the RequestLifecycleFilter to web.xml, I started getting
that old RuntimeException again:
java.lang.RuntimeException: Fallback must be an instance of
DefaultConfigurationManager
at
com.opensymphony.xwork.interceptor.component.DefaultComponentManager.setFall
back(DefaultComponentManager.java:50)
at
com.opensymphony.webwork.lifecycle.RequestLifecycleFilter.doFilter(RequestLi
fecycleFilter.java:55)
I tried both <url-pattern>/*</url-pattern> and
<url-pattern>*.action</url-pattern>, and both gave me the exception above.
I really would like to understand what that error means. Below there are
some files that might help you experts help me. I thank very much all the
help in this. Sorry to post the same problems over and over again.
- V�tor Souza
======================= WEB.XML ============================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>CyTour</display-name>
<filter>
<filter-name>container</filter-name>
<filter-class>com.opensymphony.webwork.lifecycle.RequestLifecycleFilter</fil
ter-class>
</filter>
<filter-mapping>
<filter-name>container</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>com.opensymphony.webwork.lifecycle.ApplicationLife
cycleListener</listener-class></listener>
<listener><listener-class>com.opensymphony.webwork.lifecycle.SessionLifecycl
eListener</listener-class></listener>
<servlet>
<servlet-name>velocity</servlet-name>
<servlet-class>com.opensymphony.webwork.views.velocity.WebWorkVelocityServle
t</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>webwork</servlet-name>
<servlet-class>com.opensymphony.webwork.dispatcher.ServletDispatcher</servle
t-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>webwork</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>velocity</servlet-name>
<url-pattern>*.vm</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.vm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>webwork</taglib-uri>
<taglib-location>/WEB-INF/lib/webwork-2.0.jar</taglib-location>
</taglib>
</web-app>
======================= XWORK.XML ============================
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-1.0.dtd">
<xwork>
<!-- Include webwork defaults (from WebWork-2.0 JAR package). -->
<include file="webwork-default.xml" />
<!-- Configuration for the default package. -->
<package name="default" extends="webwork-default">
<!-- Default interceptor stack. -->
<default-interceptor-ref name="validationWorkflowStack" />
<!-- Action: login de administrador. -->
<action name="adminLogin"
class="br.inf.netropolis.cytour.core.aplicacao.webwork.actions.AdminLoginAct
ion">
<result name="success" type="velocity"><param
name="location">home.vm</param></result>
<result name="input" type="velocity"><param
name="location">index.vm</param></result>
<result name="error" type="velocity"><param
name="location">index.vm</param></result>
</action>
</package>
</xwork>
======================= COMPONENTS.XML ============================
<components>
<component>
<scope>session</scope>
<class>br.inf.netropolis.cytour.core.aplicacao.AppCytour</class>
<enabler>br.inf.netropolis.cytour.core.aplicacao.webwork.components.AppCytou
rAware</enabler>
</component>
</components>
======================= CLASSES ============================
public interface AppCytourAware {
public void setAppCytour(AppCytour appCytour);
}
public class AppCytourAwareAction extends ActionSupport implements
AppCytourAware {
protected AppCytour appCytour;
public AppCytour getAppCytour() { return appCytour; }
public void setAppCytour(AppCytour appCytour) { this.appCytour =
appCytour; }
public String execute() throws Exception { return SUCCESS; }
}
public class AdminLoginAction extends AppCytourAwareAction {
private String login;
private String senha;
public String getLogin() { return login; }
public void setLogin(String login) { this.login = login; }
public String getSenha() { return senha; }
public void setSenha(String senha) { this.senha = senha; }
public String execute() throws Exception {
login += (appCytour == null) ? " (components did not work)" : "
(components worked)";
return SUCCESS;
}
}
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork