ViewPreparer issue after updating from 6.2.0 to 6.3.0.1

2023-10-03 Thread Chris Scroll
After I updated to struts 6.3.0.1 I am receiving the following exception:

java.lang.ClassCastException: helpers.preparer.BreadCrumbPreparer cannot be
cast to org.apache.tiles.api.preparer.ViewPreparer

If I revert back to struts2-tiles-plugin-6.2.0.jar the program runs without
exceptions.

Note: My BreadCrumbPreparer class implements 'ViewPreparer' from
tiles-api-3.0.8.jar


Form array data disappearing if array is over 256?

2023-09-29 Thread Chris Scroll
I upgraded from struts 2.5.30 to 6.3.0.1 and updated to the new
jakarta-stream to fix an issue.

My List:
private List tags;

If a form has over 256 array elements (Example: tag[0] to tag[300])  and it
is submitted/posted I only get the first 256 array elements in my struts
action (itag.size(); will be 256 instead of 299).

Those first 256 elements of my array have the correct information, but
everything else is as if it never existed. There are also no errors thrown
or errors in the console.

Is this a bug, or is there some sort of setting I can change?


Struts2 & Spring using child web application context

2016-06-26 Thread Chris Cranford
Has anyone been able to leverage the struts2-spring-plugin and running 
it within a child context?


I am looking into the possibility of something like the following:

 +- Root Application Context (global services, repositories, etc)
  +- Web Application Context1 (used by struts2 actions)
  +- Web Application Context2 (used by another technology)

Any help would be greatly appreciated.
Chris


Struts 2.5 GA

2016-06-16 Thread CRANFORD, CHRIS
I'm working on upgrading Struts2 to 2.5-GA and I'm running into an issue where 
the JSP renders:

java.io.IOException: Stream closed

org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:200)

org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:105)
org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:167)

org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:923)

org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:647)

org.apache.struts2.result.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:135)

org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208)

I've isolated this to when the JSP contains any tiles tags.  The taglib is 
defined in the JSP as follows:

<%@ taglib prefix="tiles"   uri="http://tiles.apache.org/tags-tiles; %>

If I comment out the use of the tiles tag, the page renders just fine.  We were 
using Tiles 3.0.5 with the prior Struts2 2.3.24 release, so I'm not clear what 
I need to change.

Thoughts, suggestions?
Chris


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



Re: Disabling Struts warning messages in the console

2016-02-18 Thread Chris
Hi, 
I thought also to the log4j.
But , perhaps, Murat Balkan wants cancel only this one, 
and not all the other warnings ?
Chris
 

Le Jeudi 18 février 2016 9h05, Christoph Nenning 
<christoph.nenn...@lex-com.net> a écrit :
 

 > Hi,
> I'd like to disable the warning messages in the console log 
> (catalina.out) like
> 
> WARNING: Could not find action or result: /prepOrder.do?code=PNG
> There is no Action mapped for namespace [/] and action name
> 
> These visits are generated by the bots and they are trying to reach 
> a previous action that does not exist anymore.
> 
> How can I do this?
> 
> Thanks
> Murat


That log message is generated by class

org.apache.struts2.dispatcher.Dispatcher

(at least for struts 2.5, in older versions it may be different)


You can configure your logging library to show only errors for that class, 
e.g. for log4j:





You may want to have a look here:
http://struts.apache.org/docs/logging.html


Regards,
Christoph

This Email was scanned by Sophos Anti Virus


  

RE: Jodd/Madvoc MVC framework

2016-01-26 Thread CRANFORD, CHRIS
This is one of the aspects of Spring MVC that I prefer over that of Struts2.  
The return types from action handler methods vary and influences what the 
servlet handler is to do after the action handler has completed.

The framework could be tweaked to examine the action method's return type and 
based upon it branch and do various new features, allowing the result type 
invocation to be handled in a more declarative way via code rather than XML 
configuration or annotations.

What Christoph presents here very closely aligns with the View based 
implementations that Spring MVC expose.

I also think we're reaching a point that some of the struts2 plugins to support 
various result type implementations such as JSON and REST should be considered 
for merging into the struts2 core.  These result types have become a major way 
to exchange data in the past several years with microservices, web services, 
and AJAX support that they should be first class denizens in the codebase.

Chris

-Original Message-
From: Christoph Nenning [mailto:christoph.nenn...@lex-com.net] 
Sent: Tuesday, January 26, 2016 3:27 AM
To: Struts Users Mailing List <user@struts.apache.org>
Subject: Re: Jodd/Madvoc MVC framework

return new InstantDispatcherResult("foo.jsp");
return new InstantActionRedirectResult("fooAction");


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



RE: Editing a JPA entity

2016-01-07 Thread CRANFORD, CHRIS
In the case of non-versioned domain models or cases where you aren't concerned 
with state collisions, the traditional lookup/render/lookup/merge workflow 
works quite well.  

The problem though comes into play when you are concerned about versioned 
models and more importantly, controlling state transition across concurrent 
modifications.  What I have seen developers do in the past is that they expose 
the @Version property to the form and have that value posted back along with 
the changed attributes during the save/update operation.  This approach works, 
but the security risk is you're exposing a critical piece of data that is 
subject to user manipulation to bypass optimistic locking.  

A better approach is to follow a similar paradigm that JSF uses called 
conversation scopes.  The struts2-conversation-plugin offers this kind of 
feature.

The plugin basically allows you to expose a set of action properties to a named 
scope.  The plugin in combination with a few custom tags, allowed a form 
identifier to be placed as a hidden field in your form when you render your 
view.  When the view's changes are posted back to the save/update action, the 
plugin first takes the hidden field conversation id and looks up the state from 
the session that was saved when the conversation was started.  Any field flags 
to be included in the conversation will be rehydrated with the state it had 
when the prior action was executed.  The struts framework then can use it's 
normal property injection mechanism to set the appropriate state on the model.  
Since the version of the domain model isn't being exposed to the client, there 
is no concern with a user hijacking the optimistic locking mechanism of your 
JPA provider to force changes  to occur when a collision should happen.

A typical action might look like the following.  The annotations I show my now 
map exactly to the plugin as we use a modified proprietary version here but the 
gist remains the same.

@ConversationSupport(conversation = "myconversion")
public class SomeAction extends ActionSupport implements ModelDriven 
{

  private Long id;
  @ConversationField private DomainModel domainModel;
  @ConversationField private ViewModel viewModel;

  @BeginConversation(conversation = "myconversion")
  public String renderView() {
try {
  this.domainModel = someService.find(id);
  this.viewModel = new ViewModel(domainModel);
  return SUCCESS;
}
catch(Exception ex) {
  addActionError(getText(ERROR_UNEXPECTED_EXCEPTION));
  return ERROR;
}
  }

  @Conversation(conversation = "myconversion")
  public String saveView() {
try {
  // copy values from this.viewModel to this.domainModel 
  someService.update(this.domainModel);
  return SUCCESS;
}
   catch(OptimisticLockException ex) {
 // you could elect to find the domainModel again, update it and try to 
take 
 // the changes in domainModel + the changes from the user in viewModel
 // and merge them then send the user back to the view again letting them
 // know some fields were changed while they were making their changes.
 // They can verify their changes again and resubmit.   I don't do this 
here 
 // but instead just tell the user the record was changed and they need to 
 // leave and come back in, but its up to you.
 addActionError(getText(ERROR_RECORD_ALREADY_MODIFIED));
 return INPUT;
   }
   catch(Exception ex) {
 addActionError(getText(ERROR_UNEXPECTED_EXCEPTION));
 return ERROR;
   }
  }

  /* other stuffs */

}



-Original Message-
From: C N Davies [mailto:c...@xcogia.com] 
Sent: Wednesday, January 06, 2016 10:24 PM
To: 'Christoph Nenning' ; 'Struts Users Mailing 
List' 
Subject: RE: Editing a JPA entity

Christoph I understand why this happens, I was simply asking if there was a 
better way to do this using some struts session magic or such. Seems there 
isn't so I'll just do it the old long winded way.


-Original Message-
From: Christoph Nenning [mailto:christoph.nenn...@lex-com.net]
Sent: Tuesday, January 5, 2016 6:57 PM
To: Struts Users Mailing List 
Subject: Re: Editing a JPA entity

> I'm using an action to retrieve a list of entities and render these as 
> a list, the user can then select an edit button that calls an action 
> that retrieves the individual entity and renders the edit page. Once 
> the user
has
> completed editing they hit the save button which calls the action that
calls
> the entity manager's merge method to update the db. Each of these
actions
> call methods of the same action class, but the entity ends up in a
detached
> state so merge will fail. I could just retrieve the entity again and
then
> update each data member but this seems like a very messy way to do it. 
Is
> there a better way to do this with struts?
> 
> 
> 
> I'm using struts 2.3.20 with hibernate 4.3.11
> 
> 


Well, 

Re: Some problems with Struts-mailreader

2015-11-13 Thread Chris
Hello,  Thank you for giving methose explainations. So I've  tried 
withstruts2-core-2.5-20151112.202249-95.jar 
orstruts2-core-2.5-20151104.175152-90.jar but I receive another error ( NB : 
Allthe jar files are the same as 2.5 BETA2 , except the struts-core )

The error is with the id (?) , in the  /WEB-INF/jsp/Welcome.jsp (line: 
26,column: 8) 
      accordind to the TLD 

nov. 13, 2015 10:05:23 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: "Servlet.service()" pour la servlet jsp a lancé une exception
org.apache.jasper.JasperException: /WEB-INF/jsp/Welcome.jsp (line: 26, 
column:8) L'attribut id est incorrect pour le tag url d'après la TLD indiquée
    
atorg.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
    at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
    
atorg.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:237) 
   
atorg.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1265)
 


 Le Vendredi 13 novembre 2015 10h17, Chris <christal...@yahoo.fr> a écrit :
   

 Hello, 

Thank you for giving me those explainations.
So I've  tried with struts2-core-2.5-20151112.202249-95.jar or 
struts2-core-2.5-20151104.175152-90.jar but I receive another error ( NB : All 
the jar files are the same as 2.5 BETA2 , except the struts-core )

The error is with the id (?) , in the  /WEB-INF/jsp/Welcome.jsp (line: 26, 
column: 8) 
      accordind to the TLD 

nov. 13, 2015 10:05:23 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: "Servlet.service()" pour la servlet jsp a lancé une exception
org.apache.jasper.JasperException: /WEB-INF/jsp/Welcome.jsp (line: 26, column: 
8) L'attribut id est incorrect pour le tag url d'après la TLD indiquée
    at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
    at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
    at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:237)
    at 
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1265)
 


 Le Vendredi 13 novembre 2015 8h41, Chris <christal...@yahoo.fr> a écrit :
   

 

  Le Vendredi 13 novembre 2015 8h39, Chris <christal...@yahoo.fr> a écrit :
   

 

  Le Jeudi 12 novembre 2015 20h28, Lukasz Lenart <lukaszlen...@apache.org> 
a écrit :
   

 2015-11-12 18:24 GMT+01:00 Chris <christal...@yahoo.fr>:
> Hello,
>
> I'm sorry . I don't use pom.xml in any of my examples.
> I work with Netbenas 7.3 and ant, I guess. But no maven.
> I have no idea what SNAPSHOT is, and how to use it, and where find it.Is it 
> another version of all librairies ?

SNAPSHOT is the latest development build
https://repository.apache.org/content/groups/snapshots/org/apache/struts/struts2-core/

> Struts has detected an unhandled exception:
> | Messages: |
>    - This method: execute for action Login is not allowed!
>  |
>
>
> Stacktraces
>  This method: execute for action Login is not allowed! - [unknown location]   
>   
>com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:200)
>    
>org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
>    
>org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
>    
>com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
>    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:543)
>    
>org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81)
>    
>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:102)
>    
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>    
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>    
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>    
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>    
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>    
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>    
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
>    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
>    
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>    
>org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp

Re: Some problems with Struts-mailreader

2015-11-12 Thread Chris
Hello, 

I'm sorry . I don't use pom.xml in any of my examples.
I work with Netbenas 7.3 and ant, I guess. But no maven.
I have no idea what SNAPSHOT is, and how to use it, and where find it.Is it 
another version of all librairies ?
Regards,
Chris
 

Struts has detected an unhandled exception: 
| Messages: | 
   - This method: execute for action Login is not allowed!
 |


Stacktraces
 This method: execute for action Login is not allowed! - [unknown location] 
 com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:200)

org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:63)

org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)

com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:543)

org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81)

org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:102)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:722)
  


 Le Jeudi 12 novembre 2015 17h33, Lukasz Lenart <lukaszlen...@apache.org> a 
écrit :
   

 2015-11-12 17:23 GMT+01:00 Chris <christal...@yahoo.fr>:
> Hello,My mailreader example still doesn't work.
> Precisely n the Login button, and the Cancel button, in the Login page

Have you used 2.5-SNAPSHOT version? You must manually change Struts
version in pom.xml

> Something strange, the new web.xml file looks like the jboss_blank example...
> I tried without those some lines, like the old mailreader example,  but it 
> didn't work neither.
>    
>    
>        No direct JSP access
>        
>            No-JSP
>            *.jsp
>        
>        
>            no-users
>        
>    
>
> ???
>    
>        Don't assign users to this role
>        no-users
>    

It's just a security constraint to spread good practises


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


  

Re: Some problems with Struts-mailreader

2015-11-12 Thread Chris
Hello,My mailreader example still doesn't work.
Precisely n the Login button, and the Cancel button, in the Login page
Something strange, the new web.xml file looks like the jboss_blank example...
I tried without those some lines, like the old mailreader example,  but it 
didn't work neither.
   
    
    No direct JSP access
    
    No-JSP
    *.jsp
    
    
    no-users
    
    

???
     
    Don't assign users to this role
    no-users
    

 


 Le Samedi 31 octobre 2015 12h54, Lukasz Lenart  a 
écrit :
   

 Great! Let me know if everything is ok :)

-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


  

Re: Annotation example

2015-11-10 Thread Chris
Hello, 

There are two index.jsp files , but not in the same directory.
The web.xml defines the welcome file webapp/index.jsp  
  
    index.jsp
    

If welcome-file-list entry doesn't exist in web.xml file, 
priority goes to index.html file then index.htm and at last index.jsp file. 
Here, you could omit the index.jsp welcome-file,  because of his name.  

The first index.jsp, the welcome file webappp/index.jsp contains a redirect to 
a second file, named also index.jsp. But this second file is in the directory 
webapp/WEB-INF/content 

Don't call directly this second index.jsp file , in the welcome list.



-> I had a problem in September with the "/" before the name "index" in 
webapp/index.jsp
http://mail-archives.apache.org/mod_mbox/struts-user/201509.mbox/browser

( Extract September 10 ) 
the line in the jsp index.jsp  does not work for me, because it refers to http: 
// localhost: 8080 / index.jsp    (so, a blank page )
 <% Response.sendRedirect ("/index.jsp"); %>
On my Computer, I changed "/index.jsp"  into "index.jsp" or "./index.jsp "
and it works.
Regards, 

Chris
 


 Le Mardi 10 novembre 2015 9h04, José Antonio Delgado Trujillo 
<jadt...@gmail.com> a écrit :
   

 I use mvn package and then put the war in the deployment folder of wildfly
9.
El 10/11/2015 6:42, "Lukasz Lenart" <lukaszlen...@apache.org> escribió:

> 2015-11-09 21:13 GMT+01:00 José Antonio Delgado Trujillo <
> jadt...@gmail.com>:
> > i have the same in the /webapp/index
> > But i have modified the POM
> > i compile with maven but i use wildly as server.
>
> Which Wildfly version do you use? And I assume that it works with "mvn
> jetty:run" for you?
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

  

Re: Some problems with Struts-mailreader

2015-10-30 Thread Chris
)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:722)
 You are seeing this page because development mode is enabled. Development 
mode, or devMode, enables extradebugging behaviors and reports to assist 
developers. To disable this mode, set:  struts.devMode=false
in your WEB-INF/classes/struts.properties file. 

 


 Le Vendredi 30 octobre 2015 11h37, Lukasz Lenart <lukaszlen...@apache.org> 
a écrit :
   

 Daniel

It is a different topic, not really related to your issue.

2015-10-30 11:34 GMT+01:00 Daniel Hernáez <d.hern...@dosiper.com>:
> I changed to 2.3.24.1 and I am getting a different error now:
>
> "There is no Action mapped for namespace [/] and action name [Person] 
> associated with context path [/wildcard-method-selection]."
>
> I just changed the filter in web.xml to adapt the new version 
> (org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter).
>  None of the actions works now.
>
> Saludos / Regards,
> Daniel Hernáez
> International Technical Service
>
> Mobile: +34 699 140 596
> Landline: +34 987 470 155
>
>
>
>
> -Mensaje original-
> De: Lukasz Lenart [mailto:lukaszlen...@apache.org]
> Enviado el: viernes, 30 de octubre de 2015 10:59
> Para: Struts Users Mailing List <user@struts.apache.org>
> Asunto: Re: Some problems with Struts-mailreader
>
> It was bug in Struts, so you must use the latest SNAPSHOT
>
> 2015-10-30 10:57 GMT+01:00 Chris <christal...@yahoo.fr>:
>> Hi,- I'll try soon
>> - But Git Hub says "Already up-to-date"
>> - And I saw > a real problem.
>> - like the "problem" with a wrong path /pages/Error.jsp instead
>> /WEB-INF/jsp/Error.jsp
>> - the problem is : Login or Cancel submit are bugging.
>> - Could you please says the all jar files , for mailreader ?
>> Regards,
>> Chris
>>
>>
>>
>>      Le Vendredi 30 octobre 2015 9h23, Lukasz Lenart 
>><lukaszlen...@apache.org> a écrit :
>>
>>
>>  Fixed, thanks!
>>
>> 2015-10-30 8:52 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>:
>>> My bad, was using BETA1 :(
>>>
>>> 2015-10-30 8:50 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>:
>>>> It works, just fetched the latest version and everything is ok, no
>>>> errors, exceptions. Please check if you are using the latest version
>>>> from Git
>>>>
>>>> 2015-10-30 8:42 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>:
>>>>> Looks like a bug in 2.5. The Login action is defined as follow
>>>>>
>>>>> 
>>>>>
>>>>> which means any method should be allowed - I'm going to check that
>>>>>
>>>>>
>>>>> Regards
>>>>> --
>>>>> Łukasz
>>>>> + 48 606 323 122 http://www.lenart.org.pl/
>>>>>
>>>>> 2015-10-28 12:21 GMT+01:00 Chris <christal...@yahoo.fr>:
>>>>>> Hello,
>>>>>>
>>>>>> I have some problems with the "new" mailreader sample in the
>>>>>> linkhttps://github.com/apache/struts-examples/tree/master/mailread
>>>>>> er  with Struts 2.5 BETA2
>>>>>>
>>>>>> PS :  my old mailreader example 2.3.16 works perfectly.And I try to 
>>>>>> translate the tour.html to unterstand.
>>>>>> But with the new one..Here are my lib or jar files
>>>>>> - Struts2.5 BETA2 ( the same as form-xml-validation)
>>>>>> - struts2-junit-plugin-2.5-BETA2.jar
>>>>>> - struts-mailreader-dao-1.3.8.jar
>>>>>> - spring-core-4.1.6.RELEASE.jar
>>>>>> - spring-test-4.1.6.RELEASE.jar
>>>>>> - commons-logging-1.1.3.jar
>>>>>> - commons-beanutils-1.9.2.jar
>>>>>> - commons-digester-2.1.jar
>>>>>> First, the Login.jsp with g

Re: Some problems with Struts-mailreader

2015-10-30 Thread Chris
PS : I will not change my old struts-mailreader sampleBut there is some 
differences in mailreader-support.xml file : 
old version 

Re: Some problems with Struts-mailreader

2015-10-30 Thread Chris
Thanks, 
That is true , I missed to speak about SNAPSHOTS , because I didn't understand 
what it means.I'll try.
Regards,
Chris
 


 Le Vendredi 30 octobre 2015 16h01, Chris <christal...@yahoo.fr> a écrit :
   

 PS : I will not change my old struts-mailreader sampleBut there is some 
differences in mailreader-support.xml file : 
old version 

Re: Some problems with Struts-mailreader

2015-10-30 Thread Chris
Hi,- I'll try soon
- But Git Hub says "Already up-to-date"
- And I saw  
a écrit :
   

 Fixed, thanks!

2015-10-30 8:52 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>:
> My bad, was using BETA1 :(
>
> 2015-10-30 8:50 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>:
>> It works, just fetched the latest version and everything is ok, no
>> errors, exceptions. Please check if you are using the latest version
>> from Git
>>
>> 2015-10-30 8:42 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>:
>>> Looks like a bug in 2.5. The Login action is defined as follow
>>>
>>> 
>>>
>>> which means any method should be allowed - I'm going to check that
>>>
>>>
>>> Regards
>>> --
>>> Łukasz
>>> + 48 606 323 122 http://www.lenart.org.pl/
>>>
>>> 2015-10-28 12:21 GMT+01:00 Chris <christal...@yahoo.fr>:
>>>> Hello,
>>>>
>>>> I have some problems with the "new" mailreader sample in the 
>>>> linkhttps://github.com/apache/struts-examples/tree/master/mailreader  with 
>>>> Struts 2.5 BETA2
>>>>
>>>> PS :  my old mailreader example 2.3.16 works perfectly.And I try to 
>>>> translate the tour.html to unterstand.
>>>> But with the new one..Here are my lib or jar files
>>>> - Struts2.5 BETA2 ( the same as form-xml-validation)
>>>> - struts2-junit-plugin-2.5-BETA2.jar
>>>> - struts-mailreader-dao-1.3.8.jar
>>>> - spring-core-4.1.6.RELEASE.jar
>>>> - spring-test-4.1.6.RELEASE.jar
>>>> - commons-logging-1.1.3.jar
>>>> - commons-beanutils-1.9.2.jar
>>>> - commons-digester-2.1.jar
>>>> First, the Login.jsp with good values ("user" and "pass") gives this error 
>>>> ( And The Cancel button too!)
>>>>
>>>> = = = = = = = = = =  = = = = = = = =  = = = = = = =  = = =
>>>>
>>>>
>>>> Struts Problem Report
>>>>  Struts has detected an unhandled exception:
>>>> | Messages: |
>>>>    - This method: execute for action Login is not allowed!
>>>>  |
>>>>
>>>>
>>>> Stacktraces
>>>>  This method: execute for action Login is not allowed! - [unknown 
>>>>location]      
>>>>com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:200)
>>>>    
>>>>org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
>>>>    
>>>>org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
>>>>    
>>>>com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
>>>>    
>>>>org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:543)
>>>>    
>>>>org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81)
>>>>    
>>>>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:102)
>>>>    
>>>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>>>    
>>>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>>>    
>>>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>>>>    
>>>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>>>>    
>>>>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>>>>    
>>>>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
>>>>    
>>>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
>>>>    
>>>>org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
>>>>    
>>>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>>>    
>>>>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>>>>    
>>>>org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
>>>>    
>>>>org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
>>>>    
>>>>org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>>>>    
>>>>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>    
>>>>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>    java.lang.Thread.run(Thread.java:722)
>>>>      You are seeing this page because development mode is enabled. 
>>>>Development mode, or devMode, enables extradebugging behaviors and reports 
>>>>to assist developers. To disable this mode, set:  struts.devMode=false
>>>> in your WEB-INF/classes/struts.properties file.
>>>> = = = = = = = = = =  = = = = = = = =  = = = = = = =  = = =
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> |  |
>>>> |  |  |  |  |  |  |  |
>>>> | apache/struts-examplesstruts-examples - Mirror of Apache Struts |
>>>> |  |
>>>> | Afficher sur github.com | Aperçu par Yahoo |
>>>> |  |
>>>> |  |
>>>>
>>>>
>>>>

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


  

Re: Some problems with Struts-mailreader

2015-10-30 Thread Chris
>
> It was bug in Struts, so you must use the latest SNAPSHOT
>I'm sorry , I don't know how I can use Snapshots.
 


 Le Vendredi 30 octobre 2015 16h06, Chris <christal...@yahoo.fr> a écrit :
   

 Thanks, 
That is true , I missed to speak about SNAPSHOTS , because I didn't understand 
what it means.I'll try.
Regards,
Chris
 


    Le Vendredi 30 octobre 2015 16h01, Chris <christal...@yahoo.fr> a écrit :
  

 PS : I will not change my old struts-mailreader sampleBut there is some 
differences in mailreader-support.xml file : 
old version 

Some problems with Struts-mailreader

2015-10-28 Thread Chris
Hello, 

I have some problems with the "new" mailreader sample in the 
linkhttps://github.com/apache/struts-examples/tree/master/mailreader   with 
Struts 2.5 BETA2

PS :  my old mailreader example 2.3.16 works perfectly.And I try to translate 
the tour.html to unterstand.
But with the new one..Here are my lib or jar files 
- Struts2.5 BETA2 ( the same as form-xml-validation) 
- struts2-junit-plugin-2.5-BETA2.jar
- struts-mailreader-dao-1.3.8.jar
- spring-core-4.1.6.RELEASE.jar
- spring-test-4.1.6.RELEASE.jar
- commons-logging-1.1.3.jar
- commons-beanutils-1.9.2.jar
- commons-digester-2.1.jar
First, the Login.jsp with good values ("user" and "pass") gives this error ( 
And The Cancel button too!)

= = = = = = = = = =  = = = = = = = =  = = = = = = =  = = = 


Struts Problem Report
  Struts has detected an unhandled exception: 
| Messages: | 
   - This method: execute for action Login is not allowed!
 |


Stacktraces
 This method: execute for action Login is not allowed! - [unknown location] 
 com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:200)

org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:63)

org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)

com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:543)

org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81)

org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:102)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:722)
 You are seeing this page because development mode is enabled. Development 
mode, or devMode, enables extradebugging behaviors and reports to assist 
developers. To disable this mode, set:  struts.devMode=false
in your WEB-INF/classes/struts.properties file.
= = = = = = = = = =  = = = = = = = =  = = = = = = =  = = = 

 





|   |
|   |  |   |   |   |   |   |
| apache/struts-examplesstruts-examples - Mirror of Apache Struts |
|  |
| Afficher sur github.com | Aperçu par Yahoo |
|  |
|   |





Re: form-xml-validation sample / boolean validator / over21

2015-10-22 Thread Chris
Obviously I am speaking to other users as is the case for me, do not have too 
much knowledge of the use of these functions. Not to the Struts 
conceptors.;-)Be carreful, double equal sign is good for comparaison,... 


 Le Mercredi 21 octobre 2015 16h15, Chris <christal...@yahoo.fr> a écrit :
   

 Hi,Thank, It works with fieldexpression.
I tried this : 
    
    personBean.over21
    
    You must be 21 or older
         

Be carreful, double egal sign is good for comparaison, but only one egal sign 
is an affectation !
 = = = = = = = = = = = = = = = =  = = = = = = = =  = = =
I tried also the inverse : with 
    
    You must be under 21
And it works too !
 


    Le Mercredi 21 octobre 2015 12h39, Lukasz Lenart <lukaszlen...@apache.org> 
a écrit :
  

 2015-10-21 12:22 GMT+02:00 Chris <christal...@yahoo.fr>:
> Hi,
>
> I don't know what PRs means.  :-)

PR means Pull Request on GitHub - a change from some other user

> I already tried "required" with checkbox, but it doesn't work.
>    
>        personBean.over21
>        You must be 21 or older
>    
>
> ...( checked or not is always OK)

interesting ... try with
http://struts.apache.org/docs/fieldexpression-validator.html


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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




  

Re: form-xml-validation sample / boolean validator / over21

2015-10-21 Thread Chris
Hi,Thank, It works with fieldexpression.
I tried this : 
    
    personBean.over21
    
    You must be 21 or older
         

Be carreful, double egal sign is good for comparaison, but only one egal sign 
is an affectation !
 = = = = = = = = = = = = = = = =  = = = = = = = =  = = =
I tried also the inverse : with 
    
    You must be under 21
And it works too !
 


 Le Mercredi 21 octobre 2015 12h39, Lukasz Lenart <lukaszlen...@apache.org> 
a écrit :
   

 2015-10-21 12:22 GMT+02:00 Chris <christal...@yahoo.fr>:
> Hi,
>
> I don't know what PRs means.  :-)

PR means Pull Request on GitHub - a change from some other user

> I already tried "required" with checkbox, but it doesn't work.
>    
>        personBean.over21
>        You must be 21 or older
>    
>
> ...( checked or not is always OK)

interesting ... try with
http://struts.apache.org/docs/fieldexpression-validator.html


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


  

Re: form-xml-validation sample / boolean validator / over21

2015-10-21 Thread Chris
Hi, 

I don't know what PRs means.  :-)

I already tried "required" with checkbox, but it doesn't work. 
    
    personBean.over21
    You must be 21 or older
      

...( checked or not is always OK)
In my opinion, I would prefer to use Checkbox  instead of the Radio buttons
to give user to make a choice when agree/disagree or 21 or older. Regards,
chris


 Le Mercredi 21 octobre 2015 11h53, Lukasz Lenart <lukaszlen...@apache.org> 
a écrit :
   

 2015-10-21 10:41 GMT+02:00 Chris <christal...@yahoo.fr>:
> Struts 2.5 BETA2 / form-xml-validation  sample /  boolean validator /
>
> Hello,
> https://github.com/apache/struts-examples/blob/master/form-xml-validation/src/main/webapp/edit.jsp
> The edit.jsp file  contains this line 
> but the file EditAction-validation.xml doesn't contain a validation for this 
> boolean.
>
> How I could use in the EditAction-validation.xml
> the good one validation for a boolean ?Could be also very usefull with an 
> agree/disagree checkbox

PRs are always welcome :) Anyway the 'required' validator should be enough

http://struts.apache.org/docs/required-validator.html

and also I would prefer to use Radio buttons instead of the checkbox
to force user to make a choice


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


  

form-xml-validation sample / boolean validator / over21

2015-10-21 Thread Chris
Struts 2.5 BETA2 / form-xml-validation  sample /  boolean validator /  

Hello, 
https://github.com/apache/struts-examples/blob/master/form-xml-validation/src/main/webapp/edit.jsp
The edit.jsp file  contains this line 
but the file EditAction-validation.xml doesn't contain a validation for this 
boolean.

How I could use in the EditAction-validation.xml
the good one validation for a boolean ?Could be also very usefull with an 
agree/disagree checkbox   

PS: This is not a checkboxlist, but a checkbox 

Regards, 

chris


RE: Spring BeanPostProcessor called twice for Struts managed beans

2015-10-15 Thread CRANFORD, CHRIS
I could be mistaken, but that would only solve not invoking the post 
instantiation callbacks on the bean and would also imply that the 
BeanPostProcessor implementations actually implement the 
InstantiationAwareBeanPostProcessor interface I believe.   It also seems far 
more logical to put this burn on the dependency injection framework itself, 
particularly since the framework already manages this bean lifecycle workflow 
itself.  

-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com] 
Sent: Thursday, October 15, 2015 7:29 AM
To: Struts Users Mailing List <user@struts.apache.org>
Subject: RE: Spring BeanPostProcessor called twice for Struts managed beans

> From: lukaszlen...@apache.org
> Date: Thu, 15 Oct 2015 07:56:24 +0200
> Subject: Re: Spring BeanPostProcessor called twice for Struts managed 
> beans
> To: user@struts.apache.org
> 
> You are probably right :) Please register an issue and target 2.3.25 
> as a fix version.
> 
> 
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> 2015-10-15 6:57 GMT+02:00 CRANFORD, CHRIS <chris.cranf...@setech.com>:
> > In a recent BeanPostProcessor implementation, I noticed our logic was being 
> > invoked twice in both the before and after initialization callbacks for 
> > struts constructed objects like actions, interceptors, etc while normal 
> > constructed Spring beans via component scanning were only being invoked 
> > once.
> >
> > After debugging in 3.2.24.1, I narrowed the issue down to the 
> > SpringObjectFactory implementation in Xwork2 at lines 194 to 197.  It seems 
> > XWork's implementation manually calls the before and after 
> > BeanPostProcessor callbacks.  Looking at the Spring source for 
> > AbstractAutowireCapableBeanFactory, it seems initializeBean's 
> > implementation also calls these callback methods too, which is what leads 
> > to re-evaluating the struts constructed objects twice.
> >
> > I believe the plugin is based on Spring 3.0.5 (IIRC) and even reviewing the 
> > code base at that release along with the latest 4.2.1 release, both confirm 
> > that initializeBean has always invoked the BeanPostProcessor callbacks 
> > internally and therefore, XWork's implementation really should not worry 
> > with manually invoking them too.
> >
> > Is there a technical reason why the SpringObjectFactory is doing this or is 
> > this an oversight?
> > This just seems like a significant overhead on bean management that could 
> > be avoided, right?
> >
> > Thanks,
> > Chris
MG>2 leads who preceeded Lukasz didnt test out the 
MG>alwaysRespectAutowireStrategy = false logic no testcase means bug 
MG>buried deep within code and  never shouldve seen light of day in a 
MG>Continous Integration environment all features have at least one 
MG>testcase..so if juergens spring code detects property assignment on a 
MG>bean has already been set..maybe we can catch detect that
/**
 * Perform operations after the bean has been instantiated, via a 
constructor or factory method,
 * but before Spring property population (from explicit properties or 
autowiring) occurs.
 * This is the ideal callback for performing field injection on the 
given bean instance.
 * See Spring's own {@link 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor}
 * for a typical example.
 * @param bean the bean instance created, with properties not having been 
set yet
 * @param beanName the name of the bean
 * @return {@code true} if properties should be set on the bean; {@code 
false}
 * if property population should be skipped. Normal implementations should 
return {@code true}.
 * Returning {@code false} will also prevent any subsequent 
InstantiationAwareBeanPostProcessor
 * instances being invoked on this bean instance.
 * @throws org.springframework.beans.BeansException in case of errors
 */
boolean postProcessAfterInstantiation(Object bean, String beanName) throws 
BeansException;
MG>Good Catch Chris!
> >
> >
> > 
> > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
  


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



Spring BeanPostProcessor called twice for Struts managed beans

2015-10-14 Thread CRANFORD, CHRIS
In a recent BeanPostProcessor implementation, I noticed our logic was being 
invoked twice in both the before and after initialization callbacks for struts 
constructed objects like actions, interceptors, etc while normal constructed 
Spring beans via component scanning were only being invoked once.

After debugging in 3.2.24.1, I narrowed the issue down to the 
SpringObjectFactory implementation in Xwork2 at lines 194 to 197.  It seems 
XWork's implementation manually calls the before and after BeanPostProcessor 
callbacks.  Looking at the Spring source for 
AbstractAutowireCapableBeanFactory, it seems initializeBean's implementation 
also calls these callback methods too, which is what leads to re-evaluating the 
struts constructed objects twice.

I believe the plugin is based on Spring 3.0.5 (IIRC) and even reviewing the 
code base at that release along with the latest 4.2.1 release, both confirm 
that initializeBean has always invoked the BeanPostProcessor callbacks 
internally and therefore, XWork's implementation really should not worry with 
manually invoking them too.

Is there a technical reason why the SpringObjectFactory is doing this or is 
this an oversight?  
This just seems like a significant overhead on bean management that could be 
avoided, right?

Thanks,
Chris


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



Poblem with bean-validation ( Git-Hub) and struts2-bean-validation-plugin-2.5-BETA2.jar

2015-10-08 Thread Chris
Hello , 
I have some problem with bean-validationand 
struts2-bean-validation-plugin-2.5-BETA2.jarSources :   
https://github.com/apache/struts-examples/tree/master/bean-validationWith new 
sources and Schema2.5 DTD
My lib struts-examples23/11/2013  17:55    43 578 asm-3.3.jar23/11/2013 
 17:55    38 275 asm-commons-3.3.jar23/11/2013  17:55    21 503 
asm-tree-3.3.jar19/02/2014  16:21    69 002 
commons-fileupload-1.3.1.jar04/04/2014  11:19   185 140 
commons-io-2.4.jar10/06/2015  07:51   434 678 
commons-lang3-3.4.jar03/04/2015  07:091 300 487 
freemarker-2.3.22.jar23/11/2013  17:55   614 203 
javassist-3.11.0.GA.jar28/05/2015  07:51   135 903 
log4j-api-2.3.jar01/09/2015  10:46   827 024 
log4j-core-2.3.jar07/04/2015  12:37   229 218 ognl-3.0.11.jar28/09/2015 
 21:26    70 078struts2-convention-plugin-2.5-BETA2.jar28/09/2015  
21:22 1 524 993 struts2-core-2.5-BETA2.jar and my lib 
struts-examples-bean-validation02/09/2015  14:07   477 
382hibernate-validator-4.3.1.Final.jar03/09/2015  08:49    60 796 
jboss-logging-3.1.1.GA.jar15/04/2014  14:57    63 
777validation-api-1.1.0.Final.jar17/07/2015  09:56    24 583 
struts2-bean-validation-plugin-2.5-BETA1.jarThis one is OK 
But if I replace it with the new  struts2-bean-validation-plugin-2.5-BETA2.jar 
28/09/2015  21:35    24 730struts2-bean-validation-plugin-2.5-BETA2.jar 
But here, there is a problem with struts2-bean-validation-plugin-2.5-BETA2.jar
See...
2015-10-08 10:35:54,239 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager)
2015-10-08 10:35:54,239 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper)
2015-10-08 10:35:54,240 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser)
2015-10-08 10:35:54,240 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(org.apache.struts2.dispatcher.DispatcherErrorHandler)
2015-10-08 10:35:54,240 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.security.ExcludedPatternsChecker)
2015-10-08 10:35:54,288 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.security.AcceptedPatternsChecker)
2015-10-08 10:35:54,465 WARN  [http-bio-8080-exec-10] 
interceptor.DefaultBeanValidationManager (DefaultBeanValidationManager.java:82) 
- ** No bean validator class defined - Falling back to default provider 
**
oct. 08, 2015 10:35:54 AM org.hibernate.validator.internal.util.Version 
INFO: HV01: Hibernate Validator 4.3.1.Final
2015-10-08 10:35:54,575 ERROR [http-bio-8080-exec-10] dispatcher.Dispatcher 
(Dispatcher.java:487) - Dispatcher initialization failed
com.opensymphony.xwork2.config.ConfigurationException: Unable to load 
configuration.
    at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
 ~[struts2-core-2.5-BETA2.jar:2.5-BETA2]
    at 
org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:894) 
~[struts2-core-2.5-BETA2.jar:2.5-BETA2]
    at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:434)
 ~[struts2-core-2.5-BETA2.jar:2.5-BETA2]
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:475) 
[struts2-core-2.5-BETA2.jar:2.5-BETA2]
    at 
org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:75)
 [struts2-core-2.5-BETA2.jar:2.5-BETA2]
    at 
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
 [struts2-core-2.5-BETA2.jar:2.5-BETA2]
    at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
 [catalina.jar:7.0.34]
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
 [catalina.jar:7.0.34]
    at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
 [catalina.jar:7.0.34]
    at 
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:104)
 [catalina.jar:7.0.34]
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650) 
[catalina.jar:7.0.34]
    at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
 [catalina.jar:7.0.34]
    at 

Re: Poblem with bean-validation ( Git-Hub) and struts2-bean-validation-plugin-2.5-BETA2.jar

2015-10-08 Thread Chris
)
    at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Caused by: Unable to load configuration. - [unknown location]
    at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    at 
org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:894)
    at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:434)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:475)
    ... 46 more
Caused by: Parent package is not defined: rest-default - [unknown location]
    at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildPackageContext(XmlConfigurationProvider.java:675)
    at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:525)
    at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:311)
    at 
org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:108)
    at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:186)
    at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    ... 49 more


 


 Le Jeudi 8 octobre 2015 10h53, Chris <christal...@yahoo.fr> a écrit :
   

 Hello , 
I have some problem with bean-validationand 
struts2-bean-validation-plugin-2.5-BETA2.jarSources :   
https://github.com/apache/struts-examples/tree/master/bean-validationWith new 
sources and Schema2.5 DTD
My lib struts-examples23/11/2013  17:55    43 578 asm-3.3.jar23/11/2013 
 17:55    38 275 asm-commons-3.3.jar23/11/2013  17:55    21 503 
asm-tree-3.3.jar19/02/2014  16:21    69 002 
commons-fileupload-1.3.1.jar04/04/2014  11:19   185 140 
commons-io-2.4.jar10/06/2015  07:51   434 678 
commons-lang3-3.4.jar03/04/2015  07:091 300 487 
freemarker-2.3.22.jar23/11/2013  17:55   614 203 
javassist-3.11.0.GA.jar28/05/2015  07:51   135 903 
log4j-api-2.3.jar01/09/2015  10:46   827 024 
log4j-core-2.3.jar07/04/2015  12:37   229 218 ognl-3.0.11.jar28/09/2015 
 21:26    70 078struts2-convention-plugin-2.5-BETA2.jar28/09/2015  
21:22 1 524 993 struts2-core-2.5-BETA2.jar and my lib 
struts-examples-bean-validation02/09/2015  14:07   477 
382hibernate-validator-4.3.1.Final.jar03/09/2015  08:49    60 796 
jboss-logging-3.1.1.GA.jar15/04/2014  14:57    63 
777validation-api-1.1.0.Final.jar17/07/2015  09:56    24 583 
struts2-bean-validation-plugin-2.5-BETA1.jarThis one is OK 
But if I replace it with the new  struts2-bean-validation-plugin-2.5-BETA2.jar 
28/09/2015  21:35    24 730struts2-bean-validation-plugin-2.5-BETA2.jar 
But here, there is a problem with struts2-bean-validation-plugin-2.5-BETA2.jar
See...
2015-10-08 10:35:54,239 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager)
2015-10-08 10:35:54,239 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper)
2015-10-08 10:35:54,240 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser)
2015-10-08 10:35:54,240 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(org.apache.struts2.dispatcher.DispatcherErrorHandler)
2015-10-08 10:35:54,240 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.security.ExcludedPatternsChecker)
2015-10-08 10:35:54,288 INFO  [http-bio-8080-exec-10] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.security.AcceptedPatternsChecker)
2015-10-08 10:35:54,465 WARN  [http-bio-8080-exec-10] 
interceptor.DefaultBeanValidationManager (DefaultBeanValidationManager.java:82) 
- ** No bean validator class defined - Falling back to default provider 
**
oct. 08, 2015 10:35:54 AM org.hibernate.validator.internal.util.Version 
INFO: HV01: Hib

Warning Deprecated with struts-examples/debugging-struts/

2015-09-30 Thread Chris
Hello, There are WARNING with struts2-convention-plugin-2.5-BETA1.jar  
With https://github.com/apache/struts-examples/tree/master/debugging-struts
... 
2015-09-30 14:50:07,306 DEBUG [http-bio-8080-exec-17] 
interceptor.FileUploadInterceptor (FileUploadInterceptor.java:241) - Bypassing 
//hello
2015-09-30 14:50:07,321 DEBUG [http-bio-8080-exec-17] 
validator.ValidationInterceptor (ValidationInterceptor.java:216) - Validating 
//hello with method execute.
2015-09-30 14:50:07,343 DEBUG [http-bio-8080-exec-17] 
interceptor.DeprecationInterceptor (DeprecationInterceptor.java:39) - 
***
**   **
**   WARNING **
**    YOU USE DEPRECATED / UNKNOWN CONSTANTS **
**   **
**  -> struts.convention.actionNameBuilder   **
**  -> struts.convention.result.path **
**  -> struts.convention.classes.reload  **
**  -> struts.convention.action.mapAllMatches    **
**  -> struts.convention.relative.result.types   **
**  -> struts.convention.package.locators.disable    **
**  -> struts.convention.action.name.lowercase   **
**  -> struts.convention.package.locators    **
**  -> struts.convention.action.checkImplementsAction    **
**  -> struts.convention.action.fileProtocols    **
**  -> struts.convention.action.disableScanning  **
**  -> struts.convention.exclude.parentClassLoader   **
**  -> struts.convention.default.parent.package  **
**  -> struts.convention.exclude.packages    **
**  -> struts.convention.package.locators.basePackage    **
**  -> struts.convention.conventionsService  **
**  -> struts.convention.action.name.separator   **
**  -> struts.convention.redirect.to.slash   **
**  -> struts.convention.action.alwaysMapExecute **
**  -> struts.convention.interceptorMapBuilder   **
**  -> struts.convention.action.suffix   **
**  -> struts.convention.result.flatLayout   **
**  -> struts.convention.resultMapBuilder    **
**  -> struts.convention.actionConfigBuilder **
***

2015-09-30 14:50:07,347 DEBUG [http-bio-8080-exec-17] 
result.ServletDispatcherResult (ServletDispatcherResult.java:130) - Forwarding 
to location: /HelloWorld.jsp
2015-09-30 14:50:07,440 DEBUG [http-bio-8080-exec-17] components.UIBean 
(UIBean.java:1000) - Cannot determine id attribute for 
[org.apache.struts2.components.Debug@c57137], consider defining id, name or key 
attribute!
2015-09-30 14:50:07,441 DEBUG [http-bio-8080-exec-17] components.UIBean 
(UIBean.java:579) - Rendering template /template/xhtml/debug
2015-09-30 14:50:07,444 DEBUG [http-bio-8080-exec-17] 
template.FreemarkerTemplateEngine (FreemarkerTemplateEngine.java:122) - 
Rendering template: /template/simple/debug.ftl
2015-09-30 14:50:09,334 DEBUG [http-bio-8080-exec-17] 
interceptor.FileUploadInterceptor (FileUploadInterceptor.java:241) - Bypassing 
//index
2015-09-30 14:50:09,335 DEBUG [http-bio-8080-exec-17] 
validator.ValidationInterceptor (ValidationInterceptor.java:216) - Validating 
//index with method execute.
2015-09-30 14:50:09,344 DEBUG [http-bio-8080-exec-17] 
interceptor.DeprecationInterceptor (DeprecationInterceptor.java:39) - 
***
**   **
**   WARNING **
**    YOU USE DEPRECATED / UNKNOWN CONSTANTS **
**   **
**  -> struts.convention.actionNameBuilder   **
**  -> struts.convention.result.path **
**  -> struts.convention.classes.reload  **
**  -> struts.convention.action.mapAllMatches    **
**  -> struts.convention.relative.result.types   **
**  -> struts.convention.package.locators.disable    **
**  -> 

Re: GitHub example annotations with 2 differents files named index.jsp

2015-09-10 Thread Chris
Thank you. I see.
 But , Is not that a bit dangerous to let the user change the link? I prefer 
when Struts2 intercept the modification without error.

 Anyway, the line in the jsp index.jsp
 <% Response.sendRedirect ("/ index.jsp"); %>
 does not work for me, because it refers to
 http: // localhost: 8080 / index.jsp (a blank page )And because I work with 
the link 
http://localhost:8080/st2_ex_16_annotations/

 On my PC, I change "/index.jsp" 
into "index.jsp" or "./index.jsp "

 see
 <% Response.sendRedirect ("index.jsp"); %>
 or
 <% Response.sendRedirect ("./ index.jsp"); %>
 and redirection works well. toward http: // localhost: 8080 / 
st2_ex_16_annotations / index.jsp 


 Le Jeudi 10 septembre 2015 8h26, Lukasz Lenart <lukaszlen...@apache.org> a 
écrit :
   

 2015-09-09 9:50 GMT+02:00 Chris <christal...@yahoo.fr>:
> Hello,
> 2 differents files named index.jsp, exist in annotations example.
> But they are differents, and not in the same directoryDo we need this 
> sendRedirect ?
> GitHub  apache/struts-examples/annotations/
> 1 ) src/main/webapp/index.jsp

It's a welcome-page defined in web.xml

> 2 ) src/main/webapp/WEB-INF/content/index.jsp
> <% response.sendRedirect("/index.jsp"); %>

It's used by Convention's Index action
https://github.com/apache/struts/blob/master/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java#L1041

so you can navigate to url like http://localhost:8080/index.action and
it will work (you will be redirected back to /index.jsp)


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


  

GitHub example annotations with 2 differents files named index.jsp

2015-09-09 Thread Chris
Hello, 
2 differents files named index.jsp, exist in annotations example.
But they are differents, and not in the same directoryDo we need this 
sendRedirect ?
GitHub  apache/struts-examples/annotations/
1 ) src/main/webapp/index.jsp

2 ) src/main/webapp/WEB-INF/content/index.jsp
<% response.sendRedirect("/index.jsp"); %>


Spring Injection Strange behaviour

2015-09-05 Thread Chris
I'm trying to use the Spring plugin to inject a dependency into my action at 
runtime. This is the first time I've tried this with Struts2 so I may have 
missed something but I'm stumped because I can see the dependency is injected 
but then the object is later null when I need to use it. Here is my action 
class code:

public class UserRegisterAction extends ActionSupport {
private User user = new User();

@Override
public String execute(){
getUserService().saveUser(user);
return "success";
}

public UserServiceImpl getUserService(){
return userService;
}

UserServiceImpl userService;
public void setUserService(UserServiceImpl us){
this.userService = us;
}
}

Using the debugger I can see that upon startup "setUserService is called and 
this.userService is set, so the injection appears to be working ok, but when 
the execute method is called when the page is submitted userService is null. 
I'm quite new to Struts but I don't understand how my userService is being null.

Can anyone see what I am missing?


My applicationContext:




http://www.springframework.org/schema/beans;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:tx="http://www.springframework.org/schema/tx;
   xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
   http://www.springframework.org/schema/tx 
http://www.springframework.org/schema/tx/spring-tx.xsd; 
default-autowire="byName">






































Web.xml:


http://xmlns.jcp.org/xml/ns/javaee;
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd;
 version="3.1">

   
struts2

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter



struts2
/*




org.springframework.web.context.ContextLoaderListener




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



Re: RE: Spring Injection Strange behaviour - SOLVED!

2015-09-05 Thread Chris

Finally I found the root cause.
 
It seems I had some Spring jars of an earlier version in my Tomcat lib 
directory on my dev machine, since I have more than one version of tomcat on my 
system I was looking in the wrong instance of tomcat when I was trying identify 
the cause. Sometimes I am such an idiot.
 
Thanks
 
Chris
 

Sent: Sunday, September 06, 2015 at 3:32 AM
From: Chris <crisp...@gmx.us>
To: "Dave Newton" <davelnew...@gmail.com>, "Struts Users Mailing List" 
<user@struts.apache.org>
Subject: RE: Spring Injection Strange behaviour

Hi Dave,
 
Thanks for your reply.
 
I tried setting the scope of the action bean to prototype  (amoung 100 other 
things) but it didn't change the behaviour.  I'm using Struts2 with Sping 
plugin,  jdk1.8.0_51.
 
If it wasn't calling the setter that would make more sense, but sine it is 
calling the setter that makes me beleive he autowiring is working, I just can't 
understand why its later being set to null. I thought it might be a scope issue 
but I don't know enough about struts to dig much deeper.
 
Thanks
 
Chris
 
-Original Message-
From: Dave Newton [mailto:davelnew...@gmail.com]
Sent: Saturday, September 5, 2015 11:27 PM
To: Struts Users Mailing List
Subject: Re: Spring Injection Strange behaviour
 
Not sure, but if nothing else the action should be set to `prototype` scope, as 
they're instantiated per-request.
 
Are you using the Struts 2 Spring plugin?
 
On Sat, Sep 5, 2015 at 8:47 AM, Chris <crisp...@gmx.us[mailto:crisp...@gmx.us]> 
wrote:
 
> I'm trying to use the Spring plugin to inject a dependency into my
> action at runtime. This is the first time I've tried this with Struts2
> so I may have missed something but I'm stumped because I can see the
> dependency is injected but then the object is later null when I need
> to use it. Here is my action class code:
> 
> public class UserRegisterAction extends ActionSupport {
> private User user = new User();
> 

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

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



RE: Spring Injection Strange behaviour

2015-09-05 Thread Chris


Hi Dave,
 
Thanks for your reply.
 
I tried setting the scope of the action bean to prototype  (amoung 100 other 
things) but it didn't change the behaviour.  I'm using Struts2 with Sping 
plugin,  jdk1.8.0_51.
 
If it wasn't calling the setter that would make more sense, but sine it is 
calling the setter that makes me beleive he autowiring is working, I just can't 
understand why its later being set to null. I thought it might be a scope issue 
but I don't know enough about struts to dig much deeper.
 
Thanks
 
Chris
 
-Original Message-
From: Dave Newton [mailto:davelnew...@gmail.com]
Sent: Saturday, September 5, 2015 11:27 PM
To: Struts Users Mailing List
Subject: Re: Spring Injection Strange behaviour
 
Not sure, but if nothing else the action should be set to `prototype` scope, as 
they're instantiated per-request.
 
Are you using the Struts 2 Spring plugin?
 
On Sat, Sep 5, 2015 at 8:47 AM, Chris <crisp...@gmx.us[mailto:crisp...@gmx.us]> 
wrote:
 
> I'm trying to use the Spring plugin to inject a dependency into my
> action at runtime. This is the first time I've tried this with Struts2
> so I may have missed something but I'm stumped because I can see the
> dependency is injected but then the object is later null when I need
> to use it. Here is my action class code:
> 
> public class UserRegisterAction extends ActionSupport {
> private User user = new User();
> 

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



Re: about struts-examples apache/struts-examples -> bean-validation example

2015-09-03 Thread Chris
Hello, 

The bean-validation example works now, after adding jboss-logging-3.1.1.GA.jar

I didn't know I could use a jboss file jar with only Netbeans 7.3 and Apache 
Tomcat 7.0.34.So the java jar file influence the validation and the message 
errors directly on html page. 


PS : with the exclude_parameters example, the errors messages are not in the 
same files
===
exclude_parameters :
EditAction.properties
personBean.firstName=First name

EditAction-validation.xml

 
 personBean.firstName
 First name is required.
 

===

bean-validation ( All is in EditAction.properties ) 

EditAction.properties
personBean.firstName=First name
firstName.required=You must enter the first 
name===

Regards,

Chris




Re: about struts-examples https://github.com/apache/struts-examples

2015-09-02 Thread Chris
(ContainerImpl.java:560)
 ~[struts2-core-2.5-BETA1.jar:2.5-BETA1]
    at 
com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:505) 
~[struts2-core-2.5-BETA1.jar:2.5-BETA1]
    at 
com.opensymphony.xwork2.ObjectFactory.injectInternalBeans(ObjectFactory.java:155)
 ~[struts2-core-2.5-BETA1.jar:2.5-BETA1]
    at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:180) 
~[struts2-core-2.5-BETA1.jar:2.5-BETA1]
    at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:167) 
~[struts2-core-2.5-BETA1.jar:2.5-BETA1]
    at 
com.opensymphony.xwork2.factory.DefaultInterceptorFactory.buildInterceptor(DefaultInterceptorFactory.java:42)
 ~[struts2-core-2.5-BETA1.jar:2.5-BETA1]
    ... 60 more
sept. 02, 2015 3:18:26 PM org.apache.catalina.util.LifecycleBase start
INFO: The start() method was called on component 
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/st2_ex_22_bean-validation]]
 after start() had already been called. The second call will be ignored.
sept. 02, 2015 3:18:30 PM org.apache.jasper.compiler.TldLocationsCache 
tldScanJar
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug 
logging for this logger for a complete list of JARs that were scanned but no 
TLDs were found in them. Skipping unneeded JARs during scanning can improve 
startup time and JSP compilation time.
2015-09-02 15:18:35,352 ERROR [http-bio-8080-exec-4] 
interceptor.ParametersInterceptor (ParametersInterceptor.java:321) - Developer 
Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'submit' on 'class 
org.apache.struts.edit.action.EditAction: Error setting expression 'submit' 
with value ['Save Changes', ]
2015-09-02 15:18:47,252 ERROR [http-bio-8080-exec-4] 
interceptor.ParametersInterceptor (ParametersInterceptor.java:321) - Developer 
Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'submit' on 'class 
org.apache.struts.edit.action.EditAction: Error setting expression 'submit' 
with value ['Save Changes', ]

 


 Le Mercredi 2 septembre 2015 12h37, Lukasz Lenart 
<lukaszlen...@apache.org> a écrit :
   

 2015-09-01 19:50 GMT+02:00 Chris <christal...@yahoo.fr>:
> Hello,
> It seems there are some new examples in apache/struts-examplesFrom A to Z1 ) 
> bean-validation2 ) blank3 ) jboss-blanc4 ) mailreader5 ) 
> restful2actionmapper6) themes_override

Yes

1) to show how to use the new Bean Validation Plugin
2-4) moved from Struts to reduce its weight
5) no idea :)
6) how to override theme's templates

> About
> 1 ) bean-validationIt seems we need 2 jar  ( validation-api-1.1.0.Final.jar 
> and hibernate ? )
> bean-validation.
> 1 ) org.apache.struts.edit.action.EditAction.java  needs ->  
> javax.validation.*    ( validation-api-1.1.0.Final.jar OK in package stuts2.5 
> BETA1 )
> 2 ) org.apache.struts.edit.model;Person;java
> needs ->  javax.validation.constraints.*    ( validation-api-1.1.0.Final.jar 
> ) OK
>                    AND              ->  org.hibernate.validator.constraints.*
> What do you think ?

It depends on what implementation of Bean Validation you use/prefer


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


  

Re: about struts-examples https://github.com/apache/struts-examples

2015-09-02 Thread Chris
I am using the files23/11/2013  17:55    43ÿ578 asm-3.3.jar
23/11/2013  17:55    38ÿ275 asm-commons-3.3.jar
23/11/2013  17:55    21ÿ503 asm-tree-3.3.jar
19/02/2014  16:21    69ÿ002 commons-fileupload-1.3.1.jar
04/04/2014  11:19   185ÿ140 commons-io-2.4.jar
10/06/2015  07:51   434ÿ678 commons-lang3-3.4.jar
03/04/2015  07:09 1ÿ300ÿ487 freemarker-2.3.22.jar
23/11/2013  17:55   614ÿ203 javassist-3.11.0.GA.jar
28/05/2015  07:51   135ÿ903 log4j-api-2.3.jar
01/09/2015  10:46   827ÿ024 log4j-core-2.3(1).jar
07/04/2015  12:37   229ÿ218 ognl-3.0.11.jar
17/07/2015  09:46    69ÿ065 struts2-convention-plugin-2.5-BETA1.jar
17/07/2015  09:42 1ÿ517ÿ057 struts2-core-2.5-BETA1.jar


02/09/2015  14:07   477ÿ382 hibernate-validator-4.3.1.Final.jar
17/07/2015  09:56    24ÿ583 struts2-bean-validation-plugin-2.5-BETA1.jar

15/04/2014  14:57    63ÿ777 validation-api-1.1.0.Final.jar
 


 Le Mercredi 2 septembre 2015 15h48, Chris <christal...@yahoo.fr> a écrit :
   

 Thank you, 
so I added the right 4.3.1.Final version but I also need app-validation.

 Then I noticed that even if the application starts, unfortunately the tests in 
the form are not controled. Everything happens as if there were no control !.
 See ... without parameters..Updated Information
Your information:
First Name:  |  Last Name:  |  Favorite Sport: basketball |  Gender: not sure | 
 Residency: KS |  Over 21: false |  Car models: [] |  Email:  |  Phone: 
Return to home page.
Extracts : 
2015-09-02 15:18:25,588 WARN  [http-bio-8080-exec-9] 
interceptor.DefaultBeanValidationManager (DefaultBeanValidationManager.java:80) 
- ** No bean validator class defined - Falling back to default provider 
**Extracts :2015-09-02 15:18:25,605 ERROR [http-bio-8080-exec-9] 
providers.InterceptorBuilder (InterceptorBuilder.java:75) - Unable to load 
config class 
org.apache.struts.beanvalidation.validation.interceptor.BeanValidationInterceptor
com.opensymphony.xwork2.config.ConfigurationException: Caught Exception while 
registering Interceptor class 
org.apache.struts.beanvalidation.validation.interceptor.BeanValidationInterceptor
    at 
com.opensymphony.xwork2.factory.DefaultInterceptorFactory.buildInterceptor(DefaultInterceptorFactory.java:69)
 ~[struts2-core-2.5-BETA1.jar:2.5-BETA1]
    at 
com.opensymphony.xwork2.ObjectFactory.buildInterceptor(ObjectFactory.java:198) 
~[struts2-core-2.5-BETA1.jar:2.5-BETA1]


2015-09-02 15:18:25,346 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (jakarta) for 
(org.apache.struts2.dispatcher.multipart.MultiPartRequest)
2015-09-02 15:18:25,346 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(org.apache.struts2.views.freemarker.FreemarkerManager)
2015-09-02 15:18:25,348 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer)
2015-09-02 15:18:25,349 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.validator.ActionValidatorManager)
2015-09-02 15:18:25,349 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory)
2015-09-02 15:18:25,350 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.util.reflection.ReflectionProvider)
2015-09-02 15:18:25,351 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.util.reflection.ReflectionContextFactory)
2015-09-02 15:18:25,351 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher)
2015-09-02 15:18:25,351 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (org.apache.struts2.util.ContentTypeMatcher)
2015-09-02 15:18:25,351 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader)
2015-09-02 15:18:25,352 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager)
2015-09-02 15:18:25,352 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionPr

Re: about struts-examples https://github.com/apache/struts-examples

2015-09-02 Thread Chris
Same things renamming 
01/09/2015  10:46   827ÿ024 log4j-core-2.3(1).jarin 01/09/2015  10:46   
    827ÿ024 log4j-core-2.3.jar 


 Le Mercredi 2 septembre 2015 16h09, Chris <christal...@yahoo.fr> a écrit :
   

 I am using the files23/11/2013  17:55    43ÿ578 asm-3.3.jar
23/11/2013  17:55    38ÿ275 asm-commons-3.3.jar
23/11/2013  17:55    21ÿ503 asm-tree-3.3.jar
19/02/2014  16:21    69ÿ002 commons-fileupload-1.3.1.jar
04/04/2014  11:19   185ÿ140 commons-io-2.4.jar
10/06/2015  07:51   434ÿ678 commons-lang3-3.4.jar
03/04/2015  07:09 1ÿ300ÿ487 freemarker-2.3.22.jar
23/11/2013  17:55   614ÿ203 javassist-3.11.0.GA.jar
28/05/2015  07:51   135ÿ903 log4j-api-2.3.jar
01/09/2015  10:46   827ÿ024 log4j-core-2.3(1).jar
07/04/2015  12:37   229ÿ218 ognl-3.0.11.jar
17/07/2015  09:46    69ÿ065 struts2-convention-plugin-2.5-BETA1.jar
17/07/2015  09:42 1ÿ517ÿ057 struts2-core-2.5-BETA1.jar


02/09/2015  14:07   477ÿ382 hibernate-validator-4.3.1.Final.jar
17/07/2015  09:56    24ÿ583 struts2-bean-validation-plugin-2.5-BETA1.jar

15/04/2014  14:57    63ÿ777 validation-api-1.1.0.Final.jar
 


 Le Mercredi 2 septembre 2015 15h48, Chris <christal...@yahoo.fr> a écrit :
   

 Thank you, 
so I added the right 4.3.1.Final version but I also need app-validation.

 Then I noticed that even if the application starts, unfortunately the tests in 
the form are not controled. Everything happens as if there were no control !.
 See ... without parameters..Updated Information
Your information:
First Name:  |  Last Name:  |  Favorite Sport: basketball |  Gender: not sure | 
 Residency: KS |  Over 21: false |  Car models: [] |  Email:  |  Phone: 
Return to home page.
Extracts : 
2015-09-02 15:18:25,588 WARN  [http-bio-8080-exec-9] 
interceptor.DefaultBeanValidationManager (DefaultBeanValidationManager.java:80) 
- ** No bean validator class defined - Falling back to default provider 
**Extracts :2015-09-02 15:18:25,605 ERROR [http-bio-8080-exec-9] 
providers.InterceptorBuilder (InterceptorBuilder.java:75) - Unable to load 
config class 
org.apache.struts.beanvalidation.validation.interceptor.BeanValidationInterceptor
com.opensymphony.xwork2.config.ConfigurationException: Caught Exception while 
registering Interceptor class 
org.apache.struts.beanvalidation.validation.interceptor.BeanValidationInterceptor
    at 
com.opensymphony.xwork2.factory.DefaultInterceptorFactory.buildInterceptor(DefaultInterceptorFactory.java:69)
 ~[struts2-core-2.5-BETA1.jar:2.5-BETA1]
    at 
com.opensymphony.xwork2.ObjectFactory.buildInterceptor(ObjectFactory.java:198) 
~[struts2-core-2.5-BETA1.jar:2.5-BETA1]


2015-09-02 15:18:25,346 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (jakarta) for 
(org.apache.struts2.dispatcher.multipart.MultiPartRequest)
2015-09-02 15:18:25,346 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(org.apache.struts2.views.freemarker.FreemarkerManager)
2015-09-02 15:18:25,348 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer)
2015-09-02 15:18:25,349 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.validator.ActionValidatorManager)
2015-09-02 15:18:25,349 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory)
2015-09-02 15:18:25,350 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.util.reflection.ReflectionProvider)
2015-09-02 15:18:25,351 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for 
(com.opensymphony.xwork2.util.reflection.ReflectionContextFactory)
2015-09-02 15:18:25,351 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher)
2015-09-02 15:18:25,351 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (org.apache.struts2.util.ContentTypeMatcher)
2015-09-02 15:18:25,351 INFO  [http-bio-8080-exec-9] 
config.AbstractBeanSelectionProvider (AbstractBeanSelectionProvider.java:49) - 
Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader)
2015-09-02 15:18:25,352 INFO  [http-bio

about struts-examples https://github.com/apache/struts-examples

2015-09-01 Thread Chris
Hello, 
It seems there are some new examples in apache/struts-examplesFrom A to Z1 ) 
bean-validation2 ) blank3 ) jboss-blanc4 ) mailreader5 ) restful2actionmapper6) 
themes_override
About 
1 ) bean-validationIt seems we need 2 jar  ( validation-api-1.1.0.Final.jar and 
hibernate ? ) 
bean-validation.
1 ) org.apache.struts.edit.action.EditAction.java   needs ->  
javax.validation.*    ( validation-api-1.1.0.Final.jar OK in package stuts2.5 
BETA1 )
2 ) org.apache.struts.edit.model;Person;java    
needs ->  javax.validation.constraints.*    ( validation-api-1.1.0.Final.jar ) 
OK
                    AND      ->  org.hibernate.validator.constraints.*
What do you think ? 
Regards
chris

|   |
|   |  |   |   |   |   |   |
| apache/struts-examplesstruts-examples - Mirror of Apache Struts |
|  |
| Afficher sur github.com | Aperçu par Yahoo |
|  |
|   |




Re: Struts 2.5.Beta1 and samples

2015-08-27 Thread Chris
   Thank you for help and answers 


 Le Mercredi 26 août 2015 16h09, Chris christal...@yahoo.fr a écrit :
   

 Thanks, It works now. 
I can't say why
Also with 
D:\NetbeansLibs\log4j beta\log4j-api-2.3.jar 


 Le Mercredi 26 août 2015 15h52, Lukasz Lenart lukaszlen...@apache.org a 
écrit :
   

 I cannot reproduce your problem. Just cloned a fresh copy from GitHub,
started the first example - annotations and everything works. Please
be aware that there is no more 'develop' branch, please use 'master'
branch

Here is the dependency list

[INFO] The following files have been resolved:
[INFO]    org.apache.commons:commons-lang3:jar:3.4:compile
[INFO]    org.freemarker:freemarker:jar:2.3.22:compile
[INFO]    org.apache.logging.log4j:log4j-core:jar:2.3:compile
[INFO]    commons-io:commons-io:jar:2.4:compile
[INFO]    org.apache.struts:struts2-core:jar:2.5-BETA1:compile
[INFO]    org.apache.struts:struts2-convention-plugin:jar:2.5-BETA1:compile
[INFO]    ognl:ognl:jar:3.0.11:compile
[INFO]    asm:asm:jar:3.3:compile
[INFO]    javassist:javassist:jar:3.11.0.GA:compile
[INFO]    asm:asm-tree:jar:3.3:compile
[INFO]    commons-fileupload:commons-fileupload:jar:1.3.1:compile
[INFO]    org.apache.logging.log4j:log4j-api:jar:2.3:compile
[INFO]    asm:asm-commons:jar:3.3:compile

can you do the same?
mvn dependency:list -DincludeScope=runtime


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2015-08-26 11:33 GMT+02:00 Chris christal...@yahoo.fr:
 Yes we are.
  thank you for mentioning.I didn't. But , yes, it's about 
https://github.com/apache/struts-examples
 Regards



      Le Mercredi 26 août 2015 6h47, Lukasz Lenart lukaszlen...@apache.org a 
écrit :


  Strange, I don't see such problems. Are we talking about struts-examples?
 https://github.com/apache/struts-examples


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2015-08-25 19:12 GMT+02:00 Chris christal...@yahoo.fr:
 Hi,
 Thank you for the update.I did it to ,  yesterday,  but I got a new error 
 about log4j. ( even with log4j2.xml)
  I think with version 2.5 Beta1 , we must now add the new jar log4j 
api-2.3.jar.But this is not enough, alas.
  Here is the error ...( maybe log4j api-2.3.jar comes not alone ? )août 25, 
2015 2:26:58 PM org.apache.catalina.core.StandardContext filterStart
 SEVERE: Exception au démarrage du filtre struts2
 java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
    at org.apache.struts2.dispatcher.Dispatcher.clinit(Dispatcher.java:82)
    at 
org.apache.struts2.dispatcher.InitOperations.createDispatcher(InitOperations.java:106)
    at 
org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:69)
    at 
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
    at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
    at 
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:104)
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    at 
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
 Caused by: java.lang.ClassNotFoundException: 
 org.apache.logging.log4j.LogManager
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    ... 22 more

 août 25, 2015 2:27:13 PM org.apache.catalina.core.StandardContext filterStart
 SEVERE: Exception au démarrage du filtre struts2
 java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
    at org.apache.struts2.dispatcher.Dispatcher.clinit(Dispatcher.java:82)
    at 
org.apache.struts2.dispatcher.InitOperations.createDispatcher(InitOperations.java:106

Re: Struts 2.5.Beta1 and samples

2015-08-26 Thread Chris
Yes we are. 
 thank you for mentioning.I didn't. But , yes, it's about 
https://github.com/apache/struts-examples
Regards
 


 Le Mercredi 26 août 2015 6h47, Lukasz Lenart lukaszlen...@apache.org a 
écrit :
   

 Strange, I don't see such problems. Are we talking about struts-examples?
https://github.com/apache/struts-examples


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2015-08-25 19:12 GMT+02:00 Chris christal...@yahoo.fr:
 Hi,
 Thank you for the update.I did it to ,  yesterday,  but I got a new error 
 about log4j. ( even with log4j2.xml)
  I think with version 2.5 Beta1 , we must now add the new jar log4j 
api-2.3.jar.But this is not enough, alas.
  Here is the error ...( maybe log4j api-2.3.jar comes not alone ? )août 25, 
2015 2:26:58 PM org.apache.catalina.core.StandardContext filterStart
 SEVERE: Exception au démarrage du filtre struts2
 java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
    at org.apache.struts2.dispatcher.Dispatcher.clinit(Dispatcher.java:82)
    at 
org.apache.struts2.dispatcher.InitOperations.createDispatcher(InitOperations.java:106)
    at 
org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:69)
    at 
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
    at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
    at 
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:104)
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    at 
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
 Caused by: java.lang.ClassNotFoundException: 
 org.apache.logging.log4j.LogManager
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    ... 22 more

 août 25, 2015 2:27:13 PM org.apache.catalina.core.StandardContext filterStart
 SEVERE: Exception au démarrage du filtre struts2
 java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
    at org.apache.struts2.dispatcher.Dispatcher.clinit(Dispatcher.java:82)
    at 
org.apache.struts2.dispatcher.InitOperations.createDispatcher(InitOperations.java:106)
    at 
org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:69)
    at 
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
    at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
    at 
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:104)
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57

Re: Struts 2.5.Beta1 and samples

2015-08-25 Thread Chris
Hi, 
Thank you for the update.I did it to ,  yesterday,  but I got a new error about 
log4j. ( even with log4j2.xml)
 I think with version 2.5 Beta1 , we must now add the new jar log4j 
api-2.3.jar.But this is not enough, alas.
 Here is the error ...( maybe log4j api-2.3.jar comes not alone ? )août 25, 
2015 2:26:58 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception au démarrage du filtre struts2
java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
    at org.apache.struts2.dispatcher.Dispatcher.clinit(Dispatcher.java:82)
    at 
org.apache.struts2.dispatcher.InitOperations.createDispatcher(InitOperations.java:106)
    at 
org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:69)
    at 
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
    at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
    at 
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:104)
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    at 
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    ... 22 more

août 25, 2015 2:27:13 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception au démarrage du filtre struts2
java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
    at org.apache.struts2.dispatcher.Dispatcher.clinit(Dispatcher.java:82)
    at 
org.apache.struts2.dispatcher.InitOperations.createDispatcher(InitOperations.java:106)
    at 
org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:69)
    at 
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
    at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
    at 
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:104)
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at 
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
    at 

Re: Struts 2.5.Beta1 and samples

2015-08-24 Thread Chris
The name of the package has changed !
Struts2.3.20package org.apache.struts2.dispatcher.ng.filter;
Struts 2.5.Beta1
package org.apache.struts2.dispatcher.filter;

import java.io.IOException;
import java.util.List;
import java.util.regex.Pattern;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.ExecuteOperations;
import org.apache.struts2.dispatcher.PrepareOperations;

public class StrutsPrepareAndExecuteFilter implements StrutsStatics, 
javax.servlet.Filter {




Struts2.3.20
package org.apache.struts2.dispatcher.ng.filter;

import java.io.IOException;
import java.util.List;
import java.util.regex.Pattern;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.ng.ExecuteOperations;
import org.apache.struts2.dispatcher.ng.PrepareOperations;

public class StrutsPrepareAndExecuteFilter implements StrutsStatics, 
javax.servlet.Filter {


 


 Le Lundi 24 août 2015 15h37, Lukasz Lenart lukaszlen...@apache.org a 
écrit :
   

 Filters were moved into a new package but web.xml wasn't updated - can
you register a ticket in JIRA?


Thanks in advance
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2015-08-24 15:32 GMT+02:00 Chris christal...@yahoo.fr:
 Hello,
 I tried all Struts2 samples for many years, with success
 with apache/struts-examples and differents versions 2.3.14, 2.3.15 , 2.3.16 , 
 2.3.20 and Netbeans 6.5 , and Tomcat 7

 |  |
 |  |  |  |  |  |  |  |
 | apache/struts-examplesstruts-examples - Mirror of Apache Struts |
 |  |
 | Afficher sur github.com | Aperçu par Yahoo |
 |  |
 |  |


 Today, I'm trying Struts 2.5.Beta1 with log4j2 but it doens't work.Any idea 
 ?août 24, 2015 12:28:23 PMorg.apache.catalina.core.StandardContext 
 filterStartSEVERE: Exception au démarrage du filtre 
 struts2java.lang.ClassNotFoundException:org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
                 
 atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
                 
 atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
                 
 atorg.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
                 
 atorg.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
                 
 atorg.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
                 
 atorg.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257)
                 
 atorg.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
                 
 atorg.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:104)
                 
 atorg.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
                 
 atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
                 
 atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)        
         
 atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
                 
 atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)     
            
 atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)       
          
 atorg.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
                 
 atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)      
           
 atorg.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)          
       at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)           
      
 atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                 
 atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                 atjava.lang.reflect.Method.invoke(Method.java:601)            
     
 atorg.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
                 
 atcom.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
                 at 
 com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)        
         
 atorg.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)  
               
 atorg.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:860)  
               
 atorg.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:357)   
              atjavax.servlet.http.HttpServlet.service(HttpServlet.java:621)   
              atjavax.servlet.http.HttpServlet.service(HttpServlet.java:728)   
              
 atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305

Struts 2.5.Beta1 and samples

2015-08-24 Thread Chris
Hello, 
I tried all Struts2 samples for many years, with success
with apache/struts-examples and differents versions 2.3.14, 2.3.15 , 2.3.16 , 
2.3.20 and Netbeans 6.5 , and Tomcat 7

|   |
|   |  |   |   |   |   |   |
| apache/struts-examplesstruts-examples - Mirror of Apache Struts |
|  |
| Afficher sur github.com | Aperçu par Yahoo |
|  |
|   |


Today, I'm trying Struts 2.5.Beta1 with log4j2 but it doens't work.Any idea 
?août 24, 2015 12:28:23 PMorg.apache.catalina.core.StandardContext 
filterStartSEVERE: Exception au démarrage du filtre 
struts2java.lang.ClassNotFoundException:org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
    
atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    
atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    
atorg.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
    
atorg.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
    
atorg.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
    
atorg.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257)
    
atorg.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
    
atorg.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:104)
    
atorg.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    
atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    
atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)  
  
atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    
atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)   
 
atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) 
   
atorg.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)  
  
atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
    atorg.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)   
 
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
   
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    atjava.lang.reflect.Method.invoke(Method.java:601)  
  
atorg.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) 
   
atcom.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at 
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)  
  
atorg.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)
    
atorg.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:860)
    
atorg.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:357) 
   atjavax.servlet.http.HttpServlet.service(HttpServlet.java:621)   
 atjavax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
   
atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    
atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    
atorg.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    
atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    
atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    
atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    
atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
    
atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) 
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    
atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) 
   
atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) 
   
atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    

RE: Get single value from a row with displaytag and struts 2

2015-06-22 Thread CRANFORD, CHRIS
Looking back there was one slight typo in my example:

display:table name=notifications uid=tableListUid
  display:column
s:form action=acknowledgeDocumentNotification
  s:hidden name=documentId value=%{#attr.tableListUid.documentId}/
  s:submit key=button.submit/
/s:form
  /display:column
/display:table

The above addresses the typo where documentId is a property on the bean that 
represents a row within the notifications list.

-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com] 
Sent: Wednesday, June 17, 2015 7:25 AM
To: Struts Users Mailing List
Subject: RE: Get single value from a row with displaytag and struts 2

Hi Chris-
i dont see documentId in TableTag.java from displaytag source ?

/**
 * Licensed under the Artistic License; you may not use this file
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://displaytag.sourceforge.net/license.html
 *
 * THIS PACKAGE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */
package org.displaytag.tags;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections.IteratorUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.LongRange;
import org.apache.commons.lang.math.Range;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.displaytag.decorator.DecoratorFactory;
import org.displaytag.decorator.TableDecorator;
import org.displaytag.exception.DecoratorException;
import org.displaytag.exception.ExportException;
import org.displaytag.exception.FactoryInstantiationException;
import org.displaytag.exception.InvalidTagAttributeValueException;
import org.displaytag.exception.ObjectLookupException;
import org.displaytag.exception.WrappedRuntimeException;
import org.displaytag.export.BinaryExportView;
import org.displaytag.export.ExportView;
import org.displaytag.export.ExportViewFactory;
import org.displaytag.export.TextExportView;
import org.displaytag.model.Cell;
import org.displaytag.model.Column;
import org.displaytag.model.ColumnIterator;
import org.displaytag.model.HeaderCell;
import org.displaytag.model.Row;
import org.displaytag.model.RowIterator;
import org.displaytag.model.TableModel;
import org.displaytag.pagination.SmartListHelper;
import org.displaytag.properties.MediaTypeEnum;
import org.displaytag.properties.SortOrderEnum;
import org.displaytag.properties.TableProperties;
import org.displaytag.util.Anchor;
import org.displaytag.util.CollectionUtil;
import org.displaytag.util.DependencyChecker;
import org.displaytag.util.Href;
import org.displaytag.util.ParamEncoder;
import org.displaytag.util.RequestHelper;
import org.displaytag.util.RequestHelperFactory;
import org.displaytag.util.TagConstants;


/**
 * This tag takes a list of objects and creates a table to display those 
objects. With the help of column tags, you
 * simply provide the name of properties (get Methods) that are called against 
the objects in your list that gets
 * displayed. This tag works very much like the struts iterator tag, most of 
the attributes have the same name and
 * functionality as the struts tag.
 * @author mraible
 * @author Fabrizio Giustina
 * @version $Revision: 1.99 $ ($Author: fgiust $)
 */
public class TableTag extends HtmlTableTag
{

/**
 * name of the attribute added to page scope when exporting, containing an 
MediaTypeEnum this can be used in column
 * content to detect the output type and to return different data when 
exporting.
 */
public static final String PAGE_ATTRIBUTE_MEDIA = mediaType; //$NON-NLS-1$

/**
 * If this variable is found in the request, assume the export filter is 
enabled.
 */
public static final String FILTER_CONTENT_OVERRIDE_BODY = //
org.displaytag.filter.ResponseOverrideFilter.CONTENT_OVERRIDE_BODY; 
//$NON-NLS-1$

/**
 * D1597A17A6.
 */
private static final long serialVersionUID = 899149338534L;

/**
 * logger.
 */
private static Log log = LogFactory.getLog(TableTag.class);

/**
 * RequestHelperFactory instance used for link generation.
 */
private static RequestHelperFactory rhf;

/**
 * Object (collection, list) on which the table is based. This is not set 
directly

RE: Get single value from a row with displaytag and struts 2

2015-06-15 Thread CRANFORD, CHRIS
It sounds to me like you're submitting the row object rather than the ID of the 
object for which you want to operation upon.

The following example should work:

display:table name=notifications uid=tableListUid
  display:column
s:form action=acknowledgeDocumentNotification
  s:hidden name=documentId value=%{#tableListUid.documentId}/
  s:submit key=button.submit/
/s:form
  /display:column
/display:table

The above code gets the document id from the uid specified and uses it as a 
hidden value in the form submission. There are other neat way to avoid having a 
form per row, but this is simple enough.

Your acknowledgeDocumentNotification action should then only receive the 
documentId parameter with the row's document id as the only input value.

Thanks,
Chris

-Original Message-
From: Christoph Nenning [mailto:christoph.nenn...@lex-com.net] 
Sent: Monday, June 08, 2015 5:50 AM
To: Struts Users Mailing List
Subject: Re: Get single value from a row with displaytag and struts 2

 From: Álex Basoa axis...@gmail.com
 To: user@struts.apache.org,
 Date: 03.06.2015 09:33
 Subject: Get single value from a row with displaytag and struts 2
 
 i have a table wich works perfect made with struts 2 and displaytag
 
 display:table name=session.listaNotificaciones 
excludedParams=*
requestURI=navegarNuevoEnvio.action 
class=tablacoin
summary=Listado de Notificaciones cellspacing=0
 cellpadding=0
uid=listaContatosTable
 
 
 display:column title=Estado sortProperty=estado_Nue
 sortable=false
 headerClass=sortable defaultorder=descending
 style=width:12% ;color:red
 
 s:property
 
 value=%
 {@registradores.utiles.enumerados.EstadoTramite@convertirTexto
 (#attr.listaContatosTable.estado_Nue)}
 /
 
 /display:column
 
 
 display:column title=Archivo  headerClass=sortable
 sortable=false defaultorder=descending
 style=width:12% ;color:black
 s:hidden key=estado
 value=%{#attr.listaContatosTable.estado_Nue} /
 s:submit id=botonNotificacion value=Notificación
   cssClass=boton
 onclick=enviarA('descargarDocumentoNotificacionAcuse.action')/
 /display:column
 
 The problem is that i have declared in the action
 
 private String estado;
 
 And i get all values from estado_Nue, but i only need the value wich i
have
 clicked
 
 Thx for all your help



hi,

not sure if i understand what the problem is. You get all items of a list 
posted when you submit your form? How does the html look like? What form 
elements are generated by display?


regards,
Christoph

This Email was scanned by Sophos Anti Virus


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



Re: Integrating struts 2 with Classic JSP SERVLET /JSTL webapp

2015-05-11 Thread Chris Pratt
If all your URLs aren't at the root (which they probably aren't), you'll
want to change your url-pattern to just *.action
  (*Chris*)
 On May 11, 2015 9:46 AM, Kiran Badi ki...@poonam.org wrote:

 Hi Chris,

 Here is Struts 2 filter in web xml,

  filter
 descriptionStruts 2 Filter/description
 filter-namestruts2/filter-name


 filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter/filter-class
 /filter
 filter-mapping
 filter-namestruts2/filter-name
 url-pattern/*.action/url-pattern
 dispatcherREQUEST/dispatcher
 /filter-mapping

 Here is test sample with struts.xml which is web-inf/classes folder

 !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.devMode value=true /
   package name=controller namespace=/ extends=struts-default
   action name=TestStruts
 class=org.vasanti.app.helpcommunity.controller.TestStruts
 method=execute 
 result name=successtestdatasource.jsp/result
 /action
 /package
 /struts

 Here is the test link which I have put in my welcome pag

 On Mon, May 11, 2015 at 9:07 AM, Christoph Nenning 
 christoph.nenn...@lex-com.net wrote:

   I already tried that and it's not working and it fails to deploy to
  tomcat.
  
 
 
  Well, then please give us more details.
 
  You may want to have a look here:
  http://struts.apache.org/docs/home.html
 
 
  Regards,
  Christoph
 
 
 
 
 
 
   On Monday, May 11, 2015, Christoph Nenning
  christoph.nenn...@lex-com.net
   wrote:
  
 Hi,

 I need to integrate struts 2 with my classic web application based
  on
 servlet.

 How do I tell struts 2 intercept only requests coming from specific
folder
 like

 com.mysite.app.xx.yy where I will placing all struts related source
files ?

 Here is the link what I started at stackoverflow,


 http://stackoverflow.com/questions/30056132/integrating-classic-jsp-
 servlet-3-0-based-web-application-with-struts-2?
 noredirect=1#comment48258124_30056132

 Please see if someone can throw some light on my issue.

 -- Kiran Badi
   
   
   
   
Basically you register struts2 in your web.xml for some url pattern,
usually *.action. Struts interceptors and actions will only be
 invoked
  for
those URLs.
   
   
   
Regards,
Christoph
   
This Email was scanned by Sophos Anti Virus
   
 
  This Email was scanned by Sophos Anti Virus
 



Re: Integrating struts 2 with Classic JSP SERVLET /JSTL webapp

2015-05-11 Thread Chris Pratt
Try adding namespace=/to your s:url tag.
  (*Chris*)
On May 11, 2015 10:06 AM, Kiran Badi ki...@poonam.org wrote:

 Hi Chris, it load app with welcome page with *.action mapping,but seems
 like url mapping gets messed up,I get below now.

 a href=s:url action=TestStruts.action/s:urlTest Page/a/h4
 164: /div
 165: !-- End of alert warning container--
 166: hr


 Stacktrace:] with root cause
 The Struts dispatcher cannot be found.  This is usually caused by using
 Struts tags without the associated filter. Struts tags are only usable when
 the request has passed through its servlet filter, which initializes the
 Struts dispatcher needed for this tag. - [unknown location]
 at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
 at

 org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
 at

 org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
 at org.apache.jsp.index_jsp._jspx_meth_s_005furl_005f0(index_jsp.java:652)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:230)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at

 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at listener.trimresponse.doFilter(trimresponse.java:43)
 at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at

 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
 at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 at

 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
 at

 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
 at

 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 at

 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
 at

 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
 at

 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
 at

 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at

 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)


 On Mon, May 11, 2015 at 12:59 PM, Kiran Badi ki...@poonam.org wrote:

  checking chris. I think that should work.Let me check.
 
  On Mon, May 11, 2015 at 12:51 PM, Chris Pratt thechrispr...@gmail.com
  wrote:
 
  If all your URLs aren't at the root (which they probably aren't), you'll
  want to change your url-pattern to just *.action
(*Chris*)
   On May 11, 2015 9:46 AM, Kiran Badi ki...@poonam.org wrote:
 
   Hi Chris,
  
   Here is Struts 2 filter in web xml,
  
filter
   descriptionStruts 2 Filter/description
   filter-namestruts2/filter-name
  
  
  
 
 filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter/filter-class
   /filter
   filter-mapping
   filter-namestruts2/filter-name
   url-pattern/*.action/url-pattern
   dispatcherREQUEST/dispatcher
   /filter-mapping
  
   Here is test sample with struts.xml which is web-inf/classes folder
  
   !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.devMode value=true /
 package name=controller namespace=/ extends=struts-default
 action name=TestStruts
   class=org.vasanti.app.helpcommunity.controller.TestStruts
   method=execute 
   result name=successtestdatasource.jsp/result
   /action
   /package
   /struts
  
   Here is the test link which I have put in my welcome pag
  
   On Mon, May 11, 2015 at 9:07 AM, Christoph Nenning 
   christoph.nenn...@lex-com.net wrote:
  
 I already tried that and it's not working and it fails to deploy
 to
tomcat.

   
   
Well, then please give us more details.
   
You may want to have a look here:
http://struts.apache.org/docs/home.html

RE: Problem using TypeConverters with SelectTag

2015-04-30 Thread CRANFORD, CHRIS
Was this part of the fix in WW-4427?

-Original Message-
From: CRANFORD, CHRIS [mailto:chris.cranf...@setech.com] 
Sent: Tuesday, April 28, 2015 8:30 AM
To: Struts Users Mailing List
Subject: RE: Problem using TypeConverters with SelectTag

Version 2.3.20 GA

-Original Message-
From: Lukasz Lenart [mailto:lukaszlen...@apache.org]
Sent: Tuesday, April 28, 2015 6:20 AM
To: Struts Users Mailing List
Subject: Re: Problem using TypeConverters with SelectTag

Struts version? I thought this was already resolved.

2015-04-24 15:16 GMT+02:00 CRANFORD, CHRIS chris.cranf...@setech.com:
 I have defined a simple POJO and type converter shown here:

 // Model POJO
 public class SiteSelection {
 private String type;
 private String label;
 private ListLong ids = new ArrayListLong();
 /* getter  setters */ }

 // Converter
 public class SiteSelectionTypeConverter extends StrutsTypeConverter {
 @Override
 public Object convertFromString(Map context, String[] values, 
 Class toClass) {
 /* converts values[0] from 
 '{type}:{comma-separted list of ids} */
 }
 @Override
 public String convertToString(Map context, Object object) {
 /* converts object to string using format 
 '{type}:{comma-separated list of ids} */
 }
 }

 // Action
 public class SomeAction extends ActionSupport implements Preparable {
 private ListSiteSelection siteSelections;
 private SiteSelection selectedSite;
 /* getter  setters */ }

 In the JSP, I have used the select tag as follows

 s:select name=selectedSite list=siteSelections /

 The type converters get used and the select is populated with the appropriate 
 key/value pairs.   The problem is when I take a specific entry in the 
 siteSelections and set it on the selectedSite property during the initial 
 render or populate selectedSite and re-render the input page during say a 
 validation failure, the select tag doesn't apply the selected attribute on 
 any options.

 This seems to be an issue with how parameters.nameValue is being determined 
 in the taglib java code and the fact that the template compares this 
 parameter against itemKey rather than itemKeyStr.  In the case of using type 
 conversion, the itemKey is something like com.app.SiteSelection@2b3a51e 
 where as itemKeyStr is A:1,2,3.

 Can someone explain to me what was the intended way to use 
 TypeConverter implementations with a select tag?  The only way I've 
 been able to hack around this issue is

 s:set var=selectedSiteStr value=selectedSite / s:select 
 name=selectedSite value=#selectedSiteStr list=siteSelections
 template=my-custom-select /

 and modifying the select.ftl line 107 from:

 #if tag.contains(parameters.nameValue, itemKey) == true

 To:

 #if tag.contains(parameters.nameValue, itemKeyStr) == true

 But I'm not sure what side effects such a change would have.

 ___
 Chris Cranford
 SAP/Oracle/J2EE Applications Developer SETECH Inc  Companies
 903 Industrial Drive, Murfreesboro TN 37129
 Phone: (615) 890-1755 x361, Fax: (615) 890-9057, Mobile: (704)
 650-1042
 Email: chris.cranf...@setech.commailto:chris.cranf...@setech.com


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


Email secured by Check Point

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

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


RE: Problem using TypeConverters with SelectTag

2015-04-30 Thread CRANFORD, CHRIS
Honestly, if a converter is going to be used when an option/ tag is rendered, 
the select/ tag should use the same logic for determining the selected value 
from the value stack.  It's prudent these two tags act unanimously on the data 
rather than opposing one another as they do now.

Let us assume we have a database record that has a composite key.  One might 
create your list of values in the action as follows:

public class RecordPk {
  private Long field1;
  private Long field2;
}

public class MyAction {
  private MapRecordPk, String choices = new LinkedHashMapRecordPk, String();
  private RecordPk selection;
}

s:select name=selection list=choices /

Using a StrutsTypeConverter I would see:

select name=selection
  option value=1-29393My Label/option
  option value=3-39949Another Label/option
/select

The problem is that the type converter is applied when creating the options and 
when the data is submitted, but the select never defaults the selected choice 
if a selection was initially set in the view model or when the action returns 
the user to input after a validation failure; thus losing any value the user 
had previously selected.  

I don't see this necessarily as a specific use case but just someone trying to 
use the technology as it was intended imo.

-Original Message-
From: Lukasz Lenart [mailto:lukaszlen...@apache.org] 
Sent: Thursday, April 30, 2015 8:30 AM
To: Struts Users Mailing List
Subject: Re: Problem using TypeConverters with SelectTag

2015-04-30 15:22 GMT+02:00 CRANFORD, CHRIS chris.cranf...@setech.com:
 Was this part of the fix in WW-4427?

Rather unrelated to your problem as tags don't use context to store values. I'm 
still thinking if your solution is right, I mean common to be used by any other 
or rather is your specific use case.


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Email secured by Check Point


RE: Problem using TypeConverters with SelectTag

2015-04-28 Thread CRANFORD, CHRIS
Version 2.3.20 GA

-Original Message-
From: Lukasz Lenart [mailto:lukaszlen...@apache.org] 
Sent: Tuesday, April 28, 2015 6:20 AM
To: Struts Users Mailing List
Subject: Re: Problem using TypeConverters with SelectTag

Struts version? I thought this was already resolved.

2015-04-24 15:16 GMT+02:00 CRANFORD, CHRIS chris.cranf...@setech.com:
 I have defined a simple POJO and type converter shown here:

 // Model POJO
 public class SiteSelection {
 private String type;
 private String label;
 private ListLong ids = new ArrayListLong();
 /* getter  setters */ }

 // Converter
 public class SiteSelectionTypeConverter extends StrutsTypeConverter {
 @Override
 public Object convertFromString(Map context, String[] values, 
 Class toClass) {
 /* converts values[0] from 
 '{type}:{comma-separted list of ids} */
 }
 @Override
 public String convertToString(Map context, Object object) {
 /* converts object to string using format 
 '{type}:{comma-separated list of ids} */
 }
 }

 // Action
 public class SomeAction extends ActionSupport implements Preparable {
 private ListSiteSelection siteSelections;
 private SiteSelection selectedSite;
 /* getter  setters */ }

 In the JSP, I have used the select tag as follows

 s:select name=selectedSite list=siteSelections /

 The type converters get used and the select is populated with the appropriate 
 key/value pairs.   The problem is when I take a specific entry in the 
 siteSelections and set it on the selectedSite property during the initial 
 render or populate selectedSite and re-render the input page during say a 
 validation failure, the select tag doesn't apply the selected attribute on 
 any options.

 This seems to be an issue with how parameters.nameValue is being determined 
 in the taglib java code and the fact that the template compares this 
 parameter against itemKey rather than itemKeyStr.  In the case of using type 
 conversion, the itemKey is something like com.app.SiteSelection@2b3a51e 
 where as itemKeyStr is A:1,2,3.

 Can someone explain to me what was the intended way to use 
 TypeConverter implementations with a select tag?  The only way I've 
 been able to hack around this issue is

 s:set var=selectedSiteStr value=selectedSite / s:select 
 name=selectedSite value=#selectedSiteStr list=siteSelections 
 template=my-custom-select /

 and modifying the select.ftl line 107 from:

 #if tag.contains(parameters.nameValue, itemKey) == true

 To:

 #if tag.contains(parameters.nameValue, itemKeyStr) == true

 But I'm not sure what side effects such a change would have.

 ___
 Chris Cranford
 SAP/Oracle/J2EE Applications Developer SETECH Inc  Companies
 903 Industrial Drive, Murfreesboro TN 37129
 Phone: (615) 890-1755 x361, Fax: (615) 890-9057, Mobile: (704) 
 650-1042
 Email: chris.cranf...@setech.commailto:chris.cranf...@setech.com


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


Email secured by Check Point


Problem using TypeConverters with SelectTag

2015-04-24 Thread CRANFORD, CHRIS
I have defined a simple POJO and type converter shown here:

// Model POJO
public class SiteSelection {
private String type;
private String label;
private ListLong ids = new ArrayListLong();
/* getter  setters */
}

// Converter
public class SiteSelectionTypeConverter extends StrutsTypeConverter {
@Override
public Object convertFromString(Map context, String[] values, 
Class toClass) {
/* converts values[0] from 
'{type}:{comma-separted list of ids} */
}
@Override
public String convertToString(Map context, Object object) {
/* converts object to string using format 
'{type}:{comma-separated list of ids} */
}
}

// Action
public class SomeAction extends ActionSupport implements Preparable {
private ListSiteSelection siteSelections;
private SiteSelection selectedSite;
/* getter  setters */
}

In the JSP, I have used the select tag as follows

s:select name=selectedSite list=siteSelections /

The type converters get used and the select is populated with the appropriate 
key/value pairs.   The problem is when I take a specific entry in the 
siteSelections and set it on the selectedSite property during the initial 
render or populate selectedSite and re-render the input page during say a 
validation failure, the select tag doesn't apply the selected attribute on 
any options.

This seems to be an issue with how parameters.nameValue is being determined in 
the taglib java code and the fact that the template compares this parameter 
against itemKey rather than itemKeyStr.  In the case of using type conversion, 
the itemKey is something like com.app.SiteSelection@2b3a51e where as 
itemKeyStr is A:1,2,3.

Can someone explain to me what was the intended way to use TypeConverter 
implementations with a select tag?  The only way I've been able to hack around 
this issue is

s:set var=selectedSiteStr value=selectedSite /
s:select name=selectedSite value=#selectedSiteStr list=siteSelections 
template=my-custom-select /

and modifying the select.ftl line 107 from:

#if tag.contains(parameters.nameValue, itemKey) == true

To:

#if tag.contains(parameters.nameValue, itemKeyStr) == true

But I'm not sure what side effects such a change would have.

___
Chris Cranford
SAP/Oracle/J2EE Applications Developer
SETECH Inc  Companies
903 Industrial Drive, Murfreesboro TN 37129
Phone: (615) 890-1755 x361, Fax: (615) 890-9057, Mobile: (704) 650-1042
Email: chris.cranf...@setech.commailto:chris.cranf...@setech.com



Re: Mysterious(?) carriage returns

2015-04-06 Thread Chris Pratt
I believe line breaks in HTTP are always represented as CRLF pairs,
regardless of the Client or Server OS's
  (*Chris*)

On Mon, Apr 6, 2015 at 2:07 PM Heikki Hyyrö heikki.hy...@uta.fi wrote:

 Hi,

 I have been stumped by the following problem: newlines within text
 received from an html form show up in the form ”\r\n” in our Struts 2
 -based application. I am wondering how this is possible because I have
 verified the following:

 1) The system is running on OS X or Linux, so the OS default newline is
 ”\n”.

 2) The Java virtual machine reports ”\n” as its newline character
 (System.getProperty(”line.separator”)) when running the Struts 2
 -application in a debugger.

 3) When inspecting the form text in a browser debugger, the text shows
 newlines in the form ”\n” just before the form is submitted. I
 double-checked this by inspecting the actual character code values.

 4) When I set a breakpoint to the bean-setter of the corresponding action
 in the Struts 2 application and let the form submission from the browser be
 executed, the setter receives the form text as a String-parameter where the
 newlines have become ”\r\n”.

 What can be the reason for this? The form submission mechanism (something
 on the browser-side or in Tomcat) or the way Struts 2 handles form
 parameters before feeding them to the action? I want to get rid of these
 extra carriage returns but would very much like to find some other way than
 writing special code (such as a custom parameter interceptor) for reverting
 the text back to its original form...

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




Struts2 Rest/Non-Rest Actions

2015-03-10 Thread CRANFORD, CHRIS
I am trying to use the convention and rest plugins to create an action that 
supports both a RESTful API and a Non-RESTful API but it appears on the surface 
this isn't possible.  The only way I have been able to get this to work in the 
same web application was to do the following:

// Simple Non-RESTful Action
public class SimpleAction extends ActionSupport implements ModelDrivenMyBean {
  @Override
  @Action(value = /simple, results = { @Result(name = success, location = 
/jsp/simple.jsp) })
  public String execute() {
return SUCCESS;
  }
}

@Namespace(/rest)
public class ComplexAction extends RestfulActionSupport implements 
ModelDrivenMyBean {
  
}

struts.xml
constant name=struts.convention.action.suffix value=Action /
constant name=struts.convention.action.mapAllMatches value=true /
constant name=struts.convention.default.parent.package value=rest-default 
/
constant name=struts.convention.package.locators value=struts2 /
constant name=struts.action.extension value=xhtml,,xml,json,action,do /
constant name=struts.mapper.class 
value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper /
constant name=struts.mapper.prefixMapping value=/rest:rest,:struts /
constant name=struts.rest.defaultExtension value=json /

What could I missing to where I could have both RESTful and non-RESTful action 
code reside in the same action class with varying annotations?

Thanks,
Chris


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



Re: regex validator problem

2014-12-28 Thread Chris
Hi, 

1 - When you wrote select box, did you mean drop-down list ?
Because drop-down list are not exactly  input fields. The user can't write 
something he wants. Could you please give examples ?
2 - Why don't you use validator type=requiredstring like in 
EditAction-validation.xml ?
3 - If you want tu use an input field with regex, what sort of value are you 
waiting for ?
Could you give please some literal samples ?
Regards,
Chris 

 Le Samedi 27 décembre 2014 15h18, Dave Newton davelnew...@gmail.com a 
écrit :
   

 Did you try defining a complete regex, e.g., with the start/end
markers, `^` and `$`, at the beginning/end of the regex?

On Sat, Dec 27, 2014 at 8:10 AM, Yaragalla Muralidhar
yaragallamur...@gmail.com wrote:
 Hi Dave,
      when -1 is getting submited it has to display error msg which is
 not getting displayed. successfully moving to the next page. It is not
 moving to the input page even.
    Now i have changed the validator to int  so everything is working fine.
 but i need regex validator to work even for further validations.

 *Thanks and Regards,*
 Muralidhar Yaragalla.

 *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/*

 On Sat, Dec 27, 2014 at 7:33 PM, Dave Newton davelnew...@gmail.com wrote:

 On Sat, Dec 27, 2014 at 7:23 AM, Yaragalla Muralidhar
 yaragallamur...@gmail.com wrote:
   validator in the following way but it is not working. Please help.

 Define not working.

 --
 e: davelnew...@gmail.com
 m: 908-380-8699
 s: davelnewton_skype
 t: @dave_newton
 b: Bucky Bits
 g: davelnewton
 so: Dave Newton

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





-- 
e: davelnew...@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton
b: Bucky Bits
g: davelnewton
so: Dave Newton

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



   

Re: label not working

2014-12-20 Thread Chris Pratt
What theme are you using, and what does the output HTML look like?
  (*Chris*)
On Sat Dec 20 2014 at 1:35:46 AM Yaragalla Muralidhar 
yaragallamur...@gmail.com wrote:

 Hi I am using the following code

 s:textfield name=referMan cssClass=textField label=hghlheghhffehk
 cssStyle=width:270px;margin-left:20px;margin-top: 10px;/ /div

 I am not sure why label is not getting rendered? Am i missing something?

 *Thanks and Regards,*
 Muralidhar Yaragalla.

 *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/*



Re: problem with i18n

2014-12-20 Thread Chris Pratt
That's why you're not seeing the labels, they are not supported by the
simple theme.
  (*Chris*)
On Sat Dec 20 2014 at 1:49:15 AM Yaragalla Muralidhar 
yaragallamur...@gmail.com wrote:

 i use simple theme

 *Thanks and Regards,*
 Muralidhar Yaragalla.

 *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/*

 On Sat, Dec 20, 2014 at 3:16 PM, Lukasz Lenart lukaszlen...@apache.org
 wrote:

  What theme do you use?
 
  (on mobile)
  20 gru 2014 08:35 Yaragalla Muralidhar yaragallamur...@gmail.com
  napisał(a):
 
   I am using eclipse. yes it is copied into same package.
  
   *Thanks and Regards,*
   Muralidhar Yaragalla.
  
   *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/*
  
   On Sat, Dec 20, 2014 at 12:46 PM, Lukasz Lenart 
 lukaszlen...@apache.org
  
   wrote:
  
2014-12-20 4:57 GMT+01:00 Yaragalla Muralidhar 
   yaragallamur...@gmail.com
:
 Hi I have created an action class and i have created an properties
  file
 with the same name as action class. Then i am using the following
  code

 s:textfield name=sampleid cssClass=textField label
  readonly=true
 key=sample.reg.sampleid/

 Even though the resource bundle key is specified the label is anot
 appearing for the text field. is there something i am missing? is
  some
 where else also need to configure for localised resource bundle?
   
Can you confirm that the resource file was copied to the same
folder/package as the action's class (I'm not asking about the
 source,
but compiled code)? What do you use to manage the project, Maven?
   
   
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
   

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



Re: Tracking down a StreamResult error??

2014-11-12 Thread Chris Pratt
You may already realize this, but I believe this is what is happening:

You have an action defined to use the stream result type.  The stream
result requires an InputStream to be available on the stack when it starts
processing.  This is usually provided by a getInputStream() method on the
action.  When, getInputSteam() returns null, Struts continues to look up
the stack to try and find the InputStream to stream to the client.  When it
can't find it, it throws the exception you are seeing.  I think you should
look into what conditions could allow your getInputStream() method to
return null (and probably log the heck out of those situations).
  (*Chris*)

On Wed Nov 12 2014 at 9:56:10 AM Burton Rhodes burtonrho...@gmail.com
wrote:

 I am having trouble tracking down an error we are experiencing on our
 production server.  This happens very rarely, but every once in a while we
 will get flooded with 75+ error logs in about a 1 minute span with the
 errors below.  Having trouble identifying which action and/or class is
 causing the issue.  Any ideas?

 The two entries below are repeated over 70x in 2 minutes.


 [2014-11-12 17:28:54,111]

 ERROR

 org.apache.struts2.dispatcher.StreamResult

 Can not find a java.io.InputStream with the name [inputStream] in the
 invocation stack. Check the param name=inputName tag specified for this
 action.


 [2014-11-12 17:28:52,576]

 ERROR

 com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor

 Can not find a java.io.InputStream with the name [inputStream] in the
 invocation stack. Check the param name=inputName tag specified for this
 action.

 java.lang.IllegalArgumentException: Can not find a java.io.InputStream
 with
 the name [inputStream] in the invocation stack. Check the param
 name=inputName tag specified for this action.
  at
 org.apache.struts2.dispatcher.StreamResult.doExecute(
 StreamResult.java:237)
  at
 org.apache.struts2.dispatcher.StrutsResultSupport.execute(
 StrutsResultSupport.java:186)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(
 DefaultActionInvocation.java:371)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:275)
  at
 org.apache.struts2.interceptor.DeprecationInterceptor.intercept(
 DeprecationInterceptor.java:41)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(
 ConversionErrorInterceptor.java:138)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(
 ParametersInterceptor.java:254)
  at
 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
 MethodFilterInterceptor.java:98)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(
 ParametersInterceptor.java:254)
  at
 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
 MethodFilterInterceptor.java:98)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 org.apache.struts2.interceptor.MultiselectInterceptor.intercept(
 MultiselectInterceptor.java:73)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 org.apache.struts2.interceptor.CheckboxInterceptor.intercept(
 CheckboxInterceptor.java:91)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(
 PrepareInterceptor.java:171)
  at
 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
 MethodFilterInterceptor.java:98)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(
 ServletConfigInterceptor.java:164)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(
 ExceptionMappingInterceptor.java:189)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 com.afs.web.interceptor.SessionInterceptor.intercept(
 SessionInterceptor.java:62)
  at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 DefaultActionInvocation.java:246)
  at
 org.apache.struts2.impl.StrutsActionProxy.execute(
 StrutsActionProxy.java:54)
  at
 org.apache.struts2.dispatcher.Dispatcher.serviceAction(
 Dispatcher.java:562)
  at
 org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(
 ExecuteOperations.java:77)
  at
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.
 doFilter(StrutsPrepareAndExecuteFilter.java:99

Any example integrate struts2 ( CRUD without Hibernate, nor EJB, nor Glassfish)

2014-10-20 Thread Chris
Hello,

I would like to integrate struts2 in an CRUD application , JDBC, Apache Tomcat, 
Netbeans ( or eclipse ) 

but without Hibernate , nor EJB, nor GlassFish.
Hibernate is more complex than the problem it tries to solveCould you have any 
integration example 
please ?

Thanks,

Regards,

Chris


Re: struts, freemarker and servlet 3.1

2014-10-03 Thread Chris
Hello Adam,


Can we be sure that jetty 9 (not Jetty 9.1) can work with Servlet 3.1?

Regards



Le Vendredi 3 octobre 2014 8h58, Lukasz Lenart lukaszlen...@apache.org a 
écrit :
 


2014-09-30 17:15 GMT+02:00 Adam Brin adam.b...@asu.edu:

 Quick question, is anyone running struts 2.3 with servlet 3.1 (Jetty 9)?  Our 
 freemarker rendered pages appear to be blank (i.e. no content returned), 
 though the rest of the app appears to function properly (stream results 
 return properly).  My first guess is that either the issue is in the Sitemesh 
 or Freemarker config, but I can't seem to quickly tell. Has anyone else had 
 any issues or needed to make any changes when upgrading?

Adam can you register this as an issue? We can focus on it when we
start working on version 2.5/3.0 - put as much information as possible
to reproduce your issue ie. web.xml (numbers are very important here),
struts.xml example, and so on. Thanks in advance!


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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

Struts2 Portlets

2014-07-31 Thread CRANFORD, CHRIS
I currently have a Struts2 application deployed on Tomcat7 and I am looking to 
add some dashboard portlet functionality.  I noticed that Struts2 has a porlet 
plugin but was curious whether it was possible to configure the WAR with an 
embedded portal container so that users continued to access my application 


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



Re: s:textfield jquery can not change placeholder

2014-07-25 Thread Chris Pratt
Make sure you set the id attribute on the s:textfield if you're going to
refer to it that way using jQuery.
  (*Chris*)


On Fri, Jul 25, 2014 at 12:30 PM, john lee sh_thorn_b...@yahoo.com.invalid
wrote:


 I can use jquery to change html input tag's placeholder for no problem,
 but no matter what method I use, impossible for me to change
   s:textfield's placeholder.
 I tried
 $('#partid').attr('placeholder','XXX');
 and
 $('#partid').val('XXX');
 and
  $('#partid').text('XXX');

 s:textfield's placeholder impossible for jquery to change, is struts2
 limition or bugs?

 thanks in advance

 john

 *

  %@ taglib prefix=s uri=/struts-tags %
 %@ taglib prefix=sj uri=/struts-jquery-tags%
 sj:head jqueryui=true/

 script language=javascript
   $(document).ready(function() {
 $('#searchchoice').change(function() {
  var ex = document.getElementById(searchchoice);
  var finalchoice = ex.options[ex.options.selectedIndex].text;
   if (finalchoice=='part#')
  $('#partid').attr('placeholder','input example: XXX');
  else if (finalchoice=='keyword')
   $('#partid').attr('placeholder','input example 2:
 XXX');
  else if (finalchoice=='model')
   $('#partid').attr('placeholder','input example 3:
 XXX');

   });
});
 /script

 s:form class=nav-search action=PartsearchbothAction method=post
 theme=simple 
  s:select label=Part#
 id=searchchoice
 name=searchchoice
 list=#{'part#':'part#', 'keyword':'keyword',
 'model#':'model'}
 value=part#
 theme=simple
 required=true
  /
   s:textfield name=partid label=partid placeholder='default
 search is by Part#' required=true theme=simple/

  s:submit value=go
 /s:form


Re: Hello World does not work.

2014-07-05 Thread Chris Pratt
Typically you would put the war file at /var/lib/tomcat6/webapps/
hello_world.war not /var/lib/tomcat6/webapps/hello_world/hello_world.war.
 Tomcat will unbundle the war file into /var/lib/tomcat6/webapps/hello
_world/ for you.  One other option would be to try pointing your browser at
http://localhost/hello_world/hello_world, since if Tomcat does unpack your
current war file, that's where it will be put.


On Sat, Jul 5, 2014 at 10:27 AM, Ken McWilliams ken.mcwilli...@gmail.com
wrote:

 What IDE are you using? Knowing the IDE someone might be willing to give
 click by click instructions.


 On Sat, Jul 5, 2014 at 7:23 AM, Jim Anderon jim_ander...@jjajava.com
 wrote:

 
  index.jsp is in my hello_world.war file and hello_world.war is at
  /var/lib/tomcat6/webapps/hello_world/hello_world.war.
 
  I have used the web.xml file, unchanged, from the tutorial area. Here is
  the content, where the line numbers are
  inserted by my editor and are not part of the file:
 
 
1 ?xml version=1.0 encoding=UTF-8?
2 web-app id=WebApp_ID 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
3 display-nameHello World Struts 2/display-name
4 welcome-file-list
5 welcome-fileindex.jsp/welcome-file
6 /welcome-file-list
7
8
9 filter
   10 filter-namestruts2/filter-name
   11 filter-classorg.apache.struts2.dispatcher.ng.filter.
  StrutsPrepareAndExecuteFilter/filter-class
   12 /filter
   13
   14 filter-mapping
   15 filter-namestruts2/filter-name
   16 url-pattern/*/url-pattern
   17 /filter-mapping
   18
   19 /web-app
 
  I can see there is some struts filtering, but at this point I do not know
  if something needs to be changed.
 
 
  Jim A.
 
 
 
 
  On 07/05/2014 10:08 AM, jayachandra B wrote:
 
  do you have index.jsp in your webContent folder and did you configure
  struts2 filter in web.xml?
 
 
  On Sat, Jul 5, 2014 at 5:33 PM, Jim Anderon jim_ander...@jjajava.com
  mailto:jim_ander...@jjajava.com wrote:
 
 
  Hello All,
 
  I am an experienced programmer, but inexperienced in web
  programming and a total newbie to struts.
  Struts looks like it will be very useful to my web programming so
  I have ventured into the tutorials to
  start learning how to use it. I ran the first tutorial
  'basic_struts' successfully. Next, I am trying to
  run the 'Hello World' tutorial, but it is failing. I could use
  some suggestions on what may be wrong and
  some suggestions on debug methodology when using struts. Or at
  least pointers on where to looking
  for debugging techniques.  I am trying to do some reading to teach
  myself, but I'm floundering at this
  point.
 
  I'm running crunchbang Linux, using firefox 30.0, which is close
  to the latest edition. By the way, I'm
  aware of the firefox 'web console' but a beginner with that tool
  so I have not taken advantage of it so far.
  I'm running the tomcat6 server on my localhost.
 
  I have read the tutorial for 'Hello World' from:
 
  *
  *file:///usr/share/struts/struts-2.3.16.3/docs/hello-
  world-using-struts-2.html
 
  I have read each step in that tutorial and verified that the
  source code explained in the tutorial
  is in my sand box. I ran 'mvn clean project' and got a successful
  build. Then then copied the
  hello_world.war file to:
 
  * * /var/lib/tomcat6/webapps/hello_world
  *
  *enter the URL:
 
  http://localhost:8080/hello_world/index.action
 
  in the address box on Firefox and got the following error from
 tomcat:
 
 
  Start Error
  Window--
  
  ---
 
  HTTP Status 404 - /hello_world/index.action
  
  
  *type* Status report
  *message* _/hello_world/index.action_
  *description* _The requested resource (/hello_world/index.action)
  is not available._
  
  
  Apache Tomcat/6.0.35
 
  ---End Error Window
  
  
  --
 
 
  My other webapps run ok out of /var/lib/tomcat6/webapps, so I at
  least know my environment is set up
  correctly, at least for the most part. When I check directory
  permissions from the /var/lib/tomcat6/webapps/hello_world
  directory, I get:
 
  % ls -ld . *
  drwxr-xr-x 2 jimA jimA4096 Jul  2 09:15 .
  -rw-r--r-- 1 jimA jimA 3991999 Jul  4 15:29 

Re: Do properties written in an external file need ApplicationAware ?

2014-06-04 Thread Chris

Hello Antonios,

Thanks.
I'll try it and see how I can manage it.

Chris



Le Mardi 3 juin 2014 13h35, Antonios Gkogkakis gkogk...@tcd.ie a écrit :
 


Hi Chris,

I'm not sure if struts has a feature that would read property files and put
them in the Application scope for you automatically.

You can have a look at
http://commons.apache.org/proper/commons-configuration/userguide/user_guide.html
which will allow you to read the properties file. Then you have several
options for exposing the properties to your Actions, one of them would be
to store an object in the Application map and have your actions implement
ApplicationAware.

Antonios






On 3 June 2014 12:10, Chris christal...@yahoo.fr wrote:

 Hello,I would like to use properties (*) written in an  external file, and
 read them only once.
 Do I have to use ApplicationAware, or something else.
 Whatever, could you give examples please ?

 (*) some properties like JDBC or LDAP connection's parameters.

 Thanks

 Chris

2.3.16.3 Color in error message ( Authenticate Login )

2014-06-04 Thread Chris
Hello, 


I don't find in the strutsexamples ( 6 form_validation, 7 
message_ressource...etc) where I could write red color when error message is 
displayed in loginForm.jsp


First the validator LoginAction-validation.xml works fine with required fields.


Then the authentication with LoginAction works or not. 


But I would like to write red error when the authentication fails.

...
    public void validate() {
    if (userName.length() != 0  password.length() != 0  
!(AuthenticateUser(userName, password))) {
    addFieldError(userName,  The Identification has failed); 
    }
    }

When the Authenticate fails, the message works with The Identification has 
failed , but the color is not red in the loginForm.jsp...


Regards

Chris


Re: 2.3.16.3 Color in error message ( Authenticate Login )

2014-06-04 Thread Chris

In the screen, with struts2examples/form_validation 

the dynamics tag are :
tr errorFor=register_personBean_firstName
td align=center valign=top colspan=2span class=errorMessageFirst 
name is required./span/td/trtr
td class=tdLabel
label for=register_personBean_firstName class=errorLabelFirst 
name:/label/tdtd



Le Mercredi 4 juin 2014 18h13, Chris christal...@yahoo.fr a écrit :
 


Hello, 


I don't find in the strutsexamples ( 6 form_validation, 7 
message_ressource...etc) where I could write red color when error message is 
displayed in loginForm.jsp


First the validator LoginAction-validation.xml works fine with required fields.


Then the authentication with LoginAction works or not. 


But I would like to write red error when the authentication fails.

...
    public void validate() {
    if (userName.length() != 0  password.length() != 0  
!(AuthenticateUser(userName, password))) {
    addFieldError(userName,  The Identification has failed); 
    }
    }

When the Authenticate fails, the message works with The Identification has 
failed , but the color is not red in the loginForm.jsp...


Regards

Chris

Re: 2.3.16.3 Color in error message ( Authenticate Login )

2014-06-04 Thread Chris

Request closed.

I found it in http://struts.apache.org/development/2.x/docs/form-validation.html
It's the s:head /
Regards,

Chris




Le Mercredi 4 juin 2014 18h27, Chris christal...@yahoo.fr a écrit :
 



In the screen, with struts2examples/form_validation 

the dynamics tag are :
tr errorFor=register_personBean_firstName
td align=center valign=top colspan=2span class=errorMessageFirst 
name is required./span/td/trtr
td class=tdLabel
label for=register_personBean_firstName class=errorLabelFirst 
name:/label/tdtd




Le Mercredi 4 juin 2014 18h13, Chris christal...@yahoo.fr a écrit :



Hello, 


I don't find in the strutsexamples ( 6 form_validation, 7 
message_ressource...etc) where I could write red color when error message is 
displayed in loginForm.jsp


First the validator LoginAction-validation.xml works fine with required fields.


Then the authentication with LoginAction works or not. 


But I would like to write red error when the authentication fails.

...
    public void validate() {
    if (userName.length() != 0  password.length() != 0  
!(AuthenticateUser(userName, password))) {
    addFieldError(userName,  The Identification has failed); 
    }
    }

When the Authenticate fails, the message works with The Identification has 
failed , but the color is not red in the loginForm.jsp...


Regards

Chris

Re: 2.3.16.3 Color in error message ( Authenticate Login )

2014-06-04 Thread Chris

Hello,
Thank You, 
I found also the s:head / tag in the  
http://struts.apache.org/development/2.x/docs/form-validation.html

Styling The Error Messages
The Struts 2 s:head tag can be used to provide CSS that includes a style 
for the error message. Add s:head / to register.jsp before the closing HTML 
/head tag. 

Regards,

Chris



Le Mercredi 4 juin 2014 20h37, Martin Gainty mgai...@hotmail.com a écrit :
 



stylesheet.css:

.errClass {
    font-family: Verdana, Helvetica, Garamond, sans-serif;
    /* font-size: 0.7em; */
    background-color: red;
    border: 1px solid #afafaf;
    position: absolute;
    z-index: 1000;
    overflow: auto;
    cursor: default;
}
public void validate() 
{
      if (userName.length() != 0  password.length() != 0  
!(AuthenticateUser(userName, password))) 
      {
       org.apache.struts2.views.jsp.ui.TextFieldTag tag = new 
org.apache.struts2.views.jsp.ui.TextFieldTag();
        tag.setPageContext(pageContext);
        tag.setId(myId);
        tag.setLabel(mylabel);
        tag.setName(foo);
        tag.setValue(bar);
        tag.setTitle(mytitle);
        tag.setCssErrorClass(errclass);

        testAction.addFieldError(foo, bar error message);
     }
} //end validate

Bon Chance,
Martin 
_


 Date: Wed, 4 Jun 2014 17:13:28 +0100
 From: christal...@yahoo.fr
 Subject: 2.3.16.3 Color in error message ( Authenticate Login ) 
 To: user@struts.apache.org
 
 Hello, 
 
 
 I don't find in the strutsexamples ( 6 form_validation, 7 
 message_ressource...etc) where I could write red color when error message is 
 displayed in loginForm.jsp
 
 
 First the validator LoginAction-validation.xml works fine with required 
 fields.
 
 
 Then the authentication with LoginAction works or not. 
 
 
 But I would like to write red error when the authentication fails.
 
 ...
     public void validate() {
         if (userName.length() != 0  password.length() != 0  
!(AuthenticateUser(userName, password))) {
             addFieldError(userName,  The Identification has failed); 
         }
     }
 
 When the Authenticate fails, the message works with The Identification has 
 failed , but the color is not red in the loginForm.jsp...
 
 
 Regards
 
 Chris

Do properties written in an external file need ApplicationAware ?

2014-06-03 Thread Chris
Hello,I would like to use properties (*) written in an  external file, and read 
them only once.
Do I have to use ApplicationAware, or something else.
Whatever, could you give examples please ?

(*) some properties like JDBC or LDAP connection's parameters.

Thanks

Chris

Re: Multiple parameter names

2014-05-30 Thread Chris Pratt
You could have your Action implement ParameterAware then handle the
parameter map yourself.
  (*Chris*)


On Fri, May 30, 2014 at 2:15 AM, Yaragalla Muralidhar 
yaragallamur...@gmail.com wrote:

 I think that is not possible.

 *Thanks and Regards,*
 Muralidhar Yaragalla.

 *http://yaragalla.blogspot.in/ http://yaragalla.blogspot.in/*


 On Fri, May 30, 2014 at 2:08 PM, Mael Le Guével mael.legue...@yahoo.fr
 wrote:

  Hi,
  Given the following action:
 
  public class MyAction extends ActionSupport {
  private String myParam;
 
  public String getMyParam() {
  return myParam;
  }
 
  public void setMyParam(String myParam) {
  this.myParam = myParam;
  }
  }
 
  I am able to pass a myParam parameter to this action.
  For instance:
  http://url-to-my-app/myAction.action?myParam=aValue
  (Yes I know, everyone knows that :))
 
  What I would like to do is having multiple parameter names that would
  map to myParam. For instance the following URL would also set the
  value of myParam to aValue:
  http://url-to-my-app/myAction.action?anotherName=aValue
 
  As it can be the source of multiple problems, I guess that struts does
  not allow to do this?
  So, what would be the best way to achieve it? Extending the parameters
  interceptor?
 
  Thanks.
 
  Mael.
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 



display dynamically in a JSP, the 2.3.16.2 version of struts2-core-2.3.16.2.jar

2014-04-29 Thread Chris
Hello,
Is there a simple way to display dynamically in a JSP,
the 2.3.16.2 version of struts2-core-2.3.16.2.jar ( from META_INF / MANIFEST.MF)
without knowing the name and the number of the jar file ?

Chris


Re: URL 'https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples' doesn't exist

2014-04-02 Thread Chris

Struts2 examples - Migration from svn to Git
https://svn.apache.org/repos/asf/struts/attic/struts2examples/


Hello,


I installed Git-1.9.0-preview20140217.exe  ( with both,  Git Bash  and   Git 
GUI ) on Windows 7
But I don't know Git, nor the right Struts2-examples's URL and Git's Command

Could you please confirm or infirm the command ? 
$ git clone https://git-wip-us.apache.org/repos/asf/struts-examples.git  ( but 
unable to access...)
or
$ git clone http://git-wip-us.apache.org/repos/asf/reponame.git
or 
$ git clone https://git-wip-us.apache.org/repos/asf/reponame.git

http://struts.1045723.n5.nabble.com/Migrated-Struts2-examples-to-Git-td5715078.html#a5715467

Thanks, 

Chris
Le Mardi 1 avril 2014 18h46, Chris christal...@yahoo.fr a écrit :
 
Thanks

Regards,

Chris



Le Mardi 11 mars 2014 11h48, Lukasz Lenart lukaszlen...@apache.org a écrit :

2014-03-11 11:30 GMT+01:00 Chris christal...@yahoo.fr:
 We're migrating them to git :-)

 OK THanks.
 And may i ask what tools do you recommend ?
 I used to Sliksvn with WIndows XP ( no Netbeans plugin ,  nor Eclipse plugin )

git command line client :-)

or sometime http://sourcetreeapp.com/


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/


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

Re: URL 'https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples' doesn't exist

2014-04-01 Thread Chris
Thanks

Regards,

Chris


Le Mardi 11 mars 2014 11h48, Lukasz Lenart lukaszlen...@apache.org a écrit :
 
2014-03-11 11:30 GMT+01:00 Chris christal...@yahoo.fr:
 We're migrating them to git :-)

 OK THanks.
 And may i ask what tools do you recommend ?
 I used to Sliksvn with WIndows XP ( no Netbeans plugin ,  nor Eclipse plugin )

git command line client :-)

or sometime http://sourcetreeapp.com/


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/


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

Re: URL 'https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples' doesn't exist

2014-03-11 Thread Chris
We're migrating them to git :-)

OK THanks.
And may i ask what tools do you recommend ?
I used to Sliksvn with WIndows XP ( no Netbeans plugin ,  nor Eclipse plugin )  





Le Lundi 10 mars 2014 21h45, Lukasz Lenart lukaszlen...@apache.org a écrit :
 
https://git-wip-us.apache.org/repos/asf?p=struts-examples.git


2014-03-10 21:34 GMT+01:00 Lukasz Lenart lukaszlen...@apache.org:
 We're migrating them to git :-)

 https://issues.apache.org/jira/browse/INFRA-7401

 2014-03-10 20:07 GMT+01:00 Chris christal...@yahoo.fr:
 Hello,

 I just wanted to signal the error tonight with svn URL

 svn: E17:
 ERROR the URL 
'https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples' doesn't 
exist

 Regards

 Chris

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

URL 'https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples' doesn't exist

2014-03-10 Thread Chris
Hello,

I just wanted to signal the error tonight with svn URL

svn: E17: ERROR the URL 
'https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples' doesn't 
exist

Regards

Chris


Re: Why do I get this XHTML validation errors? (second attempt)

2014-03-06 Thread Chris Pratt
Did you try moving the s:hidden elements to the top of the form, or
removing the wrap=hard from your s:textarea?
  (*Chris*)


On Thu, Mar 6, 2014 at 5:13 AM, Fredrik Andersson fredan...@hotmail.comwrote:

 Hello guys!

 I trying to produce a app that renders in XHTML.
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;

 How ever I got a form looking like this:

 s:form action=productcommentssave
 s:textfield name=productComment.emailAddress label=Email address
 labelposition=top maxlength=128 size=40 /
 s:textfield name=productComment.subject label=Subject
 labelposition=top maxlength=128 size=40 /
 s:textarea name=productComment.text label=Message (max 1024 chars)
 cols=52 rows=5 labelposition=top wrap=hard/
 s:submit /
 s:hidden name=PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME
 value=%{formToken} /
 s:hidden name=productid value=%{product.id} /
 /s:form

 This gets rendered like:
 25 form id=productcommentssave name=productcommentssave
 action=/productcommentssave.action method=post
 26 table class=wwFormTable
 27 tr
 28 td align=left valign=top colspan=2label
 for=productcommentssave_productComment_emailAddress class=labelEmail
 address:/label/td
 29 /tr
 30 tr
 31 td
 32input type=text name=productComment.emailAddress size=40
 maxlength=128 value=
 id=productcommentssave_productComment_emailAddress//td
 33 /tr
 34
 35
 36 tr
 37 td align=left valign=top colspan=2label
 for=productcommentssave_productComment_subject
 class=labelSubject:/label/td
 38 /tr
 39 tr
 40 td
 41input type=text name=productComment.subject size=40
 maxlength=128 value=
 id=productcommentssave_productComment_subject//td
 42 /tr
 43
 44
 45 tr
 46 td align=left valign=top colspan=2label
 for=productcommentssave_productComment_text class=labelMessage (max
 1024 chars):/label/td
 47 /tr
 48 tr
 49 td
 50textarea name=productComment.text cols=52 rows=5 wrap=hard
 id=productcommentssave_productComment_text/textarea/td
 51 /tr
 52
 53
 54 tr
 55 td colspan=2div align=rightinput type=submit
 id=productcommentssave_0 value=Submit/
 56 /div/td
 57/tr
 58
 59
 60 input type=hidden name=PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME
 value=1394108222515
 id=productcommentssave_PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME/
 61 input type=hidden name=productid value=3
 id=productcommentssave_productid/
 62 /table/form

 From http://validator.w3.org/#validate_by_input+with_options I validate
 it and get these 3 anoying errors:

 Error Line 50, Column 63: there is no attribute wrap
 ...Comment.text cols=52 rows=5 wrap=hard
 id=productcommentssave_productCo...
 You have used the attribute named above in your document, but the document
 type you are using does not support that attribute for this element. This
 error is often caused by incorrect use of the Strict document type with a
 document that uses frames (e.g. you must use the Transitional document
 type to get the target attribute), or by using vendor proprietary
 extensions such as marginheight (this is usually fixed by using CSS to
 achieve the desired effect instead).
 This error may also result if the element itself is not supported in the
 document type you are using, as an undefined element will have no supported
 attributes; in this case, see the element-undefined error message for
 further information.
 How to fix: check the spelling and case of the element and attribute,
 (Remember XHTML is all lower-case) and/or check that they are both allowed
 in the chosen document type, and/or use CSS instead of this attribute. If
 you received this error when using the embed element to incorporate flash
 media in a Web page, see the FAQ item on valid flash.

 Error Line 60, Column 161: document type does not allow element input
 here
 ...1394108222515
 id=productcommentssave_PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME/
 The element named above was found in a context where it is not allowed.
 This could mean that you have incorrectly nested elements -- such as a
 style element in the body section instead of inside head -- or two
 elements that overlap (which is not allowed).
 One common cause for this error is the use of XHTML syntax in HTML
 documents. Due to HTML's rules of implicitly closed elements, this error
 can create cascading effects. For instance, using XHTML's self-closing
 tags for meta and link in the head section of a HTML document may
 cause the parser to infer the end of the head section and the beginning
 of the body section (where link and meta are not allowed; hence the
 reported error).

 Error Line 61, Column 93: document type does not allow element input here
 ...t type=hidden name=productid value=3
 id=productcommentssave_productid/
 (same as at line 60)

 Do you guys see anything that I could do to correct this? I would love to
 have a app with correct xhtml.

 Best regards
 Fredrik


Re: Re: Why do I get this XHTML validation errors? (second attempt)

2014-03-06 Thread Chris Pratt
To elaborate on Dave's point, try:

tr style=display:none;
  td
// both hidden fields
  /td
/tr

  (*Chris*)


On Thu, Mar 6, 2014 at 12:26 PM, Dave Newton davelnew...@gmail.com wrote:

 On Thu, Mar 6, 2014 at 3:01 PM, Fredrik Andersson fredan...@hotmail.com
 wrote:

  I have tride to put the hidden attributet att:
  1 first code line after the form-start-tag
  2 before the submit-tag
  3 after the submit-tag, before form-end-tag.
  None of the attempt validates.
  So If you guys got any idea how to solve this mystery plast let me know.
 

 You could try what I suggested until the hidden tags have xhtml templates
 that emit correct HTML.

 Dave



Re: Struts CRUD demo OK but only Struts-2.0.6 version

2014-01-27 Thread Chris
Hello,
Do you know, where we can read a 2.3.16 version of 
http://struts.apache.org/release/1.2.x/faqs/database.html ?





Le Vendredi 24 janvier 2014 11h18, Lukasz Lenart lukaszlen...@apache.org a 
écrit :
 
Pull Request are always welcome :-)

You can post your requirements as a comment to the ticket.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2014/1/24 Chris christal...@yahoo.fr:
 Hello,
 I mean with more screens, more actions, and interdependence, or chained

 For example :
 - a first screen (login.jsp : controling user authorized or not )
 - a second one (search.jsp : which name do you want to retrieve ? )
 - the screen with the found names...etc

 Regards,

 Chris





 Le Jeudi 23 janvier 2014 7h47, Lukasz Lenart lukaszlen...@apache.org a 
 écrit :

 2014/1/22 Chris christal...@yahoo.fr:
 Hello,

 Il would be interesting to begin the CRUD example with both a login.jsp and 
 a search.jsp

 Not sure what you mean by that :\



 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

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


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

Re: Struts CRUD demo OK but only Struts-2.0.6 version

2014-01-27 Thread Chris
Thanks, But I 'm not sure to understand .
Do I have to stop to use Struts2 ?
I don't want to use java persistence framework
I just try to find a CRUD example without Java persistence framework.
Regards



Le Lundi 27 janvier 2014 17h37, Lukasz Lenart lukaszlen...@apache.org a écrit 
:
 
2014-01-27 Chris christal...@yahoo.fr:
 Hello,
 Do you know, where we can read a 2.3.16 version of
 http://struts.apache.org/release/1.2.x/faqs/database.html ?

It isn't supported in 2.x at all - it was a bad idea from very
beginning, instead you can use Spring, myBatis or JPA directly.



Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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

Re: Struts CRUD demo OK but only Struts-2.0.6 version

2014-01-24 Thread Chris
Hello,
I mean with more screens, more actions, and interdependence, or chained 

For example : 
- a first screen (login.jsp : controling user authorized or not ) 
- a second one (search.jsp : which name do you want to retrieve ? ) 
- the screen with the found names...etc 

Regards,

Chris





Le Jeudi 23 janvier 2014 7h47, Lukasz Lenart lukaszlen...@apache.org a écrit :
 
2014/1/22 Chris christal...@yahoo.fr:
 Hello,

 Il would be interesting to begin the CRUD example with both a login.jsp and a 
 search.jsp

Not sure what you mean by that :\



Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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

Re: Struts CRUD demo OK but only Struts-2.0.6 version

2014-01-22 Thread Chris
Hello,

Il would be interesting to begin the CRUD example with both a login.jsp and a 
search.jsp

Regards





Le Lundi 13 janvier 2014 11h50, Lukasz Lenart lukaszlen...@apache.org a écrit 
:
 
And the CRUD example has been rewritten to use the latest S2 version

https://issues.apache.org/jira/browse/WW-3993


2014/1/13 Lukasz Lenart lukaszlen...@apache.org:
 2014/1/11 Chris christal...@yahoo.fr:
 java.lang.reflect.InvocationTargetException - Class: 
 com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
 File: ContainerImpl.java
 Method: inject
 Line: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1
     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
     at 
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)

 First the FilterDispatcher is deprecated, use on of the new filters.

 Caused by: java.lang.IllegalArgumentException: Javassist library is missing 
 in classpath! Please add missed dependency!
     at ognl.OgnlRuntime.clinit(OgnlRuntime.java:168)
     ... 63 more
 Caused by: java.lang.ClassNotFoundException: javassist.ClassPool
     at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
     at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:169)
     at ognl.OgnlRuntime.clinit(OgnlRuntime.java:165)
     ... 63 more

 Have you added Javassist library?

 11 janv. 2014 10:54:14 org.apache.catalina.core.StandardContext filterStart
 GRAVE: Exception au démarrage du filtre struts2
 java.lang.reflect.InvocationTargetException - Class: 
 com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
 File: ContainerImpl.java
 Method: inject
 Line: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1
     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
     at 
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
     at 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)

 Do you use two different filters to init the framework?

 And it's 10 times better to use some tool to manage dependencies
 (Maven) instead solving that manually.


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

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

Re: Best book reference for struts 2

2014-01-16 Thread Chris
Hello,
If you think than the last versions are best ( some caractéristics could 
change) so have a look at both the publication's date, and the version's number
Black book 2ed was published in  2008, about struts-core-2.0.6.jar ...






Le Jeudi 16 janvier 2014 10h05, Gokul Raj vgokul...@gmail.com a écrit :
 
Hi,

Currently, I am reading Struts 2 in Action. So far, so good.

Regards
Gokul



On 16 January 2014 13:04, Saju Thankathurai sathikeshj...@gmail.com wrote:

 Hi,

 I am new to this forum. Just wanted to ask which book is best to follow
 Struts 2.

 I am planning to purchase Struts 2 black book. Please advice if any other
 book will be nice to get in touch with Struts 2.

 Regards,
 Saju





-- 

Regards
Gokul

Struts CRUD demo OK but only Struts-2.0.6 version

2014-01-11 Thread Chris
Hello,
Are dependencies missing ?

Struts 2 CRUD Example works fine but only in Struts-2.0.6 not in Struts-2.3.16
 
http://struts.apache.org/development/2.x/docs/tutorials.html
Tutorials / Speciality / CRUD Made Easy / CRUD Demo I / Struts 2 CRUD Example
Old jar files :
 commons-beanutils-1.7.0.jar
 commons-logging-1.0.4.jar
 freemarker-2.3.8.jar
 ognl-2.6.11.jar
 struts2-core-2.0.6.jar
 struts2-sitemesh-plugin-2.0.6.jar
 xwork-2.0.1.jar

And old filter
 filter-namestruts/filter-name
    
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
   /filter
=

But if you try with new version...It doesn't work

Struts-2.3.16 and CRUD Demo I
With new jar files and new filter, it doesn't work. Do you know why ?
New jar files
 commons-beanutils-1.8.0.jar
 commons-logging-api-1.1.jar
 freemarker-2.3.19.jar
 ognl-3.0.6.jar
 struts2-core-2.3.16.jar
 struts2-sitemesh-plugin-2.3.16.jar
 xwork-core-2.3.16.jar

New filter
    
filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter/filter-class


java.lang.reflect.InvocationTargetException - Class: 
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
File: ContainerImpl.java
Method: inject
Line: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
    at 
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
    at 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
    at 
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:107)
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4656)
    at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5312)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)
    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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at 
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)
    at 
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:860)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:357)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at 
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at 

Re: Struts CRUD demo OK but only Struts-2.0.6 version

2014-01-11 Thread Chris
)
    at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: 
java.lang.reflect.InvocationTargetException
    at 
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
    at 
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
    at 
com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)
    at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
    at 
com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
    at 
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
    at 
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)
    at 
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)
    at 
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
    at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:340)
    at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:229)
    at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
    ... 31 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)




Le Samedi 11 janvier 2014 15h10, Johannes Geppert jo...@apache.org a écrit :
 
Take a look at the Stacktrace. :-)

Caused by: java.lang.IllegalArgumentException: Javassist library is missing
in classpath! Please add missed dependency!

Best Regards

Johannes

#
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep




2014/1/11 Chris christal...@yahoo.fr

 Hello,
 Are dependencies missing ?

 Struts 2 CRUD Example works fine but only in Struts-2.0.6 not in
 Struts-2.3.16

 http://struts.apache.org/development/2.x/docs/tutorials.html
 Tutorials / Speciality / CRUD Made Easy / CRUD Demo I / Struts 2 CRUD
 Example
 Old jar files :
  commons-beanutils-1.7.0.jar
  commons-logging-1.0.4.jar
  freemarker-2.3.8.jar
  ognl-2.6.11.jar
  struts2-core-2.0.6.jar
  struts2-sitemesh-plugin-2.0.6.jar
  xwork-2.0.1.jar

 And old filter
      filter-namestruts/filter-name

 filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
        /filter
 =
 
 But if you try with new version...It doesn't work

 Struts-2.3.16 and CRUD Demo I
 With new jar files and new filter, it doesn't work. Do you know why ?
 New jar files
  commons-beanutils-1.8.0.jar
  commons-logging-api-1.1.jar
  freemarker-2.3.19.jar
  ognl-3.0.6.jar
  struts2-core-2.3.16.jar
  struts2-sitemesh-plugin-2.3.16.jar
  xwork-core-2.3.16.jar

 New filter

 filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter/filter-class


 java.lang.reflect.InvocationTargetException - Class:
 com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
 File: ContainerImpl.java
 Method: inject
 Line: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1
     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
     at
 org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
     at
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
     at
 org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
     at
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
     at
 org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:107)
     at
 org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4656)
     at
 org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5312)
     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
     at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
     at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
     at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
     at
 org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
     at
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
     at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462

Re: Struts CRUD demo OK but only Struts-2.0.6 version

2014-01-11 Thread Chris
 
class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - 
jar:file:/D:/NetBeansProjects/struts-2.3.16/struts2examples.16/struts2_crud_LA/build/web/WEB-INF/lib/struts2-gxp-plugin-2.3.16.jar!/struts-plugin.xml:8:162
    at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
    at 
org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)
    at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    ... 47 more
Caused by: java.lang.ClassNotFoundException: 
org.apache.struts2.views.gxp.inject.InjectedObjectContainer
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    at 
com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
    at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
    ... 50 more
11 janv. 2014 16:41:54 org.apache.catalina.core.StandardContext startInternal
GRAVE: Error filterStart
11 janv. 2014 16:41:54 org.apache.catalina.core.StandardContext startInternal





Le Samedi 11 janvier 2014 16h33, Chris christal...@yahoo.fr a écrit :
 
Well, I  already added all the struts-2.3.16 jar files to see what will happen.
Without success.
It's a bad solution and the error message is the same.
Maybe the question is not about dependencies.
It would  be better to know why it can't work.


java.lang.reflect.InvocationTargetException - Class: 
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
File: ContainerImpl.java
Method: inject
Line: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
    at 
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
    at 
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:107)
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4656)
    at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5312)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)
    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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at 
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)
    at 
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:860)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:357)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at 
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171

Re: Application configuration file

2014-01-07 Thread Chris
Hello ,
I have the same request.
Perhaps the response can help you
You can use Interceptor#init()

http://struts.1045723.n5.nabble.com/Struts2-and-JDBC-How-to-read-jdbc-properties-only-once-for-100-or-1000-users-td5714995.html






Le Mardi 7 janvier 2014 10h17, Giuliano Catrambone giulia...@catrasoftware.it 
a écrit :
 
Hi all,
     can someone suggest me how to manage an application configuration file
     in a struts application?

     I'm thinking a configuration file like
         myapp.properties

     Is there a place in a struts app where I can read the properties 
cfg file just once
     and share it in every java file (actions, )?

     Thanks
         giu


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

How to run RegisterTest.java

2014-01-06 Thread Chris
The sample unit-testing works with Struts2.3.16 
http://struts.apache.org/development/2.x/docs/unit-testing.html
and
https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/unit_testing/

But without running RegisterTest.java
I don't how I can run this RegisterTest extends StrutsTestCase
I added junit-plugin, spring jar and JUnit lib
All is ok in Netbeans 7.3, Tomcat 6


Howw to test RegisterTest in unit_testing ?

2014-01-06 Thread Chris
The sample unit-testing works with Struts2.3.16 
http://struts.apache.org/development/2.x/docs/unit-testing.html
and
https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/unit_testing/

But without running RegisterTest.java
I don't how I can run this RegisterTest extends StrutsTestCase

I added junit-plugin, spring jar and JUnit lib
All is ok in Netbenas 7.3 and Tomcat 6

Re: Howw to test RegisterTest in unit_testing ?

2014-01-06 Thread Chris
It's OK now.
I added in ProjectProperties / Test Package Folder / test.java
All 3 tests passed




Le Lundi 6 janvier 2014 22h39, Chris christal...@yahoo.fr a écrit :
 
The sample unit-testing works with Struts2.3.16 
http://struts.apache.org/development/2.x/docs/unit-testing.html
and
https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/unit_testing/

But without running RegisterTest.java
I don't how I can run this RegisterTest extends StrutsTestCase

I added junit-plugin, spring jar and JUnit lib
All is ok in Netbenas 7.3 and Tomcat 6

Re: Struts2 and JDBC : How to read jdbc.properties only once , for 100 or 1000 users

2014-01-05 Thread Chris
Hello,
Introducing Interceptors works on Struts2.3.16
http://struts.apache.org/development/2.x/docs/introducing-interceptors.html

But I would like to create my own Interceptor
http://struts.apache.org/development/2.x/docs/writing-interceptors.html

The example with SimpleInterceptor is not full
http://struts.apache.org/development/2.x/docs/interceptors.html

Have you any sample with all sources to read external files jdbc.properties ?




Le Jeudi 2 janvier 2014 16h28, Chris christal...@yahoo.fr a écrit :
 
Thanks.
I'll test this new example. I proceed in order of Web Page Getting Started, 
and haven't tested this one yet. (...Struts 2 Form Tags , Form Validation Using 
XML , Control Tags , Wildcard Method Selection ,  Struts 2 Themes , Spring and 
Struts 2 (with supplement jar files ) , Struts 2 Annotations
next - Introducing Interceptors...etc )





Le Jeudi 2 janvier 2014 15h49, Lukasz Lenart lukaszlen...@apache.org a écrit :

You can use Interceptor#init()


2014/1/2 Chris christal...@yahoo.fr:
 Hello,
 How to read  the file jdbc.properties only once,

 when the web application is for 100 or 1000 users ?
 ( in which Action/method ? )

 Thanks

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

Struts2 and JDBC : How to read jdbc.properties only once , for 100 or 1000 users

2014-01-02 Thread Chris
Hello,
How to read  the file jdbc.properties only once, 

when the web application is for 100 or 1000 users ?
( in which Action/method ? ) 

Thanks

Re: Struts2 and JDBC : How to read jdbc.properties only once , for 100 or 1000 users

2014-01-02 Thread Chris
Thanks.
I'll test this new example. I proceed in order of Web Page Getting Started, 
and haven't tested this one yet. (...Struts 2 Form Tags , Form Validation Using 
XML , Control Tags , Wildcard Method Selection ,  Struts 2 Themes , Spring and 
Struts 2 (with supplement jar files ) , Struts 2 Annotations
next - Introducing Interceptors...etc )




Le Jeudi 2 janvier 2014 15h49, Lukasz Lenart lukaszlen...@apache.org a écrit :
 
You can use Interceptor#init()


2014/1/2 Chris christal...@yahoo.fr:
 Hello,
 How to read  the file jdbc.properties only once,

 when the web application is for 100 or 1000 users ?
 ( in which Action/method ? )

 Thanks

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

Where does the message ( age ) come from in trunk/struts2examples/annotations/

2013-12-27 Thread Chris
Hello, 
 
Testing the  Age (int age ) value with space or some letters, with  
https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/annotations/
I don't understand where the message  Invalid field value 
for field 'personBean.age'. come from ( and the red color too) 
 
From convention.plugin or anything else  ?
 
Chris

Re: /struts2examples/themes and Struts2-3-16

2013-12-19 Thread Chris
Hello, 
The/struts2examples/themes is ok now, since a new updated at 2013-12-13.
Regards,
Chris


Re: Debug level for com.opensymphony is too talkative, when using Netbeans 7.3

2013-12-18 Thread Chris
Hello, 

I tested both yesterday. 

You are right , WARN level works too. 
But INFO level is immediately near DEBUG.
DEBUG  INFO  WARN  ERROR  FATAL

I'll register an issue for that.

PS: it's when the link Edit your information is clicked.
Some few other examples are concerned. I just want to check which ones. And 
test again but too with Struts 2.3.15x 


Regards,

Chris




Le Mercredi 18 décembre 2013 7h46, Lukasz Lenart lukaszlen...@apache.org a 
écrit :
 
I think even WARN should be sufficient, can you register an issue for that?


Thanks in advance
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/


2013/12/17 Chris christal...@yahoo.fr:
 Please Use INFO level


 Hello,
 I don't know why, but for some asf trunk examples, using this configuration 
 could product some trouble in view server output. No less than 340 000 lines :


 Netbeans 7.3   -  Tomcat 7x  -  Struts 2.3.16  - DEBUG level in log4j.xml 
 for com.opensymphony 


 The Themes example is not the only one , with which I found thousand of lines 
 in view server output.

 The problem does not happen If I change only one thing in the 4's team. ( 
 Netbeans 6.5 , or GlassFish 3.1.2 , or INFO level )

 I prefer INFO level. ;-)

 Regards

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

Re: Debug level for com.opensymphony is too talkative, when using Netbeans 7.3

2013-12-18 Thread Chris
Sorry,  It's beter with  sign
DEBUG  INFO  WARN  ERROR  FATAL
My apologies, you meant probably say :
even WARN should be sufficient 
( Meaning even the INFO level is not necessary )




Le Mercredi 18 décembre 2013 11h01, Chris christal...@yahoo.fr a écrit :
 
Hello, 

I tested both yesterday. 

You are right , WARN level works too. 
But INFO level is immediately near DEBUG.
DEBUG  INFO  WARN  ERROR  FATAL

I'll register an issue for that.

PS: it's when the link Edit your information is clicked.
Some few other examples are concerned. I just want to check which ones. And 
test again but too with Struts 2.3.15x 


Regards,

Chris





Le Mercredi 18 décembre 2013 7h46, Lukasz Lenart lukaszlen...@apache.org a 
écrit :

I think even WARN should be sufficient, can you register an issue for that?


Thanks in advance
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/


2013/12/17 Chris christal...@yahoo.fr:
 Please Use INFO level


 Hello,
 I don't know why, but for some asf trunk examples, using this configuration 
 could product some trouble in view server output. No less than 340 000 lines :


 Netbeans 7.3   -  Tomcat 7x  -  Struts 2.3.16  - DEBUG level in log4j.xml 
 for com.opensymphony 


 The Themes example is not the only one , with which I found thousand of lines 
 in view server output.

 The problem does not happen If I change only one thing in the 4's team. ( 
 Netbeans 6.5 , or GlassFish 3.1.2 , or INFO level )

 I prefer INFO level. ;-)

 Regards

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

Re: /struts2examples/themes and Struts2-3-16

2013-12-17 Thread Chris
I guess I know, now. 


It's the 4's team :
Netbeans 7 - Tomcat 7 - Struts2.3.16 - DEBUG level in log4j.xml for 
com.opensymphony 


The Themes example is not the only one , with which I found thousand of lines 
in view server output. On my own old PC , more than 10 mn for 340 000 lines 

  
The problem does not happen If I change only one thing in the 4's team. ( 
Netbeans 6.5 , or GlassFish 3.1.2 , or INFO level ) 

I prefer INFO level. ;-)

Regards



Le Lundi 16 décembre 2013 10h15, Lukasz Lenart lukaszlen...@apache.org a 
écrit :
 
Hm... I'm using Maven to handle all the dependencies so I don't know
what can be wrong on your side.

Right now the template folder must be placed under classpath to work
(or it can be placed under webapp if you copied the whole parent
template) - but I have solution how to solve that problem as well.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/12/16 Chris christal...@yahoo.fr:
 Hello Łukasz,
 I tried this morning on a faster PC, and it works 
 But there is a long long long output with Apache Tomcat ( View Serveur Output 
 ) and I obtain no less than 333 400 lines in 2 mn.
 With my own PC (old)XP it was much more long and I had to stop this output

 I don't know why I have those 333 400 lines, with some another examples too.
 May be something is wrong with my 13 jar files ?
 I 'll try another download

 23/11/2013  17:55     asm-3.3.jar
 23/11/2013  17:55     asm-commons-3.3.jar
 23/11/2013  17:55     asm-tree-3.3.jar
 23/11/2013  17:57     commons-fileupload-1.3.jar
 23/11/2013  17:55     commons-io-2.2.jar
 23/11/2013  17:55     commons-lang3-3.1.jar
 23/11/2013  17:55     commons-logging-1.1.3.jar
 23/11/2013  17:57     freemarker-2.3.19.jar
 23/11/2013  17:55     javassist-3.11.0.GA.jar
 23/11/2013  17:57     log4j-1.2.17.jar
 23/11/2013  17:55     ognl-3.0.6.jar
 30/11/2013  11:42     struts2-core-2.3.16.jar
 30/11/2013  11:39     xwork-core-2.3.16.jar
 And for debugging_struts sample
 30/11/2013  12:00     struts2-config-browser-plugin-2.3.16.jar



 I saw also the whole template folder was moved. ( not the same as the old 
 sample )

 Regards,
 Chris





 Le Lundi 16 décembre 2013 7h42, Lukasz Lenart lukaszlen...@apache.org a 
 écrit :

 Ok, so you see changes in checkboxlist.ftl - I also moved the whole
 template folder from webapp directory to resources, you must see the
 change. Also use clean  redeploy in NetBeans - I'm using command line
 to build and deploy the new war.


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/12/15 Chris christal...@yahoo.fr:
 Hello,

 Sorry, I didn't find any solution.
 Struts 2 Themes and Struts 2.3.16 are not working ( Netbeans 7 and Tomcat 7
 )
 I believe I have to stop my tests.

 But old version ( Struts2 Themes before 2013-12-13 ) and Struts 2.3.15.3
 only are working.


 The new files checkboxlist.ftl and theme.properties are differents since
 2013-12-13
 and are not working with Struts2
 ==
 checkboxlist.ftl before 2013-12-13
 #include /${parameters.templateDir}/xhtml/controlheader.ftl /
 #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl /
 #include /${parameters.templateDir}/xhtml/controlfooter.ftl /#nt/

 theme.properties  before 2013-12-13
 parent = xhtml
 ==
 checkboxlist.ftl   after 2013-12-13
 #include
 /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl /
 #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl /
 #include
 /${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl
 /#nt/

 theme.properties  after 2013-12-13
 parent = KUTheme_simple
 ==


 Sometimes, with Strut2.3.16, Apache log gives a loop like this one
 2013-12-15 19:49:42,984 DEBUG
 com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:72 -
 Entering nullPropertyValue
 [target=[org.apache.struts.edit.action.EditAction@10a6001,
 com.opensymphony.xwork2.DefaultTextProvider@1c68b6f], property=org]
 2013-12-15 19:49:43,328 DEBUG
 com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.debug:72 -
 Entering getProperty (ognl.OgnlContext@44569547,AttributeMap
 {request={struts.request_uri=/st2_ex_14_themes/edit.action,
 __cleanup_recursion_counter=1,
 javax.servlet.forward.request_uri=/st2_ex_14_themes/edit.action,
 struts.valueStack=com.opensymphony.xwork2.ognl.OgnlValueStack@e00321,
 struts.actionMapping=ActionMapping{name='edit', namespace='/',
 method='null', extension='action', params=null, result=null},
 struts.view_uri=/edit.jsp, javax.servlet.forward.servlet_path=/edit.action,
 javax.servlet.forward.context_path=/st2_ex_14_themes}, session={},
 application={org.apache.jasper.compiler.ELInterpreter=org.apache.jasper.compiler.ELInterpreterFactory$DefaultELInterpreter@10ce397

Debug level for com.opensymphony is too talkative, when using Netbeans 7.3

2013-12-17 Thread Chris
Please Use INFO level 


Hello,
I don't know why, but for some asf trunk examples, using this configuration 
could product some trouble in view server output. No less than 340 000 lines :


Netbeans 7.3   -  Tomcat 7x  -  Struts 2.3.16  - DEBUG level in log4j.xml for 
com.opensymphony  


The Themes example is not the only one , with which I found thousand of lines 
in view server output.

The problem does not happen If I change only one thing in the 4's team. ( 
Netbeans 6.5 , or GlassFish 3.1.2 , or INFO level ) 

I prefer INFO level. ;-)

Regards

Re: /struts2examples/themes and Struts2-3-16

2013-12-16 Thread Chris
Hello Łukasz, 
I tried this morning on a faster PC, and it works 
But there is a long long long output with Apache Tomcat ( View Serveur Output ) 
and I obtain no less than 333 400 lines in 2 mn.
With my own PC (old)XP it was much more long and I had to stop this output

I don't know why I have those 333 400 lines, with some another examples too. 
May be something is wrong with my 13 jar files ?
I 'll try another download

23/11/2013  17:55 asm-3.3.jar
23/11/2013  17:55 asm-commons-3.3.jar
23/11/2013  17:55 asm-tree-3.3.jar
23/11/2013  17:57 commons-fileupload-1.3.jar
23/11/2013  17:55 commons-io-2.2.jar
23/11/2013  17:55 commons-lang3-3.1.jar
23/11/2013  17:55 commons-logging-1.1.3.jar
23/11/2013  17:57 freemarker-2.3.19.jar
23/11/2013  17:55 javassist-3.11.0.GA.jar
23/11/2013  17:57 log4j-1.2.17.jar
23/11/2013  17:55 ognl-3.0.6.jar
30/11/2013  11:42 struts2-core-2.3.16.jar
30/11/2013  11:39 xwork-core-2.3.16.jar
And for debugging_struts sample
30/11/2013  12:00 struts2-config-browser-plugin-2.3.16.jar



I saw also the whole template folder was moved. ( not the same as the old 
sample ) 

Regards,  
Chris





Le Lundi 16 décembre 2013 7h42, Lukasz Lenart lukaszlen...@apache.org a écrit 
:
 
Ok, so you see changes in checkboxlist.ftl - I also moved the whole
template folder from webapp directory to resources, you must see the
change. Also use clean  redeploy in NetBeans - I'm using command line
to build and deploy the new war.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/12/15 Chris christal...@yahoo.fr:
 Hello,

 Sorry, I didn't find any solution.
 Struts 2 Themes and Struts 2.3.16 are not working ( Netbeans 7 and Tomcat 7
 )
 I believe I have to stop my tests.

 But old version ( Struts2 Themes before 2013-12-13 ) and Struts 2.3.15.3
 only are working.


 The new files checkboxlist.ftl and theme.properties are differents since
 2013-12-13
 and are not working with Struts2
 ==
 checkboxlist.ftl before 2013-12-13
 #include /${parameters.templateDir}/xhtml/controlheader.ftl /
 #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl /
 #include /${parameters.templateDir}/xhtml/controlfooter.ftl /#nt/

 theme.properties  before 2013-12-13
 parent = xhtml
 ==
 checkboxlist.ftl   after 2013-12-13
 #include
 /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl /
 #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl /
 #include
 /${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl
 /#nt/

 theme.properties  after 2013-12-13
 parent = KUTheme_simple
 ==


 Sometimes, with Strut2.3.16, Apache log gives a loop like this one
 2013-12-15 19:49:42,984 DEBUG
 com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:72 -
 Entering nullPropertyValue
 [target=[org.apache.struts.edit.action.EditAction@10a6001,
 com.opensymphony.xwork2.DefaultTextProvider@1c68b6f], property=org]
 2013-12-15 19:49:43,328 DEBUG
 com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.debug:72 -
 Entering getProperty (ognl.OgnlContext@44569547,AttributeMap
 {request={struts.request_uri=/st2_ex_14_themes/edit.action,
 __cleanup_recursion_counter=1,
 javax.servlet.forward.request_uri=/st2_ex_14_themes/edit.action,
 struts.valueStack=com.opensymphony.xwork2.ognl.OgnlValueStack@e00321,
 struts.actionMapping=ActionMapping{name='edit', namespace='/',
 method='null', extension='action', params=null, result=null},
 struts.view_uri=/edit.jsp, javax.servlet.forward.servlet_path=/edit.action,
 javax.servlet.forward.context_path=/st2_ex_14_themes}, session={},
 application={org.apache.jasper.compiler.ELInterpreter=org.apache.jasper.compiler.ELInterpreterFactory$DefaultELInterpreter@10ce397,
 org.apache.catalina.jsp_classpath=/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/classes/;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-commons-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-tree-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-fileupload-1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-io-2.2.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-lang3-3.1.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-logging-1.1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_the
 mes/build/web/WEB-INF/lib

Re: /struts2examples/themes and Struts2-3-16

2013-12-15 Thread Chris
Hello, 

Sorry, I didn't find any solution.
Struts 2 Themes and Struts 2.3.16 are not working ( Netbeans 7 and Tomcat 7 )
I believe I have to stop my tests.

But old version ( Struts2 Themes before 2013-12-13 ) and Struts 2.3.15.3 only 
are working.


The new files checkboxlist.ftl and theme.properties are differents since  
2013-12-13
and are not working with Struts2
==
checkboxlist.ftl before 2013-12-13 
#include /${parameters.templateDir}/xhtml/controlheader.ftl /
#include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl /
#include /${parameters.templateDir}/xhtml/controlfooter.ftl /#nt/

theme.properties  before 2013-12-13  
parent = xhtml
==
checkboxlist.ftl   after 2013-12-13
#include 
/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl /
#include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl /
#include 
/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl /#nt/

theme.properties  after 2013-12-13  
parent = KUTheme_simple 
==


Sometimes, with Strut2.3.16, Apache log gives a loop like this one
2013-12-15 19:49:42,984 DEBUG 
com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:72 - 
Entering nullPropertyValue 
[target=[org.apache.struts.edit.action.EditAction@10a6001, 
com.opensymphony.xwork2.DefaultTextProvider@1c68b6f], property=org]
2013-12-15 19:49:43,328 DEBUG 
com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.debug:72 - 
Entering getProperty (ognl.OgnlContext@44569547,AttributeMap 
{request={struts.request_uri=/st2_ex_14_themes/edit.action, 
__cleanup_recursion_counter=1, 
javax.servlet.forward.request_uri=/st2_ex_14_themes/edit.action, 
struts.valueStack=com.opensymphony.xwork2.ognl.OgnlValueStack@e00321, 
struts.actionMapping=ActionMapping{name='edit', namespace='/', method='null', 
extension='action', params=null, result=null}, struts.view_uri=/edit.jsp, 
javax.servlet.forward.servlet_path=/edit.action, 
javax.servlet.forward.context_path=/st2_ex_14_themes}, session={}, 
application={org.apache.jasper.compiler.ELInterpreter=org.apache.jasper.compiler.ELInterpreterFactory$DefaultELInterpreter@10ce397,
 
org.apache.catalina.jsp_classpath=/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/classes/;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-commons-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-tree-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-fileupload-1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-io-2.2.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-lang3-3.1.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-logging-1.1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_the
mes/build/web/WEB-INF/lib/freemarker-2.3.19.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/javassist-3.11.0.GA.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/log4j-1.2.17.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/ognl-3.0.6.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/struts2-core-2.3.16.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/xwork-core-2.3.16.jar;/C:/Program
 Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/;/C:/Program 
Files/Apache Software 
Foundation/apache-tomcat-7.0.39/lib/annotations-api.jar;/C:/Program 
Files/Apache Software 
Foundation/apache-tomcat-7.0.39/lib/catalina-ant.jar;/C:/Program Files/Apache 
Software Foundation/apache-tomcat-7.0.39/lib/catalina-ha.jar;/C:/Program 
Files/Apache Software
 Foundation/apache-tomcat-7.0.39/lib/catalina-tribes.jar;/C:/Program 
Files/Apache Software 
Foundation/apache-tomcat-7.0.39/lib/catalina.jar;/C:/Program Files/Apache 
Software Foundation/apache-tomcat-7.0.39/lib/ecj-4.2.1.jar;/C:/Program 
Files/Apache Software 
Foundation/apache-tomcat-7.0.39/lib/el-api.jar;/C:/Program Files/Apache 
Software Foundation/apache-tomcat-7.0.39/lib/jasper-el.jar;/C:/Program 
Files/Apache Software 
Foundation/apache-tomcat-7.0.39/lib/jasper.jar;/C:/Program Files/Apache 
Software Foundation/apache-tomcat-7.0.39/lib/jsp-api.jar;/C:/Program 
Files/Apache Software 
Foundation/apache-tomcat-7.0.39/lib/servlet-api.jar;/C:/Program Files/Apache 
Software 

/struts2examples/themes and Struts2-3-16

2013-12-13 Thread Chris
Hello, 


Problem since 2013-12-12 with the new version themes and Struts2.3.16

https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/themes 

in Struts-2.3.16
The new version 
A    
struts2examples\themes\src\main\webapp\template\KUTheme_simple\theme.properties
A    struts2examples\themes\src\main\webapp\template\KUTheme\theme.properties
U    struts2examples\themes\src\main\webapp\template\KUTheme\checkboxlist.ftl
U    struts2examples\themes\src\main\webapp\thankyou.jsp

But the problem with include ?  

( theme old with Struts2.3.15.3 is OK )



FreeMarker template error!


Error reading included file template/~~~KUTheme/controlheader-core.ftl
The problematic instruction:
--
== include 
/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl 

[on line 23, column 1 in template/xhtml/controlheader.ftl]
 in include /${parameters.templateDir}/xhtml/controlheader.ftl [on line 1, 
column 1 in template/KUTheme/checkboxlist.ftl]
--

Java backtrace for programmers:
--
freemarker.template.TemplateException: Error reading included file 
template/~~~KUTheme/controlheader-core.ftl
    at freemarker.core.Include.accept(Include.java:167)
    at freemarker.core.Environment.visit(Environment.java:221)
    at freemarker.core.MixedContent.accept(MixedContent.java:92)
    at freemarker.core.Environment.visit(Environment.java:221)
    at freemarker.core.Environment.include(Environment.java:1508)
.../...
    ol
    liTemplate template/~~~KUTheme/controlheader-core.ftl 
not found./li
    liError reading included file 
template/~~~KUTheme/controlheader-core.ftl/li
    liError reading included file 
template/~~~KUTheme/controlheader-core.ftl - Class: freemarker.core.Include
File: Include.java
Method: accept.../...

Re: /struts2examples/themes and Struts2-3-16

2013-12-13 Thread Chris
.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
 org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) 
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562) 
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
java.lang.Thread.run(Thread.java:619) 

 
You are seeing this page because development mode is enabled.  Development 
mode, or devMode, enables extra
debugging behaviors and reports to assist developers.  To disable this mode, 
set: 
struts.devMode=false 
in your WEB-INF/classes/struts.properties file. 





Le Vendredi 13 décembre 2013 14h46, Lukasz Lenart lukaszlen...@apache.org a 
écrit :
 
Hi,

I'm not sure if I get what you mean, but I have updated that example
few hours ago - please update and check again.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/


2013/12/13 Chris christal...@yahoo.fr:
 Hello,


 Problem since 2013-12-12 with the new version themes and Struts2.3.16

 https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/themes

 in Struts-2.3.16
 The new version
 A    
 struts2examples\themes\src\main\webapp\template\KUTheme_simple\theme.properties
 A    struts2examples\themes\src\main\webapp\template\KUTheme\theme.properties
 U    struts2examples\themes\src\main\webapp\template\KUTheme\checkboxlist.ftl
 U    struts2examples\themes\src\main\webapp\thankyou.jsp

 But the problem with include ?

 ( theme old with Struts2.3.15.3 is OK )



 FreeMarker template error!


 Error reading included file template/~~~KUTheme/controlheader-core.ftl
 The problematic

Re: paramsPrepareParamsStack only populates pojo, neither String nor int

2013-12-13 Thread Chris Pratt
I'm guessing that the user fields aren't actually getting set (since that's
done by the params interceptor that hasn't run yet), but you're seeing the
existing values of the object.  The passwordRepetition is showing null, but
it similarly hasn't been set by the params interceptor.

You can either call the params interceptor one more time before your
navigation interceptor or you can replicate the paramsPrepareParamsStack
into your new stack and put your navigation interceptor anywhere in that
stack you want.
  (*Chris*)


On Fri, Dec 13, 2013 at 6:53 AM, jotpe jotpe@gmail.com wrote:

 Hello List,

 I build myself a custom interceptorstack. The core part has to be the
 paramsPrepareParamsStack, because i work with an or-mapper.

 interceptor-stack name=accessNavigationDialog
 interceptor-ref name=checkRoles /
 interceptor-ref name=navigation /
 interceptor-ref name=paramsPrepareParamsStack /
 interceptor-ref name=paginator /
/interceptor-stack


 In my action class, there are 2 variables:

 private User user;
 private String passwordRepetition;


 POST Parameters are for example:

 user.id=14
 user.password=secret
 passwordRepetition=secret


 Everthing is working fine, if the navigation interceptor is executed after
 the paramsPrepareParamsStack. But i need to execute it before, because no
 navigation content is generated in case of error detection in a validate
 method.

 Is the navigation interceptor executed befor the paramsPrepareParamsStack
 the user varianbles id and passwort are set proper:
 user.id=1
 user.password=secret

 but setPasswordRepetition is never called and passwordRepetition stays
 null!!!


 The navigation interceptor only generates some html content and saves it in
 the value stack. Is this no good idea? It's done in this way:

 ValueStack vs = ActionContext.getContext().getValueStack();
 vs.set(servicenav,ul.../ul);
 return invocation.invoke();

 Can please anyone help me? This kind of error, raises a some distrust in
 me...

 regards Johannes

 



  1   2   3   4   5   6   7   8   9   10   >