You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Olivier Bex <bo...@e-optimit.com> on 2006/06/07 18:06:12 UTC

struts-config xml file throws a java exception

Hi everyone, 

 

When I start Tomcat 5.0.28, it says that I have a parsing error in my
struts-config.xml, but I think it's not.

The log file throws a java.lang.NoSuchMethodException : bean has no property
named loginRequired

 

Regards,

 

Olivier BEX


RE: struts-config xml file throws a java exception

Posted by Olivier Bex <bo...@e-optimit.com>.
Hi David,

Thanks for your advice. I have sent a mail to struts users mailing list.

Here is sample of my struts-config.xml : 

- <struts-config>
- <data-sources>
- <data-source>
  <set-property property="driverClass" value="org.gjt.mm.mysql.Driver" /> 
  <set-property property="url" value="jdbc:mysql://localhost/employes" /> 
  <set-property property="maxCount" value="5" /> 
  <set-property property="minCount" value="1" /> 
  <set-property property="user" value="root" /> 
  <set-property property="password" value="root" /> 
  </data-source>
  </data-sources>
- <form-beans>
  <form-bean name="loginForm" type="com.eyrolles.LoginForm" /> 
  <form-bean name="employeForm" type="com.eyrolles.EmployeForm" /> 
  </form-beans>
- <global-forwards>
  <forward name="login" path="/login.jsp" /> 
  </global-forwards>
- <action-mappings>
- <action path="/Login" type="com.eyrolles.LoginAction" validate="true"
input="/login.jsp" name="loginForm" scope="request">
  <forward name="success" path="/EmployeListe.do" /> 
  </action>
- <action path="/EmployeListe" type="com.eyrolles.EmployeListeAction"
scope="request">
  <set-property property="loginRequired" value="true" /> 
  <forward name="success" path="/employeliste.jsp" /> 
  </action>
- <action path="/Add" type="com.eyrolles.AddEmployeAction"
name="employeForm" scope="request" input="/addemploye.jsp" validate="true">
  <set-property property="loginRequired" value="true" /> 
  <forward name="success" path="/EmployeListe.do" /> 
  <forward name="error" path="/addemploye.jsp" /> 
  </action>
[...]
  </action-mappings>
  <message-resources parameter="com.eyrolles.ApplicationResources" /> 
  </struts-config>

-----Message d'origine-----
De : David Smith [mailto:dns4@cornell.edu] 
Envoyé : mercredi 7 juin 2006 18:25
À : Tomcat Users List
Objet : Re: struts-config xml file throws a java exception

1. This might be better diagnosed on a struts user list.

2. Could you provide some context for the reference to loginRequired in 
your struts-config.xml?  I'm not familiar with any configuration 
elements or attributes in struts-config.xml named 'loginRequired'.

--David



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: struts-config xml file throws a java exception

Posted by David Smith <dn...@cornell.edu>.
1. This might be better diagnosed on a struts user list.

2. Could you provide some context for the reference to loginRequired in 
your struts-config.xml?  I'm not familiar with any configuration 
elements or attributes in struts-config.xml named 'loginRequired'.

--David

Olivier Bex wrote:

>Hi everyone, 
>
> 
>
>When I start Tomcat 5.0.28, it says that I have a parsing error in my
>struts-config.xml, but I think it's not.
>
>The log file throws a java.lang.NoSuchMethodException : bean has no property
>named loginRequired
>
> 
>
>Regards,
>
> 
>
>Olivier BEX
>
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: struts-config xml file throws a java exception

Posted by Olivier Bex <bo...@e-optimit.com>.
According to my java file, the property loginRequired is in a java class
that extends ActionMapping. In addition, the setter and getter methods are
set. Thanks for the help.

Regards,
Olivier. 

-----Message d'origine-----
De : Frank W. Zammetti [mailto:fzlists@omnytex.com] 
Envoyé : mercredi 7 juin 2006 18:50
À : Struts Users Mailing List
Cc : 'Struts Users Mailing List'
Objet : RE: struts-config xml file throws a java exception

I didn't even think <set-property> was available on action mappings in
1.1, but maybe I'm not remembering right.

Anyway, my understanding of <set-property> is that it is setting a
property on the *ActionMapping*, and *not* on the Action.  To use it, you
need to subclass ActionMapping and declare that subclass using the
className attribute of the action mapping.

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: struts-config xml file throws a java exception

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
I didn't even think <set-property> was available on action mappings in
1.1, but maybe I'm not remembering right.

