Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 20 May 2008 18:37:55 -0000 Issue 8040

user-digest-help

2008-05-20


Author LoginPost Reply

user Digest 20 May 2008 18:37:55 -0000 Issue 8040

Topics (messages 186627 through 186641):

Re: What's the procedure to be taken off the strut email list ?
 186627 by: Jose Cardoso

Hello all: Date Validation... An old issue, i guess...
 186628 by: dwarven_axe.tin.it

Re: Can one use the annotation action specification with Tiles?
 186629 by: Dave Newton
 186632 by: Gamble, Wesley (WG10)

Re: (repost) en-us theme=ajax 404 error on Struts 2.0.9
 186630 by: Milan Milanovic

Re: Struts 2 xml validation doesn't work
 186631 by: smoonoz
 186640 by: smoonoz

NoClassDefFoundError Exception
 186633 by: Felipe Lorenz
 186634 by: Jim Kiley
 186635 by: Rushikesh Thakkar
 186637 by: Felipe Lorenz

Re: Struts 2: After validation fail, how to change the returning result name to other than INPUT?
 186636 by: Phan, Hienthuc T

Re: Submitting a form without selecting checkboxes yields 'Input' result
 186638 by: Laurie Harper
 186639 by: Michael Gagnon

Re: Struts[2] : Checkboxlist Problems
 186641 by: Greg Lindholm

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_186627.ezm (zipped)


Thanks

jose

-----Original Message-----
From: Musachy Barroso [mailto:musachy@(protected)]
Sent: 20 May 2008 16:31
To: Struts Users Mailing List
Subject: Re: What's the procedure to be taken off the strut email list ?

email "user-unsubscribe@(protected).

musachy

On Tue, May 20, 2008 at 11:28 AM, Jose Cardoso <Jose.Cardoso@(protected):
>
> Hi All !
>
> What's the procedure to have my email removed from the struts mailing list ? I have already requested my email to be taken off the list but the administrators don't seem to be willing to do it .
>
> Jose
>
> -----Original Message-----
> From: Milan Milanovic [mailto:milanmilanovich@(protected)]
> Sent: 20 May 2008 16:23
> To: Struts Users Mailing List
> Subject: Re: [Struts 2] Datetimepicker tag Bug ?!
>
> I'm not sure if this is a problem. I switched my browser only to US locale language and also in regional options and it is the same! I think that is some conversion problem from jsp page to Date in version 2.0.11.1.
>
> Regards, Milan
>
> Ian Meikle <imeikle@(protected).
> I assume you are not using an US locale in your client browser.
> We use Norwegian and German and it does not work.
>
> Regards
> Ian
>
> CSC Solutions Norge AS
> Registered Office: SandsliƄsen 57, 5254 Sandsli, Norway Registered in
> Norway No: 958 958 455
>
>
>
> **********************************************************************
> *********** Working Together for a Better Tower Hamlets Web site :
> http://www.towerhamlets.gov.uk
>
> London Borough of Tower Hamlets E-Mail Disclaimer.
>
> This communication and any attachments are intended for the addressee only and may be confidential. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this E-Mail in error please notify us as soon as possible and delete this E-Mail and any attachments. This message has been checked for viruses, however we cannot guarantee that this message or any attachment is virus free or has not been intercepted or amended. The information contained in this E-Mail may be subject to public disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the Confidentiality of this E-Mail and your reply cannot be guaranteed.
>
> If your request relates to a Freedom of Information enquiry, please
> resend this to foi@(protected)
> **********************************************************************
> **************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


Attachment: user_186628.ezm (zipped)
Hi all, i'm Dome, from Italy, and i'm having my troubles with Date
Validation on Struts 2 :|

Using xml validation, and need to validate a
date.

Let's say i have 2 dates taken from html form. I need the second
one (if it does exist: it is not mandatory, actually) to be after the
first one.

Used coding such as:



<field name="dateEnd">
   
<field-validator type="fieldexpression">
       <param name="
expression"><![CDATA[dateEnd > dateStart]]></param>
       
<message>ERROR MESSAGE</message>
    </field-validator>
</field>


or

<field name="dateEnd">
    <field-validator type="date">
                 <param name="min">$dateStart</param> (Used
also dateStart or #dateStart)
       <message>ERROR MSG</message>
    </field-validator>
</field>

But none worked...

Any
suggestion?


Thanks a lot...

Attachment: user_186629.ezm (zipped)
--- "Gamble, Wesley (WG10)" <WG10@(protected):
> So, are you saying that this:
>
> <result-types>
>  <result-type name="tiles"
>           class="org.apache.struts2.views.tiles.TilesResult"
default="true"/>
> </result-types>
>
> in my struts.xml doesn't influence how the annotation-specified
> result is processed?

No, I'm saying you didn't define the result type in the result
annotation. The above configuration fragment defines the tiles
result--it doesn't say to *use* it anywhere.

http://struts.apache.org/2.x/docs/result-annotation.html

The @Result annotation takes a "type" parameter.

Dave


Attachment: user_186632.ezm (zipped)
It's interesting is that the "default=true" attribute in the
<result-types> element in struts.xml doesn't seem to influence
annotation-based results specification like it does for the XML
configuration.

In XML, if I set default=true on <result-types>, I don't need to specify
a Tiles result at the action level.

But with annotations, I do need to specify the Tiles result explicitly
on each action. A minor annoyance at worst.

Wes


Dave Newton said:

No, I'm saying you didn't define the result type in the result
annotation. The above configuration fragment defines the tiles
result--it doesn't say to *use* it anywhere.

http://struts.apache.org/2.x/docs/result-annotation.html

The @Result annotation takes a "type" parameter.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


Attachment: user_186630.ezm (zipped)

I'm having this same type of error for datetimepicker but for Struts
2.0.11.1. Maybe this is a problem with datetimepicker ?

--
Milan


WayneFH wrote:
>
> This repost includes the struts config file as requested by mgainty.
> Thanks.
> NOTE: There is NO stack trace. These are errors we see in the FireBugs
> HTTP log and also the lack of rendering the DropDownDatePicker.
>
> In FireBug, we get the following errors when using <s:head theme="ajax">.
> The source code follows the list of errors. Additionally, our
> <s:dropdowndatepicker> tag doesn't appear.
>
> NOTE: There are successfully "gets" for all of these files under the nls
> directory without the en-us. Why is it looking in en-us? We're lost.
> Pleeease help.
>
> GET
> http://localhost:8080/FirstHCM/struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js
> 404 (47ms) dojo.js (line 734)
> GET
> http://localhost:8080/FirstHCM/struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js
> 404 (47ms)dojo.js (line 734)
> GET
> http://localhost:8080/FirstHCM/struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js
> 404 (31ms)dojo.js (line 734)
> GET
> http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en/TimePicker.js
> 404 (62ms)dojo.js (line 734)
> GET
> http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en-us/TimePicker.js
> 404 (47ms)dojo.js (line 734)
> GET
> http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en/DropdownTimePicker.js
> 404 (31ms)dojo.js (line 734)
> GET
> http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js
> 404 (47ms)dojo.js (line 734)
> GET
> http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en/DropdownDatePicker.js
> 404 (46ms)dojo.js (line 734)
> GET
> http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en-us/DropdownDatePicker.js
> 404 (47ms)dojo.js (line 734)
>
> <%@(protected).*"%>
> <%@(protected)" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <html>
>  <head>
>   <s:head theme="ajax" debug="false"/>
>  </head>
>   <body>
>   <s:tabbedPanel id="Requestor" >
>      <s:div id="tab1" label="Name" labelposition="top" theme="ajax">
>           <s:form method="post">
>                 <table>
>                    <s:datetimepicker name="From" label="From"
> displayFormat="MM-dd-yyyy"/>
>                    <s:datetimepicker name="To" label="To"
> displayFormat="MM-dd-yyyy"/>
>                   <s:textfield label="Requestor Name/ Last name"
> name="LASTNAME" size="25"/>
>                   <s:textfield label="First Name"
> name="FIRSTNAME" />
>                      <s:submit name="SUBMIT" value="Find Now"/>
>                 </table>
>         </s:form>
>     </s:div>
>
>     <s:div id="tab2" label="Number" theme="ajax">
>           <s:form method="post">
>                 <table>
>                   <s:textfield label="Provider Number"
> name="REQUESTOR_NUMBER" size="15"/>
>                      <s:submit name="SUBMIT" value="Find Now"/>
>                 </table>
>         </s:form>
>     </s:div>
>    </s:tabbedPanel>
>    
>  </body>
> </html>
>
> In the following, company name is replaced by xxx.
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE struts PUBLIC
>   "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>   "http://struts.apache.org/dtds/struts-2.0.dtd">
>
> <struts>
>
>   <constant name="struts.enable.DynamicMethodInvocation" value="false"
> />
>   <constant name="struts.devMode" value="true" />
>
>   <package name="Requestor" extends="struts-default">
>    
>    <interceptors>
>     <interceptor name="logon"
> class="com.xxx.hcm.struts.LogonInterceptor"/>
>       <interceptor-stack name="hcmStack">
>         <interceptor-ref name="logon"/>
>         <interceptor-ref name="defaultStack"/>
>        </interceptor-stack>
>     </interceptors>
>
>
>    <default-interceptor-ref name="hcmStack"/>
>
>    
>    <global-results>
>         <result name="logon">/logon.jsp</result>
>      </global-results>
>      
>      <action name="RequestorSearch"
> class="com.xxx.hcm.action.RequestorSearchAction">
>
>         <result name="input">/Requestor/RequestorSearch.jsp</result>
>         <result>/Requestor/RequestorSearch.jsp</result>
>
>      </action>
>      
>     <action name="RecipientSearch"
> class="com.xxx.hcm.action.RecipientSearchAction">
>       <result>/RecipientSearch/SearchResults.jsp</result>
>     </action>
>
>     <action name="Case" class="com.xxx.hcm.action.CaseAction">
>       <result>/Case/Case.jsp</result>
>     </action>
>
>   </package>
>
> </struts>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_186631.ezm (zipped)

Hi Dave,

The code is from tutorial:

http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html

pom.xml fragments:

  <modelVersion>4.0.0</modelVersion>
  <groupId>quickstart</groupId>
  <artifactId>quickstart</artifactId>
  <version>0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>quickstart</name>

    <dependency>
       <groupId>org.apache.struts</groupId>
       <artifactId>struts2-spring-plugin</artifactId>
       <version>2.0.6</version>
    </dependency>

struts.xml:

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
 
  <constant name="struts.objectFactory" value="spring" />
  <constant name="struts.devMode" value="true" />
 
  <package name="person" extends="struts-default">
    <action name="list" method="execute" class="personAction">
       <result>pages/list.jsp</result>
       <result name="input">pages/list.jsp</result>
    </action>
   
    <action name="remove" class="personAction" method="remove">
       <result>pages/list.jsp</result>
       <result name="input">pages/list.jsp</result>
    </action>
   
    <action name="save" class="personAction" method="save">
       <result>pages/list.jsp</result>
       <result name="input">pages/list.jsp</result>
    </action>
  </package>
 
</struts>

The action:
PersonAction.java
and validator:
PersonAction-save-validation.xml
are in the same package "quickstart.action" under folder:
 /src/main/java/quickstart/action

Validation is there to prevent creating empty rows in the database, but
doesn't work for some reason. I've also tried changing struts 2 version to
2.0.11.1 with no success.

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_186640.ezm (zipped)

Now working!

1) Created a new folder under resources matching the java package
structure of the action:

package: quickstart.action
folder:    src/main/resources/quickstart/action

2) Moved PersonAction-save-validation.xml there.

it solved the problem.

Thanks a lot Dave!

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_186633.ezm (zipped)
Hi folks.

When i start the tomcat 5.5 this exception appear to me:
20/05/2008 08:48:03 org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError:
com/opensymphony/xwork2/config/ConfigurationProvider
    at
org.apache.struts2.dispatcher.FilterDispatcher.createDispatcher (FilterDispatcher.java:239)
    at
org.apache.struts2.dispatcher.FilterDispatcher.init (FilterDispatcher.java:200)
    at
org.apache.catalina.core.ApplicationFilterConfig.getFilter (ApplicationFilterConfig.java:221)
    at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (ApplicationFilterConfig.java:302)
    at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
    at
org.apache.catalina.core.StandardContext.filterStart (StandardContext.java:3635)
    at
org.apache.catalina.core.StandardContext.start (StandardContext.java:4222)
    at
org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:760)
    at
org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:740)
    at
org.apache.catalina.core.StandardHost.addChild (StandardHost.java:544)
    at
org.apache.catalina.startup.HostConfig.deployDescriptor (HostConfig.java:626)
    at
org.apache.catalina.startup.HostConfig.deployDescriptors (HostConfig.java:553)
    at
org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java:488)
    at
org.apache.catalina.startup.HostConfig.start (HostConfig.java:1149)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:311)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:120)
    at
org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1022)
    at
org.apache.catalina.core.StandardHost.start (StandardHost.java:736)
    at
org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1014)
    at
org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start (StandardService.java:448)
    at
org.apache.catalina.core.StandardServer.start (StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start (Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke (Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:433)
Caused by: java.lang.ClassNotFoundException:
com.opensymphony.xwork2.config.ConfigurationProvider
    at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1363)
    at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1209)
    at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319)
    ... 29 more

But, everything work fine... i use Struts 2.0.11.1, Tomcat 5.5 and my
WEB.XML:
<?xml version="1.0" encoding="UTF-8"?>
<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">
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <filter>
    <filter-name>struts2</filter-name>

<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
</web-app>

What can be?

Attachment: user_186634.ezm (zipped)
In 99% of cases, when you see a NoClassDefFoundError, it means you are
missing a jar file. Is xwork-2.x.x.jar in your WEB-INF/lib folder?

On Tue, May 20, 2008 at 12:40 PM, Felipe Lorenz <felipe.lorenz@(protected)>
wrote:

> Hi folks.
>
> When i start the tomcat 5.5 this exception appear to me:
> 20/05/2008 08:48:03 org.apache.catalina.core.StandardContext filterStart
> SEVERE: Exception starting filter struts2
> java.lang.NoClassDefFoundError:
> com/opensymphony/xwork2/config/ConfigurationProvider
>     at
>
> org.apache.struts2.dispatcher.FilterDispatcher.createDispatcher (FilterDispatcher.java:239)
>     at
>
> org.apache.struts2.dispatcher.FilterDispatcher.init (FilterDispatcher.java:200)
>     at
>
> org.apache.catalina.core.ApplicationFilterConfig.getFilter (ApplicationFilterConfig.java:221)
>     at
>
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (ApplicationFilterConfig.java:302)
>     at
>
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
>     at
>
> org.apache.catalina.core.StandardContext.filterStart (StandardContext.java:3635)
>     at
> org.apache.catalina.core.StandardContext.start (StandardContext.java:4222)
>     at
>
> org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:760)
>     at
> org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:740)
>     at
> org.apache.catalina.core.StandardHost.addChild (StandardHost.java:544)
>     at
>
> org.apache.catalina.startup.HostConfig.deployDescriptor (HostConfig.java:626)
>     at
>
> org.apache.catalina.startup.HostConfig.deployDescriptors (HostConfig.java:553)
>     at
> org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java:488)
>     at
> org.apache.catalina.startup.HostConfig.start (HostConfig.java:1149)
>     at
> org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:311)
>     at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:120)
>     at
> org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1022)
>     at
> org.apache.catalina.core.StandardHost.start (StandardHost.java:736)
>     at
> org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1014)
>     at
> org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443)
>     at
> org.apache.catalina.core.StandardService.start (StandardService.java:448)
>     at
> org.apache.catalina.core.StandardServer.start (StandardServer.java:700)
>     at org.apache.catalina.startup.Catalina.start (Catalina.java:552)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
>
> sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
>     at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke (Method.java:597)
>     at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:295)
>     at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:433)
> Caused by: java.lang.ClassNotFoundException:
> com.opensymphony.xwork2.config.ConfigurationProvider
>     at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1363)
>     at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1209)
>     at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319)
>     ... 29 more
>
> But, everything work fine... i use Struts 2.0.11.1, Tomcat 5.5 and my
> WEB.XML:
> <?xml version="1.0" encoding="UTF-8"?>
> <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">
>   <welcome-file-list>
>     <welcome-file>index.jsp</welcome-file>
>   </welcome-file-list>
>   <filter>
>     <filter-name>struts2</filter-name>
>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>   </filter>
>   <filter-mapping>
>     <filter-name>struts2</filter-name>
>     <url-pattern>/*</url-pattern>
>   </filter-mapping>
> </web-app>
>
> What can be?
>



--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment: user_186635.ezm (zipped)
You need to have xwork-2.0.*.jar file in your WEB-INF/lib folder.

-Rushikesh

On Tue, May 20, 2008 at 6:40 PM, Felipe Lorenz <felipe.lorenz@(protected)>
wrote:

> Hi folks.
>
> When i start the tomcat 5.5 this exception appear to me:
> 20/05/2008 08:48:03 org.apache.catalina.core.StandardContext filterStart
> SEVERE: Exception starting filter struts2
> java.lang.NoClassDefFoundError:
> com/opensymphony/xwork2/config/ConfigurationProvider
>     at
>
> org.apache.struts2.dispatcher.FilterDispatcher.createDispatcher (FilterDispatcher.java:239)
>     at
>
> org.apache.struts2.dispatcher.FilterDispatcher.init (FilterDispatcher.java:200)
>     at
>
> org.apache.catalina.core.ApplicationFilterConfig.getFilter (ApplicationFilterConfig.java:221)
>     at
>
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (ApplicationFilterConfig.java:302)
>     at
>
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
>     at
>
> org.apache.catalina.core.StandardContext.filterStart (StandardContext.java:3635)
>     at
> org.apache.catalina.core.StandardContext.start (StandardContext.java:4222)
>     at
>
> org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:760)
>     at
> org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:740)
>     at
> org.apache.catalina.core.StandardHost.addChild (StandardHost.java:544)
>     at
>
> org.apache.catalina.startup.HostConfig.deployDescriptor (HostConfig.java:626)
>     at
>
> org.apache.catalina.startup.HostConfig.deployDescriptors (HostConfig.java:553)
>     at
> org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java:488)
>     at
> org.apache.catalina.startup.HostConfig.start (HostConfig.java:1149)
>     at
> org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:311)
>     at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:120)
>     at
> org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1022)
>     at
> org.apache.catalina.core.StandardHost.start (StandardHost.java:736)
>     at
> org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1014)
>     at
> org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443)
>     at
> org.apache.catalina.core.StandardService.start (StandardService.java:448)
>     at
> org.apache.catalina.core.StandardServer.start (StandardServer.java:700)
>     at org.apache.catalina.startup.Catalina.start (Catalina.java:552)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
>
> sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
>     at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke (Method.java:597)
>     at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:295)
>     at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:433)
> Caused by: java.lang.ClassNotFoundException:
> com.opensymphony.xwork2.config.ConfigurationProvider
>     at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1363)
>     at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1209)
>     at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319)
>     ... 29 more
>
> But, everything work fine... i use Struts 2.0.11.1, Tomcat 5.5 and my
> WEB.XML:
> <?xml version="1.0" encoding="UTF-8"?>
> <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">
>   <welcome-file-list>
>     <welcome-file>index.jsp</welcome-file>
>   </welcome-file-list>
>   <filter>
>     <filter-name>struts2</filter-name>
>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>   </filter>
>   <filter-mapping>
>     <filter-name>struts2</filter-name>
>     <url-pattern>/*</url-pattern>
>   </filter-mapping>
> </web-app>
>
> What can be?
>



--
-Rushikesh

Attachment: user_186637.ezm (zipped)
hummmm very strange, because i have the fallows jar:
antlr-2.7.2.jar
commons-beanutils-1.6.jar
commons-chain-1.1.jar
commons-logging-1.0.4.jar
commons-logging-api-1.1.jar
commons-validator-1.3.0.jar
freemarker-2.3.8.jar
ognl-2.6.11.jar
oro-2.0.8.jar
struts2-core-2.0.11.1.jar
xworks-2.0.4.jar
and TopLinks Essentials.

On Tue, May 20, 2008 at 1:43 PM, Rushikesh Thakkar <
thakkar.rushikesh@(protected):

> You need to have xwork-2.0.*.jar file in your WEB-INF/lib folder.
>
> -Rushikesh
>
> On Tue, May 20, 2008 at 6:40 PM, Felipe Lorenz <felipe.lorenz@(protected)>
> wrote:
>
> > Hi folks.
> >
> > When i start the tomcat 5.5 this exception appear to me:
> > 20/05/2008 08:48:03 org.apache.catalina.core.StandardContext filterStart
> > SEVERE: Exception starting filter struts2
> > java.lang.NoClassDefFoundError:
> > com/opensymphony/xwork2/config/ConfigurationProvider
> >     at
> >
> >
> org.apache.struts2.dispatcher.FilterDispatcher.createDispatcher (FilterDispatcher.java:239)
> >     at
> >
> >
> org.apache.struts2.dispatcher.FilterDispatcher.init (FilterDispatcher.java:200)
> >     at
> >
> >
> org.apache.catalina.core.ApplicationFilterConfig.getFilter (ApplicationFilterConfig.java:221)
> >     at
> >
> >
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (ApplicationFilterConfig.java:302)
> >     at
> >
> >
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
> >     at
> >
> >
> org.apache.catalina.core.StandardContext.filterStart (StandardContext.java:3635)
> >     at
> > org.apache.catalina.core.StandardContext.start (StandardContext.java:4222)
> >     at
> >
> >
> org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:760)
> >     at
> > org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:740)
> >     at
> > org.apache.catalina.core.StandardHost.addChild (StandardHost.java:544)
> >     at
> >
> >
> org.apache.catalina.startup.HostConfig.deployDescriptor (HostConfig.java:626)
> >     at
> >
> >
> org.apache.catalina.startup.HostConfig.deployDescriptors (HostConfig.java:553)
> >     at
> > org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java:488)
> >     at
> > org.apache.catalina.startup.HostConfig.start (HostConfig.java:1149)
> >     at
> >
> org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:311)
> >     at
> >
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:120)
> >     at
> > org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1022)
> >     at
> > org.apache.catalina.core.StandardHost.start (StandardHost.java:736)
> >     at
> > org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1014)
> >     at
> > org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443)
> >     at
> > org.apache.catalina.core.StandardService.start (StandardService.java:448)
> >     at
> > org.apache.catalina.core.StandardServer.start (StandardServer.java:700)
> >     at org.apache.catalina.startup.Catalina.start (Catalina.java:552)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
> >     at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
> >     at java.lang.reflect.Method.invoke (Method.java:597)
> >     at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:295)
> >     at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:433)
> > Caused by: java.lang.ClassNotFoundException:
> > com.opensymphony.xwork2.config.ConfigurationProvider
> >     at
> >
> >
> org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1363)
> >     at
> >
> >
> org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1209)
> >     at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319)
> >     ... 29 more
> >
> > But, everything work fine... i use Struts 2.0.11.1, Tomcat 5.5 and my
> > WEB.XML:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <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">
> >   <welcome-file-list>
> >     <welcome-file>index.jsp</welcome-file>
> >   </welcome-file-list>
> >   <filter>
> >     <filter-name>struts2</filter-name>
> >
> >
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> >   </filter>
> >   <filter-mapping>
> >     <filter-name>struts2</filter-name>
> >     <url-pattern>/*</url-pattern>
> >   </filter-mapping>
> > </web-app>
> >
> > What can be?
> >
>
>
>
> --
> -Rushikesh
>

Attachment: user_186636.ezm (zipped)

Any suggestions????

-----Original Message-----
From: Phan, Hienthuc T
Sent: Friday, May 16, 2008 6:41 PM
To: Struts Users Mailing List
Subject: Struts 2: After validation fail, how to change the returning
result name to other than INPUT?

Hi,

I have a CustomerAction class. In CustomerAction, I have two methods:
add and update. I have a CustomerAction-validation.xml to check for
required fields, etc. My struts.xml looks something like this:

 <package name="customer">
   <action name="customer_*"
class="com.action.CustomerAction" method="{1}">
     <result
name="create">/customer_create.jsp</result>
     <result
name="update">/customer_update.jsp</result>
   </action>
 </package>

When the validation fail, I would like it to return to the previous page
(either cusomer_create.jsp or customer_update.jsp). However, Struts
returns result = "input" automatically when the validation fail. How do
I change the result from "input" to either "add" or "update"?

A clunky way to solve this problem is to create two actions. That would
generate too many classes. Is there a good solution for this problem of
mine? Thanks.

-Hien
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.


Attachment: user_186638.ezm (zipped)
Michael Gagnon wrote:
> My JSP resembles:
>
>
> ....
> <s:form namespace="/labs" action="ApproveItems" method="post" >
> ....
>  <s:iterator value="loggedInUser.approvableBillingItems"
> status="stat" id="next">
>    <s:hidden name="itemsPresent" value="%{id}"/>
>    ...
>    <td><s:checkbox name="approved" fieldValue="%{id}"
> required="false"/></td>
>    ...
>  </s:iterator>
> ....
> </s:form>
> ....
>
>
>
> My action resembles:
>
> ....
> public class ApproveItemsAction extends ActionSupport {
>  private Integer[] approved;
>  private Integer[] itemsPresent;
>  ...
>  public void setApproved(Integer[] approved){ this.approved =
> approved; }
>  public void setItemsPresent(Integer[] itemsPresent){
> this.itemsPresent = itemsPresent; }
> }
>
>
>
>
> When some number of checkboxes are selected, then I get an array containing
> the ID values of the checked objects. This is correct. When NO checkboxes
> are selected, I get:
> No result defined for action bpf.labs.action.ApproveItemsAction and result
> input
>
> Which is not expected. My action never hits the execute method in this
> scenario. It never even hits 'setApproved' (it does if there are values
> checked. It does not if there are none). I expect setApproved be called with
> an empty array or just null. Either is acceptable -- Null being what I
> expect I'd PROBABLY see and an empty array being what I'd be HAPPY to see.
> Instead this situation just seems to confuse struts and 'input' is returned
> at what looks like the time the parameter interceptor is probably trying to
> handle the checkboxes.
>
>
>
> Is there a way to handle this? Having no checkboxes selected needs to be an
> acceptable form submission state for this action. My itemsPresent array must
> be null or an empty array.

Forwarding to 'input' usually means a validation error occurred. Do you
have any validation configured for this action?

L.


Attachment: user_186639.ezm (zipped)
No.

But with further searching, I found:
https://issues.apache.org/struts/browse/WW-2339

Which suggests this is a documented struts bug and is not currently fixed.

As a result, I've changed my setApproved method to the following:



 // If no checkboxes are checked, we get Boolean[]{false} instead of
null or an empty int[]
 // If some values are selected, we get a String[] of values because
this method takes in Object[] and struts doesn't know what else to do
 // If this were set to take in Integer[], we'd get Integers if
values were selected, but an error if none were
 // If we have setApproved(Integer[]) and setApproved(Boolean[]) then
an error occurs in all situations
 // This is really stupid.
 // https://issues.apache.org/struts/browse/WW-2339
 public void setApproved(Object[] approved){
   if(approved instanceof String[]){
     this.approved = new int[approved.length];
     for(int i=0; i<approved.length; i++){
       int next =
Integer.valueOf(approved[i].toString());
       this.approved[i] = next;
     }
   }
   else{
     this.approved = new int[]{};
   }
 }




This is ... ugly. I think I just shouldn't be using checkboxes at all.
Instead I should use select boxes with true and false values -- those work
as expected

-----Original Message-----
From: news [mailto:news@(protected)
Sent: Tuesday, May 20, 2008 1:03 PM
To: user@(protected)
Subject: Re: Submitting a form without selecting checkboxes yields 'Input'
result

Michael Gagnon wrote:
> My JSP resembles:
>
>
> ....
> <s:form namespace="/labs" action="ApproveItems" method="post" >
> ....
>  <s:iterator value="loggedInUser.approvableBillingItems"
> status="stat" id="next">
>    <s:hidden name="itemsPresent" value="%{id}"/>
>    ...
>    <td><s:checkbox name="approved" fieldValue="%{id}"
> required="false"/></td>
>    ...
>  </s:iterator>
> ....
> </s:form>
> ....
>
>
>
> My action resembles:
>
> ....
> public class ApproveItemsAction extends ActionSupport {
>  private Integer[] approved;
>  private Integer[] itemsPresent;
>  ...
>  public void setApproved(Integer[] approved){ this.approved =
> approved; }
>  public void setItemsPresent(Integer[] itemsPresent){
> this.itemsPresent = itemsPresent; }
> }
>
>
>
>
> When some number of checkboxes are selected, then I get an array
containing
> the ID values of the checked objects. This is correct. When NO checkboxes
> are selected, I get:
> No result defined for action bpf.labs.action.ApproveItemsAction and result
> input
>
> Which is not expected. My action never hits the execute method in this
> scenario. It never even hits 'setApproved' (it does if there are values
> checked. It does not if there are none). I expect setApproved be called
with
> an empty array or just null. Either is acceptable -- Null being what I
> expect I'd PROBABLY see and an empty array being what I'd be HAPPY to see.
> Instead this situation just seems to confuse struts and 'input' is
returned
> at what looks like the time the parameter interceptor is probably trying
to
> handle the checkboxes.
>
>
>
> Is there a way to handle this? Having no checkboxes selected needs to be
an
> acceptable form submission state for this action. My itemsPresent array
must
> be null or an empty array.

Forwarding to 'input' usually means a validation error occurred. Do you
have any validation configured for this action?

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)




Attachment: user_186641.ezm (zipped)

Are you getting any errors?

There is a bug in the CheckboxInterceptor where it does not properly
handling arrays of checkboxes when none are selected. It might be related,
but this issue did causes error messages.

I submitted a patch for this issue WW-2339.
https://issues.apache.org/struts/browse/WW-2339



Hoying, Ken-2 wrote:
>
> I have a list of search filters that I am displaying on the page where
> each is a checkboxlist. I am implementing this as such:
>
> <s:iterator value="searchCriteria.filters" status="filterStatus">
>  <s:checkboxlist
>  
> name="searchCriteria.filterMap['%{fieldName}'].selectedFilters"
>    value="%{selectedFilters}"
>
>    list="filterItems" listKey="value" listValue="label"/>
> </s:iterator>
>
> Everything works great except for one small problem. I do not seem to
> be able to deselect all of the values for a filter. For example, if one
> of my filters is Status and the check box values are Active and Inactive
> then:
>
> - I can select both Active and Inactive.
> - I can leave both Active and Inactive deselected.
> - I can default to have Active selected and then deslect it and then
> select Inactive.
> - I CANNOT default to have Active selected and then deselect it.
>
> It appears that if a checkbox was originally set you can change the
> value as long as you change it to some other value. However if I do not
> set the field to any value at all, then it keeps the previous or default
> value.
>
> I am not sure what is occurring here. Does anyone have any ideas on how
> I can overcome this?
>
> Thank you!
> Ken
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.