Anyway, my understanding of <set-property> is that it is setting a
property on the *ActionMapping*, and *not* on the Action.  To use it, you
need to subclass ActionMapping and declare that subclass using the
className attribute of the action mapping.

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

On Wed, June 7, 2006 12:42 pm, Olivier Bex wrote:
> I'm using struts 1.1 with eclipse 3.1 and myeclipseIDE
>
> -----Message d'origine-----
> De : Frank W. Zammetti [mailto:fzlists@omnytex.com]
> Envoyé : mercredi 7 juin 2006 18:39
> À : Tomcat Users List
> Cc : user@struts.apache.org
> Objet : RE: struts-config xml file throws a java exception
>
> Olivier, what version of Struts are you using?
>
> Frank
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM: fzammetti
> Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
> Java Web Parts -
> http://javawebparts.sourceforge.net
> Supplying the wheel, so you don't have to reinvent it!
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: struts-config xml file throws a java exception

Posted by Olivier Bex <bo...@e-optimit.com>.
I'm using struts 1.1 with eclipse 3.1 and myeclipseIDE

-----Message d'origine-----
De : Frank W. Zammetti [mailto:fzlists@omnytex.com] 
Envoyé : mercredi 7 juin 2006 18:39
À : Tomcat Users List
Cc : user@struts.apache.org
Objet : RE: struts-config xml file throws a java exception

Olivier, what version of Struts are you using?

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: struts-config xml file throws a java exception

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Olivier, what version of Struts are you using?

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

On Wed, June 7, 2006 12:34 pm, Olivier Bex wrote:
> Hi Frank, thanks for the advice. I have sent a mail to struts users.
>
> Here is my struts-config.xml :
>
> - <struts-config>
> - <data-sources>
> - <data-source>
>   [...]
>   </data-source>
>   </data-sources>
> - <form-beans>
>   [...]
>   </form-beans>
> - <global-forwards>
>   <forward name="login" path="/login.jsp" />
>   </global-forwards>
> - <action-mappings>
> - <action path="/Login" type="com.eyrolles.LoginAction" validate="true"
> input="/login.jsp" name="loginForm" scope="request">
>   <forward name="success" path="/EmployeListe.do" />
>   </action>
> - <action path="/EmployeListe" type="com.eyrolles.EmployeListeAction"
> scope="request">
>   <set-property property="loginRequired" value="true" />
>   <forward name="success" path="/employeliste.jsp" />
>   </action>
> - <action path="/Add" type="com.eyrolles.AddEmployeAction"
> name="employeForm" scope="request" input="/addemploye.jsp"
> validate="true">
>   <set-property property="loginRequired" value="true" />
>   <forward name="success" path="/EmployeListe.do" />
>   <forward name="error" path="/addemploye.jsp" />
>   </action>
> - <action path="/Edit" type="com.eyrolles.GetEmployeAction"
> name="employeForm" scope="request" validate="false">
>   <set-property property="loginRequired" value="true" />
>   <forward name="success" path="/editemploye.jsp" />
>   <forward name="error" path="/EmployeListe.do" />
>   </action>
> - [...]
>   </action-mappings>
>   <message-resources parameter="com.eyrolles.ApplicationResources" />
>   </struts-config>
>
> -----Message d'origine-----
> De : Frank W. Zammetti [mailto:fzlists@omnytex.com]
> Envoyé : mercredi 7 juin 2006 18:07
> À : Tomcat Users List
> Cc : users@tomcat.apache.org
> Objet : Re: struts-config xml file throws a java exception
>
> Olivier, can you post your struts-config.xml file here, or is it too
> large?  You also may want to move this over to the Struts @user list,
> chances are its more appropriate there.
>
> Frank
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM: fzammetti
> Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
> Java Web Parts -
> http://javawebparts.sourceforge.net
> Supplying the wheel, so you don't have to reinvent it!
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: struts-config xml file throws a java exception

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Olivier, what version of Struts are you using?

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

On Wed, June 7, 2006 12:34 pm, Olivier Bex wrote:
> Hi Frank, thanks for the advice. I have sent a mail to struts users.
>
> Here is my struts-config.xml :
>
> - <struts-config>
> - <data-sources>
> - <data-source>
>   [...]
>   </data-source>
>   </data-sources>
> - <form-beans>
>   [...]
>   </form-beans>
> - <global-forwards>
>   <forward name="login" path="/login.jsp" />
>   </global-forwards>
> - <action-mappings>
> - <action path="/Login" type="com.eyrolles.LoginAction" validate="true"
> input="/login.jsp" name="loginForm" scope="request">
>   <forward name="success" path="/EmployeListe.do" />
>   </action>
> - <action path="/EmployeListe" type="com.eyrolles.EmployeListeAction"
> scope="request">
>   <set-property property="loginRequired" value="true" />
>   <forward name="success" path="/employeliste.jsp" />
>   </action>
> - <action path="/Add" type="com.eyrolles.AddEmployeAction"
> name="employeForm" scope="request" input="/addemploye.jsp"
> validate="true">
>   <set-property property="loginRequired" value="true" />
>   <forward name="success" path="/EmployeListe.do" />
>   <forward name="error" path="/addemploye.jsp" />
>   </action>
> - <action path="/Edit" type="com.eyrolles.GetEmployeAction"
> name="employeForm" scope="request" validate="false">
>   <set-property property="loginRequired" value="true" />
>   <forward name="success" path="/editemploye.jsp" />
>   <forward name="error" path="/EmployeListe.do" />
>   </action>
> - [...]
>   </action-mappings>
>   <message-resources parameter="com.eyrolles.ApplicationResources" />
>   </struts-config>
>
> -----Message d'origine-----
> De : Frank W. Zammetti [mailto:fzlists@omnytex.com]
> Envoyé : mercredi 7 juin 2006 18:07
> À : Tomcat Users List
> Cc : users@tomcat.apache.org
> Objet : Re: struts-config xml file throws a java exception
>
> Olivier, can you post your struts-config.xml file here, or is it too
> large?  You also may want to move this over to the Struts @user list,
> chances are its more appropriate there.
>
> Frank
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM: fzammetti
> Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
> Java Web Parts -
> http://javawebparts.sourceforge.net
> Supplying the wheel, so you don't have to reinvent it!
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: struts-config xml file throws a java exception

Posted by Olivier Bex <bo...@e-optimit.com>.
Hi Frank, thanks for the advice. I have sent a mail to struts users.

Here is my struts-config.xml : 

- <struts-config>
- <data-sources>
- <data-source>
  [...]
  </data-source>
  </data-sources>
- <form-beans>
  [...]
  </form-beans>
- <global-forwards>
  <forward name="login" path="/login.jsp" /> 
  </global-forwards>
- <action-mappings>
- <action path="/Login" type="com.eyrolles.LoginAction" validate="true"
input="/login.jsp" name="loginForm" scope="request">
  <forward name="success" path="/EmployeListe.do" /> 
  </action>
- <action path="/EmployeListe" type="com.eyrolles.EmployeListeAction"
scope="request">
  <set-property property="loginRequired" value="true" /> 
  <forward name="success" path="/employeliste.jsp" /> 
  </action>
- <action path="/Add" type="com.eyrolles.AddEmployeAction"
name="employeForm" scope="request" input="/addemploye.jsp" validate="true">
  <set-property property="loginRequired" value="true" /> 
  <forward name="success" path="/EmployeListe.do" /> 
  <forward name="error" path="/addemploye.jsp" /> 
  </action>
- <action path="/Edit" type="com.eyrolles.GetEmployeAction"
name="employeForm" scope="request" validate="false">
  <set-property property="loginRequired" value="true" /> 
  <forward name="success" path="/editemploye.jsp" /> 
  <forward name="error" path="/EmployeListe.do" /> 
  </action>
- [...]
  </action-mappings>
  <message-resources parameter="com.eyrolles.ApplicationResources" /> 
  </struts-config>

-----Message d'origine-----
De : Frank W. Zammetti [mailto:fzlists@omnytex.com] 
Envoyé : mercredi 7 juin 2006 18:07
À : Tomcat Users List
Cc : users@tomcat.apache.org
Objet : Re: struts-config xml file throws a java exception

Olivier, can you post your struts-config.xml file here, or is it too
large?  You also may want to move this over to the Struts @user list,
chances are its more appropriate there.

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: struts-config xml file throws a java exception

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Olivier, can you post your struts-config.xml file here, or is it too
large?  You also may want to move this over to the Struts @user list,
chances are its more appropriate there.

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

On Wed, June 7, 2006 12:06 pm, Olivier Bex wrote:
> Hi everyone,
>
>
>
> When I start Tomcat 5.0.28, it says that I have a parsing error in my
> struts-config.xml, but I think it's not.
>
> The log file throws a java.lang.NoSuchMethodException : bean has no
> property
> named loginRequired
>
>
>
> Regards,
>
>
>
> Olivier BEX
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org