Re: Property Mapping in a iterator

2009-11-12 Thread Musachy Barroso
You need a couple of things:

1. set devMode to true 

if you want to get a log of the missing property, then

2. set 

if you want to get an exception (the page will break), then:

2. set 

musachy

On Thu, Nov 12, 2009 at 5:58 AM, carl ballantyne
 wrote:
> Hi Alex,
>
> I thought it was supposed to give you more debug information including when
> the property does not exist. Looks like I might be wrong then.
>
> Cheers, Carl.
>
> Quoting Alex Parvulescu :
>
>> hello,
>>
>> I did it and got nothing :)
>>
>>
>> Can you explain a bit what this property does?
>>
>
>
>
> -
> 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: Property Mapping in a iterator

2009-11-12 Thread Musachy Barroso
FAQ added for it:
http://cwiki.apache.org/confluence/display/WW/Make+Struts+throw+exceptions+on+missing+properties%2C+or+log+them

On Thu, Nov 12, 2009 at 8:49 AM, Musachy Barroso  wrote:
> You need a couple of things:
>
> 1. set devMode to true 
>
> if you want to get a log of the missing property, then
>
> 2. set 
>
> if you want to get an exception (the page will break), then:
>
> 2. set 
>
> musachy
>
> On Thu, Nov 12, 2009 at 5:58 AM, carl ballantyne
>  wrote:
>> Hi Alex,
>>
>> I thought it was supposed to give you more debug information including when
>> the property does not exist. Looks like I might be wrong then.
>>
>> Cheers, Carl.
>>
>> Quoting Alex Parvulescu :
>>
>>> hello,
>>>
>>> I did it and got nothing :)
>>>
>>>
>>> Can you explain a bit what this property does?
>>>
>>
>>
>>
>> -
>> 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



some love for the documentation

2009-11-13 Thread Musachy Barroso
I created new space to work on the documentation, the guide main page is here:

http://cwiki.apache.org/confluence/display/S2NewDocDraft/Guides

I think it is very important that we clean up the documentation,
document missing parts, remove outdated stuff, the "version boxes",
and the snippets as well. I will reuse content from the current
documentation and add new entries. I have seen a bunch of tutorials
and articles around the net, if you like to contribute those to be
included on the docs, and you have a  CLA on file, let me know. Anyone
that has a CLA on file and wants to help with this effort, let me know
and I will give rights to edit/create on that space. If you don't have
a CLA on file and would like to help:
http://apache.org/licenses/icla.txt

This would make a great addition for 2.2. Also, feel free to reply to
this thread with ideas for new topics, suggestions, or just to cheer
us up :)

musachy

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



Re: some love for the documentation

2009-11-13 Thread Musachy Barroso
wrong link: http://cwiki.apache.org/confluence/display/S2NewDocDraft/User+Guide

On Fri, Nov 13, 2009 at 11:30 AM, Musachy Barroso  wrote:
> I created new space to work on the documentation, the guide main page is here:
>
> http://cwiki.apache.org/confluence/display/S2NewDocDraft/Guides
>
> I think it is very important that we clean up the documentation,
> document missing parts, remove outdated stuff, the "version boxes",
> and the snippets as well. I will reuse content from the current
> documentation and add new entries. I have seen a bunch of tutorials
> and articles around the net, if you like to contribute those to be
> included on the docs, and you have a  CLA on file, let me know. Anyone
> that has a CLA on file and wants to help with this effort, let me know
> and I will give rights to edit/create on that space. If you don't have
> a CLA on file and would like to help:
> http://apache.org/licenses/icla.txt
>
> This would make a great addition for 2.2. Also, feel free to reply to
> this thread with ideas for new topics, suggestions, or just to cheer
> us up :)
>
> musachy
>

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



Re: Problem with tag

2009-11-14 Thread Musachy Barroso
just ignore him, he is a resident troll.

On Sat, Nov 14, 2009 at 6:07 PM, Burton Rhodes  wrote:
> I habe no idea what Martin just wrote means?!
>
> On 11/13/09, Martin Gainty  wrote:
>>
>> //Assuming we have this Action
>> //A Simple Action Class which demonstrates placing information in a Map
>> public class GetEntryAction extends ActionSupport
>> {
>>     private ArrayList stats_list=new ArrayList(30); //a collection of stats
>>     private class stats
>>     {
>>       private ArrayList entries_list=new ArrayList(30); // a collection of
>> Entries
>>       String StatusGroupName="StatusGroupName";
>>       String StatusGroupID="StatusGroupID";
>>     }
>>     private class Entry
>>     {
>>         String HOHName;
>>         public String getHOH Name()
>>         {
>>             return HOHName;
>>         }
>>         public void setHOH Name(String HOHName)
>>         {
>>             this.HOHName=HOHName;
>>         }
>>         String Price;
>>         public String getPrice()
>>         {
>>             return Price;
>>         }
>>         public void setPrice(String price)
>>         {
>>             Price=price;
>>         }
>>         String OriginalValue;
>>         public String getOriginalValue()
>>         {
>>             return OriginalValue;
>>         }
>>         public void setOriginalValue(String str)
>>         {
>>             OriginalValue=str;
>>         }
>>     }
>>     public String execute() throws Exception
>>     {
>>
>>               Map session =
>> com.opensymphony.xwork2.ActionContext.getContext().getSession();
>>
>>               //construct new Uber stats class
>>                         stats stats1=new stats();
>>                         stats1.StatusGroupName=new
>> String("StatusGroupName1");
>>                         stats1.StatusGroupID=new String("StatusGroupID");
>>
>>               //Name,Value,OriginalValue
>> //construct the 1st entry
>>               Entry entry1=new Entry();
>>               entry1.setHOHName("ALL");
>>               entry1.setPrice("50.00");
>>               entry1.setOriginalValue("10.00");
>> //put it into stats Map
>>                         stats1.entries_list.add(entry1);
>>
>> //construct the second entry
>>               Entry entry2=new Entry();
>>               entry2.setHOHName("ALL");
>>               entry2.setPrice("50.00");
>>               entry2.setOriginalValue("10.00");
>> //put it into entries Map
>>                         stats1.entries_list.add(entry2);
>>
>>                         //put the stats class into stats_list
>>                         stats_list.add(stats1);
>>
>>               //construct new Uber stats class
>>                         stats stats2=new stats();
>>                         stats2.StatusGroupName=new
>> String("StatusGroupName2");
>>                         stats2.StatusGroupID=new String("StatusGroupID2");
>>
>> //construct the 1st entry
>>               Entry entry2a=new Entry();
>>               entry2a.setHOHName("ALL");
>>               entry2a.setPrice("50.00");
>>               entry2a.setOriginalValue("10.00");
>> //put it into stats Map
>>                         stats2.entries_list.add(entry2a);
>>
>> //construct the second entry
>>               Entry entry2b=new Entry();
>>               entry2b.setHOHName("ALL");
>>               entry2b.setPrice("50.00");
>>               entry2b.setOriginalValue("10.00");
>> //put it into entries Map
>>                         stats2.entries_list.add(entry2b);
>>
>>                   session.put("stats_list",stats_list);
>> //All of the information you require is now in the map which is now in the
>> Session
>>              return SUCCESS;
>>     }
>> }
>>
>> > var="stats_list">
>>      > ">oddeven">
>>          
>>          
>>          
>>              
>>              > value="#session.stats_list.entries_list('#statsStatus.index')"
>> status="userStatus" var="user_list">
>>
>>                  
>>                  > test="!#userStatus.index">,
>>
>>              
>>          
>>      
>>  
>>
>> a few things to notice:
>> notice how the index from statsStatus outer loop is being used for the
>> session_stats inner loop
>> also take a look at this List which is later pushed onto OGNLStack (session)
>> private ArrayList stats_list=new ArrayList(30); //a collection of stats
>> and then referenced later on as #session.stats_list
>>
>> once inside the session.stats_list there is a inner list
>> private ArrayList entries_list=new ArrayList(30);
>> which is populated and pushed onto OGNLStack (session)
>> and then referenced later on as #session.stats_list.entries_list
>>
>>  Martin Gainty
>> __
>> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>
>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>> dien

Re: Hibernate/Spring

2009-11-14 Thread Musachy Barroso
never mind him, he is a troll, or a bot, or very very stupid, or all of them.

On Sat, Nov 14, 2009 at 9:18 PM, Denis Cabasson
 wrote:
> Hi Martin,
>
> I am building a Struts 2 / Spring / Hibernate application, using the JPA
> specification as it seems to be the case here. It is not required to go
> through all the pain of using EJB entities. I am running this application
> both in Websphere and Tomcat, without using the container at all. To me the
> problem is only a JPA / Hibernate problem, and Spring is totally able to
> handle that without having to rely on the container.
>
> Denis.
>
> Martin Gainty a écrit :
>>
>> good morning denis
>>
>> i sent chris a summary of working hibernate examples in Glassfish
>> the getReference is a method from Ejb3Configuration
>> the merge method comes from org.hibernate.ejb.AbstractEntityManagerImpl
>> (and implements the sessions merge)
>> whichever app server he will be implementing will have to be configured to
>> serve his specific Bean as an EJBEntity..
>> Glassfish Users list would be more helpful
>>
>> i hope this clarifies Martin Gainty
>> __ Verzicht und
>> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>  Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>> dient lediglich dem Austausch von Informationen und entfaltet keine
>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
>> destinataire prévu, nous te demandons avec bonté que pour satisfaire
>> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
>> de ceci est interdite. Ce message sert à l'information seulement et n'aura
>> pas n'importe quel effet légalement obligatoire. Étant donné que les email
>> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
>> aucune responsabilité pour le contenu fourni.
>>
>>
>>
>>
>>
>>>
>>> Date: Sat, 14 Nov 2009 08:45:46 -0500
>>> From: denis.cabas...@gmail.com
>>> To: user@struts.apache.org
>>> Subject: Re: Hibernate/Spring
>>>
>>>  From what you are saying, I would have a look at the :
>>>
>>> http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.html
>>>
>>> My best guess is that this would fix your issue. If not, you probably
>>> have an issue with the way you are dealing with your entities.
>>>
>>> Denis.
>>>
>>>
>>> Chris Cranford a écrit :
>>>

 I have done a fair amount of reading today on the topic again and
 developed a few simple classes to support my service, model, and dao
 architecture for using Hibernate 3.3.2 and Spring 2 with Struts2.  The
 problem I am currently facing is I get a detached error when deleting
 an object and I get a null pointer exception in SessionImpl.java when
 I try to locate an object by its id.

 /* GenericDAO.java */

 public T findById(Object id) {
  return(getEntityManager().find(clazz, id));
 }

 public void delete(T entity) {
  getEntityManager().remove(entity);
 }

 Some posts I have seen say for the delete, you should use
 getReference() or merge() in order to get an association to the entity
 before you call the remove() method.  I attempted to use the same type
 of logic with getReference() during the findById() and it failed.

 Am I missing something in my configuration with Hibernate/Spring with
 respect to the session factory or something that I need to revisit?
 It really seems as though I may have a missing component or a poor
 configuration somewhere.

 -
 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
>>>
>>>
>>
>>
>>  _
>> Windows 7: I wanted simpler, now it's simpler. I'm a rock star.
>>
>> http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009
>>
>
>
> -
> 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-ma

Re: How to access the form data directly?

2009-11-14 Thread Musachy Barroso
where is the data that you want to show, in the action?

musachy

On Sat, Nov 14, 2009 at 6:55 PM, Juanjo C  wrote:
> Hi,
>
> I have an action class that implements the interfaces ModelDriven and
> Preparable with a bean that has data. And I have too an JSP that shows,
> through s:textfield, the data to the user. It works fine.
>
> But I need show in other way the data, i.e. with s:property or s:iterator...
> but I don't know where are this data... In the ValueStack?
>
> Any idea?
>
> sorry for my English
>

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



Re: Hibernate/Spring

2009-11-15 Thread Musachy Barroso
I tried to. I will try again.

musachy

On Sun, Nov 15, 2009 at 10:08 AM, Alex Siman  wrote:
>
> Can we just remove this "magainty"/"Martin Gainty" from Struts mailing lists?
> I do not understand what it/he writes.
>
> Musachy Barroso wrote:
>>
>> never mind him, he is a troll, or a bot, or very very stupid, or all of
>> them.
>>
>> On Sat, Nov 14, 2009 at 9:18 PM, Denis Cabasson
>>  wrote:
>>> Hi Martin,
>>>
>>> I am building a Struts 2 / Spring / Hibernate application, using the JPA
>>> specification as it seems to be the case here. It is not required to go
>>> through all the pain of using EJB entities. I am running this application
>>> both in Websphere and Tomcat, without using the container at all. To me
>>> the
>>> problem is only a JPA / Hibernate problem, and Spring is totally able to
>>> handle that without having to rely on the container.
>>>
>>> Denis.
>>>
>>> Martin Gainty a écrit :
>>>>
>>>> good morning denis
>>>>
>>>> i sent chris a summary of working hibernate examples in Glassfish
>>>> the getReference is a method from Ejb3Configuration
>>>> the merge method comes from org.hibernate.ejb.AbstractEntityManagerImpl
>>>> (and implements the sessions merge)
>>>> whichever app server he will be implementing will have to be configured
>>>> to
>>>> serve his specific Bean as an EJBEntity..
>>>> Glassfish Users list would be more helpful
>>>>
>>>> i hope this clarifies Martin Gainty
>>>> __ Verzicht und
>>>> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>>>  Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>>>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
>>>> unbefugte
>>>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
>>>> Nachricht
>>>> dient lediglich dem Austausch von Informationen und entfaltet keine
>>>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas
>>>> le
>>>> destinataire prévu, nous te demandons avec bonté que pour satisfaire
>>>> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
>>>> copie
>>>> de ceci est interdite. Ce message sert à l'information seulement et
>>>> n'aura
>>>> pas n'importe quel effet légalement obligatoire. Étant donné que les
>>>> email
>>>> peuvent facilement être sujets à la manipulation, nous ne pouvons
>>>> accepter
>>>> aucune responsabilité pour le contenu fourni.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> Date: Sat, 14 Nov 2009 08:45:46 -0500
>>>>> From: denis.cabas...@gmail.com
>>>>> To: user@struts.apache.org
>>>>> Subject: Re: Hibernate/Spring
>>>>>
>>>>>  From what you are saying, I would have a look at the :
>>>>>
>>>>> http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.html
>>>>>
>>>>> My best guess is that this would fix your issue. If not, you probably
>>>>> have an issue with the way you are dealing with your entities.
>>>>>
>>>>> Denis.
>>>>>
>>>>>
>>>>> Chris Cranford a écrit :
>>>>>
>>>>>>
>>>>>> I have done a fair amount of reading today on the topic again and
>>>>>> developed a few simple classes to support my service, model, and dao
>>>>>> architecture for using Hibernate 3.3.2 and Spring 2 with Struts2.  The
>>>>>> problem I am currently facing is I get a detached error when deleting
>>>>>> an object and I get a null pointer exception in SessionImpl.java when
>>>>>> I try to locate an object by its id.
>>>>>>
>>>>>> /* GenericDAO.java */
>>>>>>
>>>>>> public T findById(Object id) {
>>>>>>  return(getEntityManager().find(clazz, id));
>>>>>> }
>>>>>>
>>>>>> 

Re: Struts Tag Odd Behavior

2009-11-15 Thread Musachy Barroso
that is odd indeed, can you give us an example that shows this
problem? The way to set a variable is by using the "set" tag, like




musachy

On Sun, Nov 15, 2009 at 12:00 PM, Chris Cranford  wrote:
> So in my JSP i have defined a s:set tag which populates a variable
> with an empty string in some cases.  And when using the s:property
> referencing the variable name on the stack, I get the following
> output:
>
> com.opensymphony.xwork2.defaulttextprovi...@28ca1c
>
> What is the proper way to assign a text string to a variable on the
> stack and when it is popped off the stack for display, it is shown as
> a blank 0 length text string rather than a reference to the class?
>
> -
> 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: Interceptor & Action Definition

2009-11-15 Thread Musachy Barroso
public String intercept(ActionInvocation invocation) throws Exception {
ActionConfig config = invocation.getProxy().getConfig();
final Map parameters = config.getParams();
...
}


On Sun, Nov 15, 2009 at 3:25 PM, Chris Cranford  wrote:
> If you have action parameters defined in your struts.xml for a
> particular action, is there anyway that when the interceptor for the
> action's intercept method is called that for that given action, the
> param values can be iterated over from struts.xml ?
>
> -
> 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: Hibernate/Spring

2009-11-17 Thread Musachy Barroso
I tried for a last time, but no, he is here to stay.

On Sun, Nov 15, 2009 at 11:15 AM, Musachy Barroso  wrote:
> I tried to. I will try again.
>
> musachy
>
> On Sun, Nov 15, 2009 at 10:08 AM, Alex Siman  
> wrote:
>>
>> Can we just remove this "magainty"/"Martin Gainty" from Struts mailing lists?
>> I do not understand what it/he writes.
>>
>> Musachy Barroso wrote:
>>>
>>> never mind him, he is a troll, or a bot, or very very stupid, or all of
>>> them.
>>>
>>> On Sat, Nov 14, 2009 at 9:18 PM, Denis Cabasson
>>>  wrote:
>>>> Hi Martin,
>>>>
>>>> I am building a Struts 2 / Spring / Hibernate application, using the JPA
>>>> specification as it seems to be the case here. It is not required to go
>>>> through all the pain of using EJB entities. I am running this application
>>>> both in Websphere and Tomcat, without using the container at all. To me
>>>> the
>>>> problem is only a JPA / Hibernate problem, and Spring is totally able to
>>>> handle that without having to rely on the container.
>>>>
>>>> Denis.
>>>>
>>>> Martin Gainty a écrit :
>>>>>
>>>>> good morning denis
>>>>>
>>>>> i sent chris a summary of working hibernate examples in Glassfish
>>>>> the getReference is a method from Ejb3Configuration
>>>>> the merge method comes from org.hibernate.ejb.AbstractEntityManagerImpl
>>>>> (and implements the sessions merge)
>>>>> whichever app server he will be implementing will have to be configured
>>>>> to
>>>>> serve his specific Bean as an EJBEntity..
>>>>> Glassfish Users list would be more helpful
>>>>>
>>>>> i hope this clarifies Martin Gainty
>>>>> __ Verzicht und
>>>>> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>>>>  Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>>>>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
>>>>> unbefugte
>>>>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
>>>>> Nachricht
>>>>> dient lediglich dem Austausch von Informationen und entfaltet keine
>>>>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>>>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>>>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas
>>>>> le
>>>>> destinataire prévu, nous te demandons avec bonté que pour satisfaire
>>>>> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
>>>>> copie
>>>>> de ceci est interdite. Ce message sert à l'information seulement et
>>>>> n'aura
>>>>> pas n'importe quel effet légalement obligatoire. Étant donné que les
>>>>> email
>>>>> peuvent facilement être sujets à la manipulation, nous ne pouvons
>>>>> accepter
>>>>> aucune responsabilité pour le contenu fourni.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> Date: Sat, 14 Nov 2009 08:45:46 -0500
>>>>>> From: denis.cabas...@gmail.com
>>>>>> To: user@struts.apache.org
>>>>>> Subject: Re: Hibernate/Spring
>>>>>>
>>>>>>  From what you are saying, I would have a look at the :
>>>>>>
>>>>>> http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.html
>>>>>>
>>>>>> My best guess is that this would fix your issue. If not, you probably
>>>>>> have an issue with the way you are dealing with your entities.
>>>>>>
>>>>>> Denis.
>>>>>>
>>>>>>
>>>>>> Chris Cranford a écrit :
>>>>>>
>>>>>>>
>>>>>>> I have done a fair amount of reading today on the topic again and
>>>>>>> developed a few simple classes to support my service, model, and dao
>>>>>>> architecture for using Hibernate 3.3.2 and Spring 2 with Struts2.  The
>>>>>>> problem I am currently facing is I get a

Re: s2: Validation xml file not being used when validating a method

2009-11-17 Thread Musachy Barroso
It can be done like that as well, but, your first attempt should be
better. The "alias" part is the action name, lets say you have an
action like this:



/survey/survey-results.jsp
/survey/survey.jsp



you would need to name the validation file
"SurveyAction-save-validation.xml", and this file *has* to be in the
classpath of the application under "survey". Make sure that the
validation file is landing next to the action that it is supposed to
validate, in the web app classes dir.

musachy

On Tue, Nov 17, 2009 at 3:10 PM, ben_979  wrote:
>
> So it's done strictly by exclusion? I *thought* I had read that the
> validation could be focused on a specific method through the naming
> convention of the validation file(s). Is that idea totally wrong?
>
> --
> View this message in context: 
> http://old.nabble.com/s2%3A-Validation-xml-file-not-being-used-when-validating-a-method-tp26399337p26399526.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> 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: (clearly O/T) use of ThreadLocal vs Synchronized

2009-11-22 Thread Musachy Barroso
Performance wise, it seems like JUEL beats OGNL on nested expressions,
but it is a little bit slower at arithmetic, meh. The UEL plugin is
working better than I expected, so I will try to get it out of the
sandbox for the next release (whenever that is).

musachy

On Sat, Nov 21, 2009 at 4:53 PM, Chris Pratt  wrote:
> Unfortunately the same cannot be said for OGNL.  I spent most of Friday
> going through the interwebs archives and finding out that one major sticking
> point in my architecture (and all of yours) is that OGNL synchronizes just
> about everything.  I spent about 6 hours going through the code and removing
> some of the offending blocks.  I'm hoping that Musachy's latest attempt at
> removing OGNL all together will end up being the ultimate solution, but only
> time will tell.
>  (*Chris*)
>
> On Sat, Nov 21, 2009 at 4:48 PM, Martin Gainty  wrote:
>
>>
>> so
>> shared variable-use synchronized
>> not-shared variable-use threadLocal
>>
>> struts code has only a few synchronized blocks or synchronized methods
>> but plenty of ThreadLocal specifically the all important Dispatcher
>> instance
>> private static ThreadLocal instance = new
>> ThreadLocal();
>>
>> thanks chris
>> Martin Gainty
>> __
>> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>
>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>> dient lediglich dem Austausch von Informationen und entfaltet keine
>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
>> destinataire prévu, nous te demandons avec bonté que pour satisfaire
>> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
>> de ceci est interdite. Ce message sert à l'information seulement et n'aura
>> pas n'importe quel effet légalement obligatoire. Étant donné que les email
>> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
>> aucune responsabilité pour le contenu fourni.
>>
>>
>>
>>
>> > To: user@struts.apache.org
>> > Subject: Re: (clearly O/T) use of ThreadLocal vs Synchronized
>> > Date: Sat, 21 Nov 2009 19:27:16 -0500
>> > From: musom...@aol.com
>> >
>> >
>> >  They are quite distinct -- ThreadLocal variables are not shared at all
>> while synchronized permits sharing (but not concurrently).
>> > Suppose you have a background thread that does some calculation that you
>> might need [in my case you have an abstract
>> > graph and a background thread is checking if the graph has intersecting
>> edges so that algorithms that need to know can
>> > use a cached answer rather than calculate it at the time they need it].
>> You can't use a thread local because you want the
>> > background thread to play with the very same variable but still not get
>> in the way of the main thread of the algorithm.
>> >
>> >
>> >
>> > Chris
>> >
>> >
>> >
>> >
>> > -Original Message-
>> > From: Martin Gainty 
>> > To: Struts Users Mailing List 
>> > Sent: Sat, Nov 21, 2009 8:38 am
>> > Subject: (clearly O/T) use of ThreadLocal vs Synchronized
>> >
>> >
>> >
>> > Good Morning All-
>> >
>> > are there any instances where a factory use of synchronized keyword is
>> preferred
>> > or considered more efficient implementation over creating a ThreadLocal
>> object?
>> >
>> http://www.javamex.com/tutorials/synchronization_concurrency_thread_local2.shtml
>> >
>> > any answers are appreciated!
>> > Martin Gainty
>> > __
>> > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>> >
>> > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> Empfaenger
>> > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>> Weiterleitung
>> > oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient
>> lediglich dem
>> > Austausch von Informationen und entfaltet keine rechtliche
>> Bindungswirkung.
>> > Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine
>> Haftung
>> > fuer den Inhalt uebernehmen.
>> > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas
>> le
>> > destinataire prévu, nous te demandons avec bonté que pour satisfaire
>> informez
>> > l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de
>> ceci est
>> > interdite. Ce message sert à l'information seulement et n'aura pas
>> n'importe
>> > quel effet légalement obligatoire. Étant donné que les email peuvent
>> facilement
>> > être sujets à la manipulation, nous ne pouvons accepter aucune
>> responsabilité
>> > pour le contenu fourni.
>> >
>> >
>> >
>> > _
>> > Bing brings you maps,

Re: What may cause ognl.InappropriateExpressionException warning ?

2009-11-23 Thread Musachy Barroso
try adding quotes around it 'd-6836677-p' then it will be interpreted
as a string, or try to ignore it in the params interceptor.

On Mon, Nov 23, 2009 at 8:27 AM, jsubei  wrote:
>
> Dear all,
>
> I'm using struts 2.1.8 with displaytag 1.2
> and, of course, I have the same problem.
>
> Have you found a solution ?
>
> Thank you,
>
> Norbert
>
>
>
> jctovarueda wrote:
>>
>> Lu Ying,
>>
>> I could detect the problem, it's apparently a bug from Struts 2 (XWorks).
>>
>> It seems to be that OGNL Utils setValue confuses the "d-6836677-p"
>> expression as substract operation, it means, the expression is evaluated
>> like ( d - 6836677 ) - p as mathematical operation.
>>
>> I will try to find a solution to this problem, if you have some solution,
>> pls write to me.
>>
>> Regards,
>> JC
>>
>>
>> luy wrote:
>>>
> params interceptor doesn't like parameters with spaces
> in the name (this was fixed in xwork already), to fix it, set
> "acceptedParamNames" to "[[\p{Graph}\s]&&[^,#:=]]*" in your param
> interceptor.

 Right, I am using displayTag(displaytag-1.2.jar). The parameter looks
 like:

 https://info/ProcessBrowse.action?d-6836677-p=7

 "d-6836677-p=7" caused the problem. Is there any way that
 "d-6836677-p=7" can be accepted?
>>>
>>>
>>> Ok, I did a hack to disable warning message as a temporal solution:
>>>
>>> log4j.logger.com.opensymphony.xwork2.util.logging.commons.CommonsLogger=ERROR
>>>
>>> --
>>> Lu Ying
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/What-may-cause---ognl.InappropriateExpressionException--warning---tp21818620p26481347.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> 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: Is Using Spring With Struts 2 A Good Idea?

2009-11-25 Thread Musachy Barroso
It is all said, but I will just add my two pesos, yeah, it is worth
it, go for it, they play very nicely together.

musachy

On Wed, Nov 25, 2009 at 9:00 AM, Saeed Iqbal  wrote:
> Oh yes i forgot Spring Security too. Its awesome.
>
> On Wed, Nov 25, 2009 at 9:56 PM, Wes Wannemacher  wrote:
>
>> > -Original Message-
>> > From: phillips1021 [mailto:bphill...@ku.edu]
>> > Sent: Wednesday, November 25, 2009 11:29 AM
>> > To: user@struts.apache.org
>> > Subject: Is Using Spring With Struts 2 A Good Idea?
>> >
>> >
>> > At the University of Kansas (#1 college basketball team :) we use Struts
>> 2
>> > for our web application framework.  Its worked very well for us.
>> >
>> > I've been learning the Spring framework and how to use it with Struts 2.
>>  I
>> > think the two frameworks work very well together.
>> >
>> > I'm preparing a class for the other Java developers on how to use Struts
>> 2
>> > and Spring together.  As part of my research I'd like to hear from other
>> > Struts 2 developers on if you use Spring with Struts 2 and if you think
>> its
>> > a good or bad practice.
>> >
>> > Thanks in advance for any feedback you can provide on why or why not it's
>> a
>> > good idea to use Struts 2 with Spring.
>> >
>> > Bruce Phillips
>> > http://www.brucephillips.name/blog http://www.brucephillips.name/blog
>> >
>> >
>>
>>
>> Bruce, I am currently working on a commercial product that combines
>> the two. I could sing songs of praise, but I figure you've already
>> gotten a few of those messages, so I will try to come up with a few
>> drawbacks I've noticed.
>>
>> One thing I noticed early on is that it seriously compounds the amount
>> of XML configuration you will have to manage. I am a fan of the
>> Conventions plugin, but still feel obligated to stick to traditional
>> (explicit) configuration for projects of serious size. I just deployed
>> an app recently at a customer that contains 1678 lines of XML
>> configuration just for struts and spring (this does not include
>> sitemesh, web.xml, maven poms, etc.).
>>
>> Another thing I noticed is that this (these) project(s) now require a
>> significant learning curve. I think most of the people on this list
>> wouldn't be scared to jump into a project using struts 2, spring, jpa,
>> maven, etc. But... In my neck of the woods (just north of Kentucky,
>> but not a whole lot more civilized), it is difficult to find trained
>> Java professionals who are fluent in the technologies named above.
>> What is interesting is that when you look at the code, on a per source
>> file basis, it is all very simple (POJO-based development with simple
>> services/implementations). However, conceptually fitting all the
>> pieces together always tends to fall on my shoulders since my team
>> tends to be less experienced in the different libraries.
>>
>> With that being said, I will add that it really is a pleasure to use
>> all of these things together. After a certain point in every project,
>> development time speeds up drastically. Changes are easy and a nice
>> library of components is created that allows for easy additions. All
>> of these things tend to come together once you get past the first two
>> points above.
>>
>> -Wes
>>
>>
>> --
>> Wes Wannemacher
>>
>> Head Engineer, WanTii, Inc.
>> Need Training? Struts, Spring, Maven, Tomcat...
>> Ask me for a quote!
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
> --
> Saeed Iqbal
> CEO
> http://www.iqbalconsulting.com
> Struts - J2EE - Application Architects and Developers
>

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



Re: S2 2.1.8.1: Need custom decapitalization (or leniency similar to 2.1.6)

2009-11-26 Thread Musachy Barroso
You could write your own value stack that extends the OGNLValueStack
and just hacks the property name to make it the right/wrong case, but
oh boy does that scream trouble :)

musachy

On Thu, Nov 26, 2009 at 9:04 AM, Bill Bohnenberger  wrote:
> What an amusing thread. It seems to me the only problem here is the arrogant
> SOB that decided to defy the Bean naming conventions. LOL. (No offense
> intended if he is present company :)
>
> With affection,
> Bill
>
> On Thu, Nov 26, 2009 at 8:31 AM, Robert Graf-Waczenski wrote:
>
>> Rafał Krupiński schrieb:
>>
>>  On Thu, Nov 26, 2009 at 4:41 PM, Robert Graf-Waczenski 
>>> wrote:
>>>
>>>
 approach, which is tedious work because


>>> [...]
>>>
>>>
 i have to go through each applicable class and
 refactor-rename each method.


>>>
>>> Please don't try to make us feel guilty :-)
>>> You'll get paid for this, we're not.
>>>
>>> In previous post I stated clearly: "If the only problem is the number
>>> of methods to be changed"
>>> not "If you can change only some classes".
>>>
>>>
>>>
>>>
>> Well, yes, i am getting paid for this. So the time that i need to rename
>> the methods costs my employer big money.
>>
>> This is a case of true backwards incompatibility and causes trouble in
>> non-trivial projects such as ours. Other projects may decide to not upgrade
>> from earlier Struts versions to V 2.1.8.1, which is something i would
>> definitely take serious if i were working without getting paid, because
>> having your stuff used by as many people out there as possible is a major
>> point of FOSS, right? Freedom of choice is the other, meaning that we could
>> of course stick with V2.1.6 and patch it to our liking. I personally voted
>> against the latter option and decided to go for the renaming option because
>> we need some other fixes that are available in 2.1.8. And, to tell the
>> truth, our choice to use "getmProperty()" as accessor method naming pattern
>> was a bad one originally but we lived with it since the beginning and are
>> now being bitten in the behind :-)
>>
>> Robert
>>
>>
>>
>>
>> -
>> 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: S2.1.8.1: Need something similar to struts.el.throwExceptionOnFailure for and

2009-12-01 Thread Musachy Barroso
On Tue, Dec 1, 2009 at 3:41 AM, Robert Graf-Waczenski  wrote:
> 

so setting 

doesnt fail?

musachy

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



Re: Upgrade 2.1.6 to 2.1.8.1

2009-12-02 Thread Musachy Barroso
make sure you dont have 2 versions of xwork.

musachy

On Wed, Dec 2, 2009 at 8:50 AM, Saeed Iqbal  wrote:
> This looks like a classpath issue
>
> On Wednesday, December 2, 2009, Gustavo Andrés Guevara Saavedra
>  wrote:
>> Hi,
>>
>> I've just migrated my app. from Struts 2.1.6 to 2.1.8.1. The application 
>> worked fine but now throws the following exception upon launching the server:
>>
>> Unable to load configuration. - bean - 
>> jar:file:/C:/Yazix/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/front_web/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar!/struts-plugin.xml:29:132
>>
>> Caused by: java.lang.ClassNotFoundException: 
>> com.opensymphony.xwork2.util.classloader.ReloadingClassLoader
>>
>> I've made sure that struts2-core-2.1.8.1.jar as well as 
>> struts2-spring-2.1.8.1 are included and exported to the application, what am 
>> I doing wrong?
>>
>> Thanks for the attention,
>>
>> Regards,
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
> --
> Saeed Iqbal
> Independant Consultant (Freelance)
> J2EE - Application Architect / Developer
>
> -
> 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: blank app under jetty7

2009-12-02 Thread Musachy Barroso
I tried an app in jetty 7 yesterday and had the same problem, using my
amazing laziness skills I switched to jetty 6 and it worked, so I just
blamed it on jetty and moved on :)

musachy

On Wed, Dec 2, 2009 at 10:19 AM, Milos Negovanovic
 wrote:
> Hi,
>
> I am trying to get blank app to work under jetty7. At startup I get this
> error:
>
> http://pastie.org/723875
>
> Anyone seen this before? What am I missing?
>
> Regards
> --
> Milos Negovanovic
> milos.negovano...@googlemail.com
>
> -
> 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: Parameters after the action name, annotation based config not working

2009-12-03 Thread Musachy Barroso
Unfortunately wild card doesn't work really well with convention in
2.1.8. You would have to use trunk. If you use trunk, you could use
the advanced wild cards, which are more flexible, and easier to
use(they were written for that exact use case):

http://struts.apache.org/2.x/docs/wildcard-mappings.html (bottom)

musachy



On Thu, Dec 3, 2009 at 8:45 AM, Illes, Szabolcs  wrote:
> Hi All,
>
>
>
> I'd like to report a possible bug in struts2 annotation based action
> mapping:
>
>
>
> I wanted to have slashes in my action names and use them as parameters
> (REST style service)
>
>
>
> For example:
>
>
>
> The action name is /opds/0028-0838/2009 and is mapped to EPubOPDSAction
>
>
>
> The problem is that it only works when I use the struts2.xml to setup
> map the action:
>
>
>
> struts.xml:
>
>
>
> 
>
>  
>
>   value="false"/>
>
>  
>
>
>
>  
>
>
>
>     class="com.nature.mobile.epub.actions.EPubOPDSAction">
>
>      {1}
>
>      {2}
>
>     /WEB-INF/content/epub/rest/opds.jsp
>
>     
>
>    
>
> 
>
>
>
> Action class: ( nothing special)
>
> public class EPubOPDSAction extends ActionSupport implements
> ServletRequestAware {
>
>    public String execute() throws Exception { ... }
>
>
>
>   public void setYear(String year) { }  // gets called with year
>
>
>
>    public void setIssn(String issn) {  } // gets called with issn
>
> }
>
>
>
> but not when using java annotations:
>
>
>
> struts.xml:
>
> 
>
>  
>
>   value="false"/>
>
>  
>
> 
>
>
>
> @Namespace("/epub/rest")
>
> @Result(name="success", location="/WEB-INF/content/epub/rest/opds.jsp")
>
> public class EPubOPDSAction extends ActionSupport implements
> ServletRequestAware {
>
>
>
> @Override
>
> @Action(value="opds/*/*",
>
>            params={"issn","{1}", "year", "{2}"})
>
>    public String execute() throws Exception { ... }
>
>
>
>   public void setYear(String year) { }
>
>
>
>    public void setIssn(String issn) {  }
>
>
>
> }
>
>
>
>
>
> This one just throws an exception that there is no action mapped for
> /opds/0028-0838/2009
>
>
>
> I'm using:
>
> struts2-core 2.1.8.1
>
> and
>
> struts2-convention-plugin
>
> 2.1.8.1
>
>
>
> Any idea?
>
>
>
> Thanks,
>
> Szabolcs
>
>
>
>
> 
> DISCLAIMER: This e-mail is confidential and should not be used by anyone who 
> is
> not the original intended recipient. If you have received this e-mail in error
> please inform the sender and delete it from your mailbox or any other storage
> mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
> liability for any statements made which are clearly the sender's own and not
> expressly made on behalf of Macmillan Publishers Limited or one of its agents.
> Please note that neither Macmillan Publishers Limited nor any of its agents
> accept any responsibility for viruses that may be contained in this e-mail or
> its attachments and it is your responsibility to scan the e-mail and
> attachments (if any). No contracts may be concluded on behalf of Macmillan
> Publishers Limited or its agents by means of e-mail communication. Macmillan
> Publishers Limited Registered in England and Wales with registered number 
> 785998
> Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS
> 
>

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



Re: Problem with Struts 2 JSON RPC using simple HTTP Post (not using DOJO)

2009-12-03 Thread Musachy Barroso
It seems like one of the fields of TransportAssignmentVO is a list,
and what is coming from the JSON objects looks more like a map, can
you set a  break point on ClassCastException exceptions and tell us
what the field is? or post the setter/getters of
TransportAssignmentVO.

musahcy

On Thu, Dec 3, 2009 at 4:05 PM, Jeet08  wrote:
>
> I have developed a native client interface which calls struts2 JSON RPC using
> post method. I have set content type, content length as suggested in the
> spec. The request body looks like as follows :
> {"method": "uploadTxpAssignment","id": "txpUploadRequest",
> "params":{"addressByDestAddrId":{"addrLine1":"test home","addrLine2":"7th
> ave","addressId":2,"aptRoomNo":5,"city":"queens","phone":"435-577-4567","state":"NY","zipCode":10183},"atDestTime":null,"callRcvdTime":"2009-11-26T08:01:00","comments":"comments1","dateCreated":"2009-11-26T00:00:00","dateModified":null,"user":{"dateCreated":null,"dateModified":null,"dob":"1956-09-18T00:00:00","firstName":"passfname","gender":"Male","lastName":"patient1lname","mi":null,"ssn":null,"userId":1}}}
>
> The struts.xml configurations are :
>  method="smd">
>          
>      true
>      false
>   
>   
>      true
>        false
>             text/plain
>                                1024
>                                false
>                                UTF-8
>        
>    
>
> The simple action code body :
> public class UploadCallreportAction {
>        private TransportAssignmentVO transport;
>        /**
>         * @return the transport
>         */
>        public TransportAssignmentVO getTransport() {
>                return transport;
>        }
>
>        /**
>         * @param transport the transport to set
>         */
>        public void setTransport(TransportAssignmentVO transport) {
>                this.transport = transport;
>        }
>
>        public String smd() {
>        return Action.SUCCESS;
>    }
>
>   �...@smdmethod
>    public void uploadTxpAssignment(TransportAssignmentVO txpVO) {
>        setTransport(txpVO);
>      System.out.println("The Tansport assignment is for Run #:"+
> transport.getRunNumber());
>      }
> }
>
> When I run the client the call reaches the server and returns me an
> exception :
> :35,013 ERROR [RPCError] java.util.HashMap cannot be cast to java.util.List
> java.lang.ClassCastException: java.util.HashMap cannot be cast to
> java.util.List
>        at 
> org.apache.struts2.json.JSONInterceptor.invoke(JSONInterceptor.java:204)
>        at
> org.apache.struts2.json.JSONInterceptor.intercept(JSONInterceptor.java:131)
>        at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
>        at
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
>        at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
>        at
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>
> I am also using Spring 2.5 and Hibernate JPA in the same app Not sure if
> there is any conflict.I have followed the simple rules to set up the JSON
> RPC.However I am not able to resolve the problem. Please let me know if
> anyone has a solution for this.
> --
> View this message in context: 
> http://old.nabble.com/Problem-with-Struts-2-JSON-RPC-using-simple-HTTP-Post-%28not-using-DOJO%29-tp26635563p26635563.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> 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 with Struts 2 JSON RPC using simple HTTP Post (not using DOJO)

2009-12-03 Thread Musachy Barroso
I take it back, sorry. The problem is that JSON RPC expects "params"
to be a list, and it is coming as a map, I haven't kept up with the
"spec", is it a map these days?

musachy

On Thu, Dec 3, 2009 at 4:28 PM, Musachy Barroso  wrote:
> It seems like one of the fields of TransportAssignmentVO is a list,
> and what is coming from the JSON objects looks more like a map, can
> you set a  break point on ClassCastException exceptions and tell us
> what the field is? or post the setter/getters of
> TransportAssignmentVO.
>
> musahcy
>
> On Thu, Dec 3, 2009 at 4:05 PM, Jeet08  wrote:
>>
>> I have developed a native client interface which calls struts2 JSON RPC using
>> post method. I have set content type, content length as suggested in the
>> spec. The request body looks like as follows :
>> {"method": "uploadTxpAssignment","id": "txpUploadRequest",
>> "params":{"addressByDestAddrId":{"addrLine1":"test home","addrLine2":"7th
>> ave","addressId":2,"aptRoomNo":5,"city":"queens","phone":"435-577-4567","state":"NY","zipCode":10183},"atDestTime":null,"callRcvdTime":"2009-11-26T08:01:00","comments":"comments1","dateCreated":"2009-11-26T00:00:00","dateModified":null,"user":{"dateCreated":null,"dateModified":null,"dob":"1956-09-18T00:00:00","firstName":"passfname","gender":"Male","lastName":"patient1lname","mi":null,"ssn":null,"userId":1}}}
>>
>> The struts.xml configurations are :
>> > method="smd">
>>          
>>      true
>>      false
>>   
>>   
>>      true
>>        false
>>             text/plain
>>                                1024
>>                                false
>>                                UTF-8
>>        
>>    
>>
>> The simple action code body :
>> public class UploadCallreportAction {
>>        private TransportAssignmentVO transport;
>>        /**
>>         * @return the transport
>>         */
>>        public TransportAssignmentVO getTransport() {
>>                return transport;
>>        }
>>
>>        /**
>>         * @param transport the transport to set
>>         */
>>        public void setTransport(TransportAssignmentVO transport) {
>>                this.transport = transport;
>>        }
>>
>>        public String smd() {
>>        return Action.SUCCESS;
>>    }
>>
>>   �...@smdmethod
>>    public void uploadTxpAssignment(TransportAssignmentVO txpVO) {
>>        setTransport(txpVO);
>>      System.out.println("The Tansport assignment is for Run #:"+
>> transport.getRunNumber());
>>      }
>> }
>>
>> When I run the client the call reaches the server and returns me an
>> exception :
>> :35,013 ERROR [RPCError] java.util.HashMap cannot be cast to java.util.List
>> java.lang.ClassCastException: java.util.HashMap cannot be cast to
>> java.util.List
>>        at 
>> org.apache.struts2.json.JSONInterceptor.invoke(JSONInterceptor.java:204)
>>        at
>> org.apache.struts2.json.JSONInterceptor.intercept(JSONInterceptor.java:131)
>>        at
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
>>        at
>> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
>>        at
>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
>>        at
>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>>
>> I am also using Spring 2.5 and Hibernate JPA in the same app Not sure if
>> there is any conflict.I have followed the simple rules to set up the JSON
>> RPC.However I am not able to resolve the problem. Please let me know if
>> anyone has a solution for this.
>> --
>> View this message in context: 
>> http://old.nabble.com/Problem-with-Struts-2-JSON-RPC-using-simple-HTTP-Post-%28not-using-DOJO%29-tp26635563p26635563.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> 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 with Struts 2 JSON RPC using simple HTTP Post (not using DOJO)

2009-12-03 Thread Musachy Barroso
it is a list in the v1 of the spec http://json-rpc.org/wiki/specification

"params - An Array of objects to pass as arguments to the method."

the name of the parameters is irrelevant, only the order is.

musachy

On Thu, Dec 3, 2009 at 4:31 PM, Musachy Barroso  wrote:
> I take it back, sorry. The problem is that JSON RPC expects "params"
> to be a list, and it is coming as a map, I haven't kept up with the
> "spec", is it a map these days?
>
> musachy
>
> On Thu, Dec 3, 2009 at 4:28 PM, Musachy Barroso  wrote:
>> It seems like one of the fields of TransportAssignmentVO is a list,
>> and what is coming from the JSON objects looks more like a map, can
>> you set a  break point on ClassCastException exceptions and tell us
>> what the field is? or post the setter/getters of
>> TransportAssignmentVO.
>>
>> musahcy
>>
>> On Thu, Dec 3, 2009 at 4:05 PM, Jeet08  wrote:
>>>
>>> I have developed a native client interface which calls struts2 JSON RPC 
>>> using
>>> post method. I have set content type, content length as suggested in the
>>> spec. The request body looks like as follows :
>>> {"method": "uploadTxpAssignment","id": "txpUploadRequest",
>>> "params":{"addressByDestAddrId":{"addrLine1":"test home","addrLine2":"7th
>>> ave","addressId":2,"aptRoomNo":5,"city":"queens","phone":"435-577-4567","state":"NY","zipCode":10183},"atDestTime":null,"callRcvdTime":"2009-11-26T08:01:00","comments":"comments1","dateCreated":"2009-11-26T00:00:00","dateModified":null,"user":{"dateCreated":null,"dateModified":null,"dob":"1956-09-18T00:00:00","firstName":"passfname","gender":"Male","lastName":"patient1lname","mi":null,"ssn":null,"userId":1}}}
>>>
>>> The struts.xml configurations are :
>>> >> method="smd">
>>>          
>>>      true
>>>      false
>>>   
>>>   
>>>      true
>>>        false
>>>             text/plain
>>>                                1024
>>>                                false
>>>                                UTF-8
>>>        
>>>    
>>>
>>> The simple action code body :
>>> public class UploadCallreportAction {
>>>        private TransportAssignmentVO transport;
>>>        /**
>>>         * @return the transport
>>>         */
>>>        public TransportAssignmentVO getTransport() {
>>>                return transport;
>>>        }
>>>
>>>        /**
>>>         * @param transport the transport to set
>>>         */
>>>        public void setTransport(TransportAssignmentVO transport) {
>>>                this.transport = transport;
>>>        }
>>>
>>>        public String smd() {
>>>        return Action.SUCCESS;
>>>    }
>>>
>>>   �...@smdmethod
>>>    public void uploadTxpAssignment(TransportAssignmentVO txpVO) {
>>>        setTransport(txpVO);
>>>      System.out.println("The Tansport assignment is for Run #:"+
>>> transport.getRunNumber());
>>>      }
>>> }
>>>
>>> When I run the client the call reaches the server and returns me an
>>> exception :
>>> :35,013 ERROR [RPCError] java.util.HashMap cannot be cast to java.util.List
>>> java.lang.ClassCastException: java.util.HashMap cannot be cast to
>>> java.util.List
>>>        at 
>>> org.apache.struts2.json.JSONInterceptor.invoke(JSONInterceptor.java:204)
>>>        at
>>> org.apache.struts2.json.JSONInterceptor.intercept(JSONInterceptor.java:131)
>>>        at
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
>>>        at
>>> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
>>>        at
>>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
>>>        at
>>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>>>
>>> I am also using Spring 2.5 and Hibernate JPA in the same app Not sure if
>>> there is any conflict.I have followed the simple rules to set up the JSON
>>> RPC.However I am not able to resolve the problem. Please let me know if
>>> anyone has a solution for this.
>>> --
>>> View this message in context: 
>>> http://old.nabble.com/Problem-with-Struts-2-JSON-RPC-using-simple-HTTP-Post-%28not-using-DOJO%29-tp26635563p26635563.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> 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 with Struts2 JSON RPC using simple HTTP Post

2009-12-04 Thread Musachy Barroso
see my previous reply.

On Thu, Dec 3, 2009 at 4:10 PM, Prasenjit Bhadra  wrote:
> I have developed a native client interface which calls struts2 JSON RPC
> using post method. I have set content type, content length as suggested in
> the spec. The request body looks like as follows : {"method":
> "uploadTxpAssignment","id": "txpUploadRequest",
> "params":{"addressByDestAddrId":{"addrLine1":"test home","addrLine2":"7th
> ave","addressId":2,"aptRoomNo":5,"city":"queens","phone":"435-577-4567","state":"NY","zipCode":10183},"atDestTime":null,"callRcvdTime":"2009-11-26T08:01:00","comments":"comments1","dateCreated":"2009-11-26T00:00:00","dateModified":null,"user":{"dateCreated":null,"dateModified":null,"dob":"1956-09-18T00:00:00","firstName":"passfname","gender":"Male","lastName":"patient1lname","mi":null,"ssn":null,"userId":1}}}
> The struts.xml configurations are :  class="com.actions.upload.UploadAction" method="smd">  name="json"> true  name="ignoreSMDMethodInterfaces">false   type="json"> true  name="ignoreInterfaces">false  name="contentType">text/plain 1024
> false  name="contentCharSet">UTF-8   The simple action
> code body : public class UploadCallreportAction { private
> TransportAssignmentVO transport; /** * @return the transport */ public
> TransportAssignmentVO getTransport() { return transport; } /** * @param
> transport the transport to set */ public void
> setTransport(TransportAssignmentVO transport) { this.transport = transport;
> } public String smd() { return Action.SUCCESS; } @SMDMethod public void
> uploadTxpAssignment(TransportAssignmentVO txpVO) { setTransport(txpVO);
> System.out.println("The Tansport assignment is for Run #:"+
> transport.getRunNumber()); } } When I run the client the call reaches the
> server and returns me an exception : :35,013 ERROR [RPCError]
> java.util.HashMap cannot be cast to java.util.List
> java.lang.ClassCastException: java.util.HashMap cannot be cast to
> java.util.List at
> org.apache.struts2.json.JSONInterceptor.invoke(JSONInterceptor.java:204) at
> org.apache.struts2.json.JSONInterceptor.intercept(JSONInterceptor.java:131)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> at
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
> at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
> at
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
> I am also using Spring 2.5 and Hibernate JPA in the same app Not sure if
> there is any conflict.I have followed the simple rules to set up the JSON
> RPC.However I am not able to resolve the problem. Please let me know if
> anyone has a solution for this.
>
> Jeet
>

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



Re: -Tag in -Tag:differences in 2.1.2 and >= 2.1.6

2009-12-07 Thread Musachy Barroso
Unfortunately this is a bug/enhancement dependent on your point of
view (what created this problem fixed other bugs). The way to get it
to work like you want is to add a "merge" param set to "false" in the
"staticParams" interceptor.

For reference:
https://issues.apache.org/struts/browse/WW-2970
http://jira.opensymphony.com/browse/XW-709

This should have not happened, but we just heard about it, so it is
kind of late :)
musachy

On Mon, Dec 7, 2009 at 4:21 AM, Hans Solo  wrote:
> Hi,
>
> I’m using the -Tag in an -Tag:
>
>  class="springManagedUserAttributesAction">
>
>   access/users
>
>   manageUserAttributes
>
>   /jsp/access/users/attributes/list.jsp
>
> 
>
>
> The interceptor-stack is the defaultStack.
>
> I’ve also defined getter/setter for these parameters (menu/actionMapping).
>
> Now on some calls, I’d like to overwrite e.g. the menu-parameter in the 
> action.
>
> This works for struts version 2.1.2.
>
> But if I migrate to version 2.1.6 or 2.1.8.1, it is no longer possible
> for me to overwrite these parameters!
>
> The setter of the parameter is called several times and ends always
> with setting the value that is given in the struts-mapping.
>
> So it is not possible to set the value of the parameter explicit in
> the action and read it in the result.
>
>
> Example:
>
> call: manageUserAttributes_list
>
> method in the action:
>
> public String list() {
>
>   setMenu(null);
>
>   user = userService.getUser(user.getId());
>
>   return RESULT_LIST;
>
> }
>
> If I process the menu-variable in the resulting jsp, the value is 
> access/users.
>
> Does someone know about this behaviour?
>
> Am I doing something wrong or is it no longer possible to change these
> parameters in actions?
>
>
> Thank you
>
> Tim
>
> -
> 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: struts2 web app without jsp pages, is it possible?

2009-12-08 Thread Musachy Barroso
> Fire the PM?

you beat me to it :)

On Tue, Dec 8, 2009 at 6:34 AM, Wes Wannemacher  wrote:
> On Tue, Dec 8, 2009 at 9:21 AM, Shital Patil  wrote:
>> Dear All,
>>
>> Thanks for your valuable suggestions.
>> Actually I am failed to convince my PM for using JSP pages in web app.
>> He said, there are some serious problems with JSP.
>> e.g JSP = presentation + code.
>> A JSP developer can easily read some imp file on disk say, /etc/passwd, and
>> throw it to the client. How to avoid this problem?
>>
>
>
> Fire the PM?
>
> Honestly, that is an ignorant stance against JSP. I could make the
> same argument against just about any programming construct. If you are
> worried that developers might actually have access to libraries and
> resources, then take away their computers and tell them to write their
> software on paper and submit them to someone more trustworthy...
>
> -Wes
>
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> -
> 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 2.1.8.1] [JSON] How to build a JSON for jsTree (array without variable name)

2009-12-10 Thread Musachy Barroso
The root object should be an array or list that contains a map or
object, and so on.

On Wed, Dec 9, 2009 at 10:38 PM, Michael Obster  wrote:
> Hi,
>
> I'm trying to build a correct JSON for usage with jsTree. Therefor I need
> s.th. like that:
> [
>  { attributes: { id : "pjson_1" },
>                 data: "Root node 1",
>  },
>  { attributes: { id : "pjson_5" },
>                 data: "Root node 2" }
> ]
>
> As you can see if you need to root nodes in the tree you have to put them in
> an array, but I don't know how I can build the structure with the
> json-plugin from struts 2.1.8.1. Using a variable with getter and setter
> creates always s.th. like:
> varname: ...
>
> Can anyone tell how this is done?
>
> Kind regards,
> Michael
>
> -
> 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: Convention Plugin - Action Chaining

2009-12-10 Thread Musachy Barroso
If they are in the same package that should work, all I can advise is
to put a breakpoint in ConventionUnknownHandler, line 301 and see what
is going on.

musachy

On Thu, Dec 10, 2009 at 7:10 AM, RogerV  wrote:
>
> I'm trying to get action chaining to work as described in the section
> chaining at http://struts.apache.org/2.1.6/docs/convention-plugin.html. My
> Foo action and bar actions are listed below. What happens is that when Foo
> is called, it correctly displays foo.jsp. When foo.jsp is submitted it fills
> in the value of platformId, I see the message "Platform selected" on the
> console and then foo.jsp is redisplayed and I don't see the message "Foo-Bar
> is called". If I change return "bar" to a nonsense string that doesn't refer
> to anything, I still get foo.jsp redisplayed when I would expect a "No
> Result Defined for Action Foo and result " exception.
>
> Any idea what I'm doing wrong?
>
> Regards
>
> public class Foo extends ActionSupport {
>
>        private int platformId;
>        private Services services;
>
>        public String execute() {
>
>                System.out.println("SelectPlatform.execute()");
>                if (platformId > 0) {
>                        System.out.println("Platform selected");
>                        return "bar";
>                }
>
>                return SUCCESS;
>        }
>
>        public  List getPlatforms() {
>                return services.listAllPlatforms();
>            }
>
>        public int getPlatformId() {
>                return platformId;
>        }
>
>        public void setPlatformId(int platformId) {
>                this.platformId = platformId;
>        }
> }
>
> public class EditPlatformData extends BaseAction {
>
>        private int platformId;
>
> @Action("foo-bar")
>        public String execute() {
>                System.out.println("Foo-Bar is called");
>                return SUCCESS;
>        }
>
>        public int getPlatformId() {
>                return platformId;
>        }
>
>        public void setPlatformId(int platformId) {
>                this.platformId = platformId;
>        }
> }
> --
> View this message in context: 
> http://old.nabble.com/Convention-Plugin---Action-Chaining-tp26728788p26728788.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> 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: Convention Plugin - Action Chaining

2009-12-11 Thread Musachy Barroso
So it is finding a jsp that it think it is the result, that's why it
is not doing the forward.

On Fri, Dec 11, 2009 at 1:48 AM, RogerV  wrote:
>
>
>
> Musachy Barroso wrote:
>>
>> If they are in the same package that should work, all I can advise is
>> to put a breakpoint in ConventionUnknownHandler, line 301 and see what
>> is going on.
>>
>
> Hi Musachy
>
> At line 301 if (result == null && resultCode != null) result is an instance
> of ServletDispatcherResult with a location attribute of
> /WEB-INF/content/foo.jsp and resultCode is a string with value "bar". The
> comparison fails and jumps to line 317 returning /WEB-INF/content/foo.jsp
>
> Regards
>
> --
> View this message in context: 
> http://old.nabble.com/Convention-Plugin---Action-Chaining-tp26728788p26741424.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> 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: "specified DSN contains an architecture mismatch"

2009-12-11 Thread Musachy Barroso
O_o

On Fri, Dec 11, 2009 at 3:01 PM, Todd Grigsby  wrote:
>
> Configuration:
>  Windows 7 64 bit
>  Tomcat 6
>  Struts 2
>  MySQL 5.1.36 for Win64
>  MySQL ODBC 5.1 Driver 5.01.06.00
>
> I've created a valid ODBC alias that I can see from other Windows native
> applications with no problem.  When I attempt the following:
>
> import javax.naming.Context;
> import javax.naming.InitialContext;
> import javax.naming.NamingException;
> import javax.sql.DataSource;
> import java.sql.Connection;
>
> ...
>
>   Context context = new InitialContext();
>   DataSource ds =
> (DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
>   Connection conn = datasource.getConnection();
>
> ...
>
> The last line throws an exception with the following message:  "The
> specified DSN contains an architecture mismatch between the Driver and
> Application."
>
> I reinstalled the driver, redefined the System DSN's in the ODBC
> administrator, and I still get the same message.  Anybody have any idea how
> to fix this?
>
> Todd
>
> -
> 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: ognl method lookup failure

2009-12-12 Thread Musachy Barroso
I would suggest to put a breakpoint in XWorkMethodAccessor.callMethod
and see why it is not finding it.

musachy

On Sat, Dec 12, 2009 at 1:44 PM, Dale Newfield  wrote:
> Often when I'm stumped writing a detailed "help!" message leads me to the
> bug and I never have to send it.  This time I was not so lucky, and since
> I've already wasted two days on this I was hoping someone here might have an
> idea to get me out of the weeds.
>
> I've got an abstract class "Comment" and a bunch of concrete subclasses
> thereof.  I've got a "displayComment.tag" file that calls itself recursively
> to display a tree of comments.  Among other things this checks the extant
> subscriptions on the comment in question and displays various
> subscribe/unsubscribe buttons as appropriate.
>
> Mostly this works.  There are a couple concrete subclasses of Comment that
> break in a bizarre way, and I've been stuck on this for two days, so I'm
> hoping someone here might have a suggestion.
>
> I go through the normal annoying dance to push ognl accessible objects into
> jstl-el accessible locations, passing those as attributes into the .tag file
> and then set them inside the tag into a namespace accessible from ognl:
>  (yes, I tried with #attr, too--same behavior)
>
> inside the .tag:
> <%@ attribute name="currentUser" required="true" type="mumble.model.User"
> rtexprvalue="true"%>
> <%@ attribute name="commentToDisplay" required="true"
> type="mumble.model.Comment" rtexprvalue="true"%>
>
> 
> 
>
> Simple tests:   and
>  show the appropriate
> (concrete) classes.
>
> Whereas in most instances this OGNL logic works:
> #request.commentInTag.isUserSubscribedViaEmail(#request.currentUserInTag)
>
> for these two specific concrete classes (due I believe to
> struts.ognl.logMissingProperties=true) it results in a log entry:
> Could not find method
> [#request.commentInTag.isUserSubscribedViaEmail(#request.currentUserInTag)]
>
> I am able to interrogate the object and find the expected methods:
>  results in "public boolean
> mumble.model.CommunityFunItem.isUserSubscribedViaEmail(mumble.model.User)
>
> but I'm also unable to get further with that:  value="%{#request.commentInTag.class.methods.{?
> #this.name=='isUserSubscribedViaEmail'}[0].invoke(#request.commentInTag,#request.currentUserInTag)}"/>
> results in the log entry:  Could not find method
> [#request.commentInTag.class.methods.{?
> #this.name=='isUserSubscribedViaEmail'}[0].invoke(#request.commentInTag,#request.currentUserInTag)]
>
> Maybe related: if I try to access the Class method "Method getMethod(String
> name, Class... parameterTypes)" directly to get the right one (instead of
> getting all of them and looking for one with the right name) I end up with
> this log message:
>
> Caught an exception while evaluating expression
> '#request.commentInTag.class.getMethod('isUserSubscribedViaEmail',#request.currentUserInTag.class)'
> against value stack
> java.lang.IllegalArgumentException: java.lang.classcastexcept...@ab1dea
>        at sun.reflect.GeneratedMethodAccessor1387.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:851)
>
>
> Again, this works with some concrete subclasses of Comment, but not others.
>  There are no substantial differences between them as far as I can tell.
>  Any ideas/leads/suggestions/suppositions welcome.
>
> I'm using struts 2.1.8.1, ognl 2.7.3, yes I have javassist-3.8.1.jar in
> WEB-INF/lib.  Running under glassfish if that matters.
>
> -Dale
>
> -
> 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: Essential Dependencies Only

2009-12-15 Thread Musachy Barroso
mvn dependency:tree will give you all the dependencies nicely. I also
have to help with this task in my company, and we haven't found any
decent tool that does what you described. If all your projects use
maven, then there is probably a plugin for that, but that's not the
case for us.

On Tue, Dec 15, 2009 at 9:58 AM,   wrote:
> Thanks Wes --
>
> Have you or others discovered any software that could be used to "decompose"
> an open source product into its constituent parts and then further decompose
> each of those in turn.  Looking at a single POM rarely answers the "real"
> questions.  The dependency/version graph is wicked to deal with by hand and
> the licenses therein complicate matters even further.  I struggle when
> thinking how many shops are each doing this over-and-over with each new
> version release and it seems like a missing piece of the FOSS/legal puzzle.
>
> Peace,
> Scott
>
>
> On Mon, Dec 14, 2009 at 10:44 AM, Wes Wannemacher  wrote:
>
>> Scott, take a look at the mailreader and blank apps. You can also read
>> through the struts2-core pom (annotated and easier to read here -
>>
>> http://jarvana.com/jarvana/inspect-pom/org/apache/struts/struts2-core/2.1.8/struts2-core-2.1.8.pom
>> ,
>> that points to 2.1.8, they haven't indexed 2.1.8.1 yet, but there is
>> no differences in dependencies).
>>
>> If you just want to cut to the chase, the "essentials" would be -
>>
>> struts2-core 2.1.8.1
>> xwork-core 2.1.6
>> freemarker 2.3.15
>> ognl 2.7.3
>>
>> -Wes
>>
>> On Mon, Dec 14, 2009 at 10:36 AM, stanlick  wrote:
>> >
>> > Greetings and Happy Holidays --
>> >
>> > I am sitting down to unwind the Essential Dependencies Only jar
>> > (struts-2.1.8.1-lib.zip) in preparation for the litany of questions the
>> > lawyers are going to ask before accepting the Struts 2.1.8.1 upgrade in
>> > house.  Now either I have a different understanding of the word
>> essential,
>> > or this version of our new Struts has really spread her arms.  There are
>> > seventy-one jars in the lib folder of the *essential dependencies only
>> jar*
>> > and a quick glance suggests they are *not* all essential.  So does
>> essential
>> > != core or required?  Is there a resource where an analysis can be made
>> to
>> > determine compile, testing, run-time dependencies?  Untangling this ball
>> of
>> > yarn by hand is going to burn up hours and lead an analyst down many
>> rabbit
>> > holes.  Is there a POM that could save the man hours?
>> >
>> > Peace,
>> > Scott
>> > --
>> > View this message in context:
>> http://old.nabble.com/Essential-Dependencies-Only-tp26779724p26779724.html
>> > Sent from the Struts - User mailing list archive at Nabble.com.
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > For additional commands, e-mail: user-h...@struts.apache.org
>> >
>> >
>>
>>
>>
>> --
>> Wes Wannemacher
>>
>> Head Engineer, WanTii, Inc.
>> Need Training? Struts, Spring, Maven, Tomcat...
>> Ask me for a quote!
>>
>> -
>> 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: Essential Dependencies Only

2009-12-15 Thread Musachy Barroso
yeah I know, so do we ;), right now grep is all I got

On Tue, Dec 15, 2009 at 10:09 AM,   wrote:
> Thanks brother.  Actually it's not our projects we analyze; it's the open
> source projects.  We *do not* simply download/dump the OS project and begin
> to use it.  We factor each project into as many constituent OS projects as
> it made from and then recursively walk down the tree doing this at each
> node.  It is a big PITA!
>
> On Tue, Dec 15, 2009 at 12:03 PM, Musachy Barroso  wrote:
>
>> mvn dependency:tree will give you all the dependencies nicely. I also
>> have to help with this task in my company, and we haven't found any
>> decent tool that does what you described. If all your projects use
>> maven, then there is probably a plugin for that, but that's not the
>> case for us.
>>
>> On Tue, Dec 15, 2009 at 9:58 AM,   wrote:
>> > Thanks Wes --
>> >
>> > Have you or others discovered any software that could be used to
>> "decompose"
>> > an open source product into its constituent parts and then further
>> decompose
>> > each of those in turn.  Looking at a single POM rarely answers the "real"
>> > questions.  The dependency/version graph is wicked to deal with by hand
>> and
>> > the licenses therein complicate matters even further.  I struggle when
>> > thinking how many shops are each doing this over-and-over with each new
>> > version release and it seems like a missing piece of the FOSS/legal
>> puzzle.
>> >
>> > Peace,
>> > Scott
>> >
>> >
>> > On Mon, Dec 14, 2009 at 10:44 AM, Wes Wannemacher 
>> wrote:
>> >
>> >> Scott, take a look at the mailreader and blank apps. You can also read
>> >> through the struts2-core pom (annotated and easier to read here -
>> >>
>> >>
>> http://jarvana.com/jarvana/inspect-pom/org/apache/struts/struts2-core/2.1.8/struts2-core-2.1.8.pom
>> >> ,
>> >> that points to 2.1.8, they haven't indexed 2.1.8.1 yet, but there is
>> >> no differences in dependencies).
>> >>
>> >> If you just want to cut to the chase, the "essentials" would be -
>> >>
>> >> struts2-core 2.1.8.1
>> >> xwork-core 2.1.6
>> >> freemarker 2.3.15
>> >> ognl 2.7.3
>> >>
>> >> -Wes
>> >>
>> >> On Mon, Dec 14, 2009 at 10:36 AM, stanlick  wrote:
>> >> >
>> >> > Greetings and Happy Holidays --
>> >> >
>> >> > I am sitting down to unwind the Essential Dependencies Only jar
>> >> > (struts-2.1.8.1-lib.zip) in preparation for the litany of questions
>> the
>> >> > lawyers are going to ask before accepting the Struts 2.1.8.1 upgrade
>> in
>> >> > house.  Now either I have a different understanding of the word
>> >> essential,
>> >> > or this version of our new Struts has really spread her arms.  There
>> are
>> >> > seventy-one jars in the lib folder of the *essential dependencies only
>> >> jar*
>> >> > and a quick glance suggests they are *not* all essential.  So does
>> >> essential
>> >> > != core or required?  Is there a resource where an analysis can be
>> made
>> >> to
>> >> > determine compile, testing, run-time dependencies?  Untangling this
>> ball
>> >> of
>> >> > yarn by hand is going to burn up hours and lead an analyst down many
>> >> rabbit
>> >> > holes.  Is there a POM that could save the man hours?
>> >> >
>> >> > Peace,
>> >> > Scott
>> >> > --
>> >> > View this message in context:
>> >>
>> http://old.nabble.com/Essential-Dependencies-Only-tp26779724p26779724.html
>> >> > Sent from the Struts - User mailing list archive at Nabble.com.
>> >> >
>> >> >
>> >> > -
>> >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> > For additional commands, e-mail: user-h...@struts.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Wes Wannemacher
>> >>
>> >> Head Engineer, WanTii, Inc.
>> >> Need Training? Struts, Spring, Maven, Tomcat...
>> >> Ask me for a quote!
>> >>
>> >> -
>> >> 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



Re: Anyone used jsTree with Struts2?

2009-12-15 Thread Musachy Barroso
On Tue, Dec 15, 2009 at 1:20 PM, Michael Obster  wrote:
> jsTree

I used it with the JSON plugin many moons ago, what problem are you having?

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



Re: Struts 2.1.8 with Spring Web Flow plugin

2009-12-25 Thread Musachy Barroso
It needs to be fixed to work with SWF 2.

musachy

On Fri, Dec 25, 2009 at 11:54 AM, Celinio Fernandes  wrote:
> Hi,
> does anyone know a tutorial or an example about Struts 2 with the Spring Web 
> Flow plugin ?
> There is this one :
> http://cwiki.apache.org/S2PLUGINS/spring-webflow-plugin.html
>
> But it's kind of old and not very informative.
>
> What is the status of that Spring Web Flow plugin in Struts 2.1.8 ?
>
> Thanks.
>
>
>
>
>
>
>

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



Re: Example of dumping the valuestack?

2009-12-28 Thread Musachy Barroso
if you add a debug=browse param and have the dojo plugin in the app,
you can browse the stack content.

On Mon, Dec 28, 2009 at 9:55 AM, Stephen Turner  wrote:
>
> On Mon, 28 Dec 2009 07:38:38 -0500, Jim Collings 
> wrote:
>
>> I'm having some trouble finding things due to some arcane code.  Was
>> wondering if anyone could provide me with an example of dumping the
>> valuestack to the jsp so that I can take a look?
>>
>>
>> Jim C.
>>
>> P.S. I've probably asked this before but I can't seem to find it via
>> searching. Reminder anyone?
>
> Jim,
>
> Adding debug=xml to the URL will show the value stack as XML. I think you
> need to have struts.devMode=true set in the struts config as well.
>
> Steve
>
>
> --
> Stephen Turner
> Senior Programmer/Analyst - SAIS
> MIT IS&T
>
> -
> 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: Distinguish between request parameters and struts.xml parameters in Struts2

2010-01-13 Thread Musachy Barroso
No way to distinguish, that I know off. But the static params
interceptor has a setting to not merge them.

On Mon, Jan 11, 2010 at 7:54 PM, Jose Luis Martinez Avial
 wrote:
> Hi all,
>  I'm trying to distinguish the parameters that come from the request
> from those that come from the params defined in the struts.xml. For
> example, I have the following mapping in my struts.xml
>
>        
>            my resource
>            /example/Login.jsp
>            Menu
>        
>
> The call to that action will have a variable number of parameters, so I
> want to distinguish between them and the parameter defined in the
> struts.xml. How can I do that? In Struts 1 I was able to use the tag
> , and since the action was separated from the form, there
> was no problem, but in Struts2 that is no longer possible. Any ideas?
>
> Thanks
>
> Jose Luis
>
>
> Internet communications are not secure and therefore Banco
> Santander International does not accept legal responsibility for
> the contents of this message. Any views or opinions presented
> are
> solely those of the author and do not necessarily represent those
> of Banco Santander International unless otherwise specifically
> stated.
>
> Las comunicaciones via Internet no son seguras y por lo tanto
> Banco Santander International no asume responsabilidad legal
> ni
> de ningun otro tipo por el contenido de este mensaje. Cualquier
> opinion transmitida pertenece unicamente al autor y no
> necesariamente representa la opinion del Banco Santander
> International a no ser que este expresamente detallado.
>
>

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



Re: Distinguish between request parameters and struts.xml parameters in Struts2

2010-01-13 Thread Musachy Barroso
well, I meant built in :)

On Wed, Jan 13, 2010 at 2:17 PM, Dale Newfield  wrote:
> Musachy Barroso wrote:
>>
>> No way to distinguish, that I know off.
>
> Perhaps simply inserting a custom interceptor between params and
> actionMappingParams/staticParams so you can track which are set before the
> custom interceptor runs and which are set afterwards?
>
> -Dale
>
> -
> 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 2 Tags / Freemarker performance

2010-01-14 Thread Musachy Barroso
I would expect that, FreeMarker templates(+ struts code) will always
be slower than java code. If you are using the simple tags, give a try
to the Java Tags:

http://cwiki.apache.org/S2PLUGINS/java-templates-plugin.html

musachy

On Thu, Jan 14, 2010 at 4:48 PM, Mark Greene  wrote:
> I've been evaluating struts 2.1.8.1 and have found some troubling
> performance bottlenecks relating to the struts tag and freemarker. I have a
> JSP that has 7 struts2 tags in it. (A simple signup form)
>
> I noticed in my load testing that the throughput of this page was 4-5 times
> slower under load (100 concurrent threads) than a JSP page with no struts2
> tags on it. I cracked open my profiler and noticed the majority of the time
> spent in a page request was within freemarker. I uploaded a screen shot from
> my profiler here : http://tinypic.com/r/20johet/6 . I've seen a lot of
> discussion on the mailing lists about performance related issues and the
> recommendations that came along with them to address it. I believe I've done
> everything I can to tune this simple page. I would appreciate any feedback
> if there is something I am missing. Or is this a known issue?
>
> struts.xml:
> 
> 
> 
>  
>  
> 
>  
> 
>  
> 
>  
> 
>
> 
> 
>  
>  />
>  
>
> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  dojo\..*
> 
>  
> 
>  cancel,delete,list
> 
>  
> input,back,cancel,browse
>  
> 
> 
>  
> 
>  
> 
> 
>  account.create
> 
>  
> 
>
>
>
> JSP Page (snippet):
>  
> 
>  Name
> 
>
> Email
> 
>
> Site Address
> 
>
> Password
>
>
> 
>
> Confirm Password
> 
>  
>
> 
> 
>

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



Re: Struts 2 Tags / Freemarker performance

2010-01-15 Thread Musachy Barroso
Not really, you can mix the tags using the "theme" attribute, not very
pretty, but that should work.

musachy

On Fri, Jan 15, 2010 at 10:27 AM, Dale Newfield  wrote:
> On Thu, Jan 14, 2010 at 8:00 PM, Musachy Barroso  wrote:
>> I would expect that, FreeMarker templates(+ struts code) will always
>> be slower than java code. If you are using the simple tags, give a try
>> to the Java Tags:
>>
>> http://cwiki.apache.org/S2PLUGINS/java-templates-plugin.html
>
> I assume this is an all-or-nothing change, right?  If I *mostly* use
> the simple theme, but have a handful of places I do not, I cannot
> benefit from this speedup?
>
> What about more complex tags like s:optiontransferselect?  With this
> plugin you cannot use these tags?
>
> -Dale
>
> -
> 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 2 Tags / Freemarker performance

2010-01-15 Thread Musachy Barroso
hum, I take it back, I shouldnt be making suggestions before trying
things out :). What I meant was that you could set the theme to
something else in individual tags, and that should work for that
specific tag, but I forgot about the 'struts.ui.templateSuffix'
setting. What you mentioned would be a very nice feature.

On Fri, Jan 15, 2010 at 10:40 AM, Dale Newfield  wrote:
> Musachy Barroso wrote:
>>
>> Not really, you can mix the tags using the "theme" attribute, not very
>> pretty, but that should work.
>
> Just to make sure I understand:  If I set
> , then any time a
> tag is being processed with the simple theme it'll use the java
> implementation, but for any tags not using that theme or not supported by
> that implementation will revert to the freemarker version?
>
> If so, that should be mentioned on
> http://struts.apache.org/2.x/docs/javatemplates-plugin.html and I think
> you'll get many more people adopting it :-)
>
> -Dale
>
>
> -
> 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: Struts2.1.8.1, s:push does not return s:property value

2010-01-18 Thread Musachy Barroso
The pushed object will be on the stack while the tag is evaluated (in
the tag body), and it will be popped after the end of the tag, so


  <--- will print 'not now john'


 <--will print whatever was in the top of
the stack, before the "push" tag was invoked

musachy

On Mon, Jan 18, 2010 at 12:55 PM, Emi Lu  wrote:
> Good afternoon,
>
> Struts2.1.8.1, the following push example
> http://www.vaannila.com/struts-2/struts-2-example/struts-2-push-tag-example1.html
>
> Title returns, but "s:push" never returns attributes such as "name" under
> artist. Does someone tries and knows the reason?
>
>
>   Album Title:       
>   
>   Artist Name:       
>
> Thanks a lot!
> --
> Lu Ying
>
>
>
> -
> 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: How to make json plugin see SMD methods ?

2009-04-02 Thread Musachy Barroso
use firebug to see if dojo is making a request to "url" to retrieve
the method signature.

musachy

On Thu, Apr 2, 2009 at 5:52 AM, boraldo  wrote:
>
> I use Struts 2 with json-plugin 0.33
>
> I have the following in my js:
>
>        dojo.require("dojo.rpc.*");
>        var service = new dojo.rpc.JsonService("${url}");
>        var defered = service.go();
>        defered.addCallback(callback);
>
>
> go is method in my action that corresponds to ${url} and annotated as
> @SMDMethod.
>
> But this leads to js error:
>
>        service.go is not a function
>
>
> What should I do ?
> --
> View this message in context: 
> http://www.nabble.com/How-to-make-json-plugin-see-SMD-methods---tp22844426p22844426.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>



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

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



Re: Mixing convention plugin and legacy action mappings

2009-04-03 Thread Musachy Barroso
Convention configuration just gets mixed with xml configuration, they
should not conflict. What kind of problem are you having?

musachy

On Fri, Apr 3, 2009 at 12:52 PM, Ryan Chichirico  wrote:
> We've recently migrated to Struts 2.1.6 and started looking into the
> convention plugin.  Since our application is far along the 2.0.x way of
> doing things it's difficult to make whole sale changes immediately.  We'd
> like to start introducing new features with the convention plugin and slowly
> adapt the other actions as we find time.
> Out of the box this didn't seem to work.  Has anyone tried doing this?
>
> Our struts.properties file has the following:
>
> struts.action.extension=action
> struts.ui.templateSuffix=ftl
>
> I've noticed that when I comment out the struts.action.extension then the
> convention plugin works fine with the new actions but all of our legacy
> *.action classes don't work.  Any tips would be greatly appreciated
>
> -Ryan
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Struts 2/Spring and @Required

2009-04-06 Thread Musachy Barroso
You should post your spring xml config file, it looks like some AOP
config is probably missing.

musachy

On Mon, Apr 6, 2009 at 2:34 PM, Timothy Orme
 wrote:
> Hello All,
>
>        One of the nice annotation features of spring is the ability to
> annotate injected fields with @Required so that you don't get null pointer
> exceptions. However, I can only seem to get this to work with my test cases
> (spring throws an error when a required field isn't set), but I can't get
> the same behavior on the startup of my struts 2 web app. Does anyone know if
> it's possible for the web-app to break when an @Required field isn't set at
> startup?
>
> Thanks,
> Tim
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: New maven convention archetype

2009-04-08 Thread Musachy Barroso
The archetype is generating the jsps in the wrong location, it is
missing the namespace in the patch. For example, if I enter
"actions.test" for the package, the jsp is generated as
WEB-INF/content/hello.jsp, it should be WEB-INF/content/test/hello.jsp

musachy

On Wed, Apr 8, 2009 at 8:56 AM, Lukasz Lenart
 wrote:
> Hi,
>
> Could someone try to test a new archetype which base on Convention
> plugin and tell why it isn't working as expected? Index action is not
> mapped and I18N is missing (properties files are where they should be
> :-( )
>
> mvn archetype:generate -DarchetypeCatalog=http://www.lenart.org.pl/maven/
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: New maven convention archetype

2009-04-08 Thread Musachy Barroso
no, that would just instruct convention to scan from that package
down, what you need to do (I have no idea how archetypes work), is to
get the package name, and substring from "actions.", replace "." by
"/" and that will be the path under WEB-INF/content. If you can't
determine were to put the files at runtime, then you can either 1)
don't let users pick the package, 2) use @Result annotations to
indicate where the results are (kind of defeating the purpose of using
Convention)

musachy

On Wed, Apr 8, 2009 at 10:24 AM, Lukasz Lenart
 wrote:
> 2009/4/8 Musachy Barroso :
>> The archetype is generating the jsps in the wrong location, it is
>> missing the namespace in the patch. For example, if I enter
>> "actions.test" for the package, the jsp is generated as
>> WEB-INF/content/hello.jsp, it should be WEB-INF/content/test/hello.jsp
>
> Archetype will setup actions.test as a basePackage in struts.xml, it
> should be ok then?
>
>  value="${package}"/>
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: New maven convention archetype

2009-04-08 Thread Musachy Barroso
lol. I hadn't thought of that, no package, no subdir required, clever ;)

musachy

On Wed, Apr 8, 2009 at 11:16 AM, Lukasz Lenart
 wrote:
> 2009/4/8 Musachy Barroso :
>> no, that would just instruct convention to scan from that package
>> down, what you need to do (I have no idea how archetypes work), is to
>> get the package name, and substring from "actions.", replace "." by
>> "/" and that will be the path under WEB-INF/content. If you can't
>> determine were to put the files at runtime, then you can either 1)
>> don't let users pick the package, 2) use @Result annotations to
>> indicate where the results are (kind of defeating the purpose of using
>> Convention)
>
> I found the solution, but this is weird. I just moved the classes to
> package named "actions" and it works!
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: struts2-showcase on OC4J

2009-04-08 Thread Musachy Barroso
I am sorry but that makes no sense.

musachy

On Wed, Apr 8, 2009 at 8:40 PM, Martin Gainty  wrote:
>
> //PrepareOperations.findActionMapping method contains this hardcoded lookup
> struts.actionMapping
>
> //PrepareInterceptor has this Action class mapping
>
> 
> class org.apache.struts2.dispatcher.mapper.ActionMapping
> showcase
> /
> 
>
> //so in your /WEB-INF/classes/struts-default.xml you would need to change
> //the action name to struts.actionMapping as here
>
>    
>
> 
>        
>            /example/HelloWorld.jsp
> 
>        
> Martin
> __
> Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>
>
>> Date: Wed, 8 Apr 2009 15:19:45 -0700
>> From: ruaspam...@gmail.com
>> To: user@struts.apache.org
>> Subject: Re: struts2-showcase on OC4J
>>
>>
>>
>>
>> Nils-Helge Garli wrote:
>> >
>> > And what does the application log say?
>> >
>> Here is the pertinent data from the logs:
>>
>> 09/04/08 18:04:41.468 struts2-showcase-2.1.6: Servlet error
>> java.lang.NullPointerException
>>     at
>> com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
>>     at
>> com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
>>     at
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
>>     at
>> org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
>>     at
>> com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
>>     at
>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
>>     at
>> org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
>>     at
>> org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.java:74)
>>     at
>> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:59)
>>     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
>> ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
>>     .java:621)
>>     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
>> ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
>>     .java:370)
>>     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
>> ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler
>>     .java:871)
>>     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
>> ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler
>>     .java:453)
>>     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
>> ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler
>>     .java:221)
>>     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
>> ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
>>     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
>> ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
>>     at
>> oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
>>     at
>> oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
>>     at
>> oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
>>     at
>> oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
>>     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
>> ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor
>>     .java:303)
>>     at java.lang.Thread.run(Thread.java:619)
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/struts2-showcase-on-OC4J-tp22957615p22960839.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> T

Re: struts2-showcase on OC4J

2009-04-08 Thread Musachy Barroso
This error you are getting, we have seen it with other containers, and
it should be fixed in trunk xwork  (you can build it yourself, or grab
a snapshot). Try setting this in your struts.xml file:



musachy

On Wed, Apr 8, 2009 at 6:19 PM, Mick_  wrote:
>
>
>
> Nils-Helge Garli wrote:
>>
>> And what does the application log say?
>>
> Here is the pertinent data from the logs:
>
> 09/04/08 18:04:41.468 struts2-showcase-2.1.6: Servlet error
> java.lang.NullPointerException
>    at
> com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
>    at
> com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
>    at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
>    at
> org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
>    at
> com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
>    at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
>    at
> org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
>    at
> org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.java:74)
>    at
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:59)
>    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
> ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
>    .java:621)
>    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
> ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
>    .java:370)
>    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
> ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler
>    .java:871)
>    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
> ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler
>    .java:453)
>    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
> ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler
>    .java:221)
>    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
> ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
>    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
> ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
>    at
> oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
>    at
> oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
>    at
> oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
>    at
> oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
>    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0)
> ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor
>    .java:303)
>    at java.lang.Thread.run(Thread.java:619)
>
> --
> View this message in context: 
> http://www.nabble.com/struts2-showcase-on-OC4J-tp22957615p22960839.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Problems using Struts2 on JBoss 5.0.1GA

2009-04-09 Thread Musachy Barroso
It is a known bug:

http://jira.opensymphony.com/browse/XW-669

musachy

On Thu, Apr 9, 2009 at 8:20 AM, Michael Obster  wrote:
> Hi,
>
> anybody here who have already a working struts2 application on JBoss
> 5.0.1 GA? I currently try to deploy one on the JBoss but got an error,
> which I attach as text file.
> I also saw a bug report in the JBoss tracker, but this doesn't help me
> to solve my problem, which is actually a show stopper. I need a solution.
>
> So any help is appreciated.
>
> Kind regards,
> Michael Obster
>
> 13:30:49,863 INFO  [StrutsSpringObjectFactory] ... initialized Struts-Spring 
> integration successfully
> 13:30:50,393 INFO  [ResolverUtil] Scanning for classes in 
> [/D:/server/jboss-5.0.1.GA/server/default/deploy/csi.war/WEB-INF/classes/vwg/audi/
> csi/ui/action/] matching criteria: 
> org.apache.struts2.config.classpathconfigurationprovide...@e8cc00
> 13:30:50,393 ERROR [ResolverUtil] Could not search jar file 
> 'D:\server\jboss-5.0.1.GA\server\default\deploy\csi.war\WEB-INF\classes\vwg\audi
> \csi\ui\action' for classes matching criteria: 
> org.apache.struts2.config.classpathconfigurationprovide...@e8cc00 due to an 
> IOException
> java.io.FileNotFoundException: 
> D:\server\jboss-5.0.1.GA\server\default\deploy\csi.war\WEB-INF\classes\vwg\audi\csi\ui\action
>  (Das System kan
> n den angegebenen Pfad nicht finden)
>        at java.io.FileInputStream.open(Native Method)
>        at java.io.FileInputStream.(FileInputStream.java:106)
>        at 
> com.opensymphony.xwork2.util.ResolverUtil.loadImplementationsInJar(ResolverUtil.java:341)
>        at 
> com.opensymphony.xwork2.util.ResolverUtil.findInPackage(ResolverUtil.java:288)
>        at 
> com.opensymphony.xwork2.util.ResolverUtil.find(ResolverUtil.java:240)
>        at 
> org.apache.struts2.config.ClasspathConfigurationProvider.loadPackages(ClasspathConfigurationProvider.java:234)
>        at 
> org.apache.struts2.config.ClasspathConfigurationProvider.loadPackages(ClasspathConfigurationProvider.java:402)
>        at 
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
>        at 
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
>        at 
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
>        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
>        at 
> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
>        at 
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)
>        at 
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
>        at 
> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:90)
>        at 
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)
>        at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)
>        at 
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:312)
>        at 
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
>        at 
> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>        at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
>        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:585)
>        at 
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
>        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
>        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>        at 
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
>        at 
> org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
>        at $Proxy36.start(Unknown Source)
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>



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

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



Re: Problems using Struts2 on JBoss 5.0.1GA

2009-04-09 Thread Musachy Barroso
You need to use the latest xwork (built it yourself), or grab it from
a snapshot. I think Lukasz is hosting it somewhere also.

musachy

On Thu, Apr 9, 2009 at 9:45 AM, Michael Obster  wrote:
> I know that, but is there no way to work around this bug?
>
> Michael
>
> Musachy Barroso schrieb:
>> It is a known bug:
>>
>> http://jira.opensymphony.com/browse/XW-669
>>
>> musachy
>>
>> On Thu, Apr 9, 2009 at 8:20 AM, Michael Obster  wrote:
>>> Hi,
>>>
>>> anybody here who have already a working struts2 application on JBoss
>>> 5.0.1 GA? I currently try to deploy one on the JBoss but got an error,
>>> which I attach as text file.
>>> I also saw a bug report in the JBoss tracker, but this doesn't help me
>>> to solve my problem, which is actually a show stopper. I need a solution.
>>>
>>> So any help is appreciated.
>>>
>>> Kind regards,
>>> Michael Obster
>>>
>>> 13:30:49,863 INFO  [StrutsSpringObjectFactory] ... initialized 
>>> Struts-Spring integration successfully
>>> 13:30:50,393 INFO  [ResolverUtil] Scanning for classes in 
>>> [/D:/server/jboss-5.0.1.GA/server/default/deploy/csi.war/WEB-INF/classes/vwg/audi/
>>> csi/ui/action/] matching criteria: 
>>> org.apache.struts2.config.classpathconfigurationprovide...@e8cc00
>>> 13:30:50,393 ERROR [ResolverUtil] Could not search jar file 
>>> 'D:\server\jboss-5.0.1.GA\server\default\deploy\csi.war\WEB-INF\classes\vwg\audi
>>> \csi\ui\action' for classes matching criteria: 
>>> org.apache.struts2.config.classpathconfigurationprovide...@e8cc00 due to an 
>>> IOException
>>> java.io.FileNotFoundException: 
>>> D:\server\jboss-5.0.1.GA\server\default\deploy\csi.war\WEB-INF\classes\vwg\audi\csi\ui\action
>>>  (Das System kan
>>> n den angegebenen Pfad nicht finden)
>>>        at java.io.FileInputStream.open(Native Method)
>>>        at java.io.FileInputStream.(FileInputStream.java:106)
>>>        at 
>>> com.opensymphony.xwork2.util.ResolverUtil.loadImplementationsInJar(ResolverUtil.java:341)
>>>        at 
>>> com.opensymphony.xwork2.util.ResolverUtil.findInPackage(ResolverUtil.java:288)
>>>        at 
>>> com.opensymphony.xwork2.util.ResolverUtil.find(ResolverUtil.java:240)
>>>        at 
>>> org.apache.struts2.config.ClasspathConfigurationProvider.loadPackages(ClasspathConfigurationProvider.java:234)
>>>        at 
>>> org.apache.struts2.config.ClasspathConfigurationProvider.loadPackages(ClasspathConfigurationProvider.java:402)
>>>        at 
>>> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
>>>        at 
>>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
>>>        at 
>>> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
>>>        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
>>>        at 
>>> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
>>>        at 
>>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)
>>>        at 
>>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
>>>        at 
>>> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:90)
>>>        at 
>>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)
>>>        at 
>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)
>>>        at 
>>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:312)
>>>        at 
>>> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
>>>        at 
>>> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>>>        at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>>>        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
>>>        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(

Re: Problems using Struts2 on JBoss 5.0.1GA

2009-04-09 Thread Musachy Barroso
Thanks for letting us know. (good work Lukasz)

musachy

On Thu, Apr 9, 2009 at 10:48 AM, Michael Obster  wrote:
> Thx. Problem is resolved ;-).
>
> Cheers,
> Michael
>
> Wes Wannemacher schrieb:
>> On Thursday 09 April 2009 09:54:40 Musachy Barroso wrote:
>>> You need to use the latest xwork (built it yourself), or grab it from
>>> a snapshot. I think Lukasz is hosting it somewhere also.
>>>
>>> musachy
>>>
>>
>> You can also download it here -
>> http://hudson.zones.apache.org/hudson/view/Struts/job/xwork2/lastBuild/com.opensymphony$xwork/
>>
>> -Wes
>>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: MissingDependenyException - logMissingProperties - what's that?

2009-04-09 Thread Musachy Barroso
That property is brand new and it is set by struts-core, you will need
to get the latest version of it, or build it.

musachy

On Thu, Apr 9, 2009 at 11:07 AM, Michael Obster  wrote:
> Hi,
>
> I've run into the next problem running struts2 on JBoss :-(. Does
> anybody of know this error? What does this error mean? It always happens
> when I render a JSP. Is this struts2 related?
> I don't understand what dependency is missing.
>
> Btw. the deployment has finished without an error.
>
> Kind regards,
> Michael Obster
>
> 17:00:11,932 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
> com.opensymphony.xwork2.inject.DependencyException: 
> com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No 
> mapping foun
> d for dependency [type=java.lang.String, name='logMissingProperties'] in 
> public void com.opensymphony.xwork2.ognl.OgnlValueStack.setLogMissi
> ngProperties(java.lang.String).
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:144)
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:113)
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:90)
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:71)
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:67)
>        at 
> com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
>        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>        at 
> com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
>        at 
> com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:483)
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl$6.call(ContainerImpl.java:523)
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl$6.call(ContainerImpl.java:521)
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
>        at 
> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:521)
>        at 
> com.opensymphony.xwork2.ognl.OgnlValueStackFactory.createValueStack(OgnlValueStackFactory.java:52)
>        at 
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:362)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at 
> org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:111)
>        at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at 
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
>        at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>        at 
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
>        at 
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
>        at 
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
>        at 
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
>        at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>        at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at 
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
>        at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
>        at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
>        at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
>        at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>       

Re: MissingDependenyException - logMissingProperties - what's that?

2009-04-09 Thread Musachy Barroso
by latest version, I meant, latest snapshot.

musachy

On Thu, Apr 9, 2009 at 11:55 AM, Musachy Barroso  wrote:
> That property is brand new and it is set by struts-core, you will need
> to get the latest version of it, or build it.
>
> musachy
>
> On Thu, Apr 9, 2009 at 11:07 AM, Michael Obster  wrote:
>> Hi,
>>
>> I've run into the next problem running struts2 on JBoss :-(. Does
>> anybody of know this error? What does this error mean? It always happens
>> when I render a JSP. Is this struts2 related?
>> I don't understand what dependency is missing.
>>
>> Btw. the deployment has finished without an error.
>>
>> Kind regards,
>> Michael Obster
>>
>> 17:00:11,932 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
>> com.opensymphony.xwork2.inject.DependencyException: 
>> com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No 
>> mapping foun
>> d for dependency [type=java.lang.String, name='logMissingProperties'] in 
>> public void com.opensymphony.xwork2.ognl.OgnlValueStack.setLogMissi
>> ngProperties(java.lang.String).
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:144)
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:113)
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:90)
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:71)
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:67)
>>        at 
>> com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
>>        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>>        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>>        at 
>> com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
>>        at 
>> com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:483)
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl$6.call(ContainerImpl.java:523)
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl$6.call(ContainerImpl.java:521)
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
>>        at 
>> com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:521)
>>        at 
>> com.opensymphony.xwork2.ognl.OgnlValueStackFactory.createValueStack(OgnlValueStackFactory.java:52)
>>        at 
>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:362)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>        at 
>> org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:111)
>>        at 
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>        at 
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>        at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
>>        at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>        at 
>> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
>>        at 
>> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
>>        at 
>> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
>>        at 
>> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
>>        at 
>> org.a

Re: [jira] (WW-2642) resolved on Websphere

2009-04-09 Thread Musachy Barroso
It would be great if you could create a wiki page that explains this
stuff. Thanks for the feedback/research.

musachy

On Thu, Apr 9, 2009 at 11:22 AM, Struts Two  wrote:
>
> For those of you who had problem running Struts 2.1.6 on WAS 6.1 as reported 
> in [jira] (WW-2642). The problem  has been resolved. Please refer to the 
> JIRA, I have posted details in there.
>
> regards
>
>
>      __
> Get the name you've always wanted @ymail.com or @rocketmail.com! Go to 
> http://ca.promos.yahoo.com/jacko/
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: MissingDependenyException - logMissingProperties - what's that?

2009-04-09 Thread Musachy Barroso
On Thu, Apr 9, 2009 at 12:23 PM, Michael Obster  wrote:
> Btw. can you tell when next release is planned?

I am sorry to say there is no such a thing in Struts 2 :), hopefully, soon.

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

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



Re: Struts 2 on Google App Engine for Java

2009-04-09 Thread Musachy Barroso
We were talking about it on the dev mailing list(Don said how to fix
that error):

http://www.nabble.com/Google-App-Engine-support--td22972179.html

musachy

On Thu, Apr 9, 2009 at 1:35 PM,   wrote:
> Yesterday, I attempted to construct and deploy a simple Struts 2 application 
> for the GAE/J and ran into problems. A Google engineer is aware of the issue 
> which involve Ognl security permissions and is hoping to find a workaround.  
> I thought the Struts 2 community would be interested in this. I keep posting 
> as this progresses.
>
> Thanks,
> Tim
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: [jira] (WW-2642) resolved on Websphere

2009-04-09 Thread Musachy Barroso
Details here: http://struts.apache.org/2.x/docs/editing-the-documentation.html,
basically, you need to fax a form and ask for rights in dev@ for
editing the wiki (after faxing the CLA)

musachy

On Thu, Apr 9, 2009 at 2:19 PM, Struts Two  wrote:
>
> Hi:
>
> Do I need to open an account to create a wiki page on struts, any 
> instructions/links on how to proceed is appreciated. There is also work in 
> progress to fix the issue of running struts on WAS 7.x and I would post as 
> soon as the issue is resovled.
>
> --- On Thu, 4/9/09, Musachy Barroso  wrote:
>
>> From: Musachy Barroso 
>> Subject: Re: [jira] (WW-2642) resolved on Websphere
>> To: "Struts Users Mailing List" 
>> Received: Thursday, April 9, 2009, 4:02 PM
>> It would be great if you could create
>> a wiki page that explains this
>> stuff. Thanks for the feedback/research.
>>
>> musachy
>>
>> On Thu, Apr 9, 2009 at 11:22 AM, Struts Two 
>> wrote:
>> >
>> > For those of you who had problem running Struts 2.1..6
>> on WAS 6.1 as reported in [jira] (WW-2642). The problem
>>  has been resolved. Please refer to the JIRA, I have posted
>> details in there.
>> >
>> > regards
>> >
>> >
>> >
>>  __
>> > Get the name you've always wanted @ymail.com or
>> @rocketmail.com! Go to http://ca.promos.yahoo.com/jacko/
>> >
>> >
>> >
>> -
>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > For additional commands, e-mail: user-h...@struts.apache.org
>> >
>> >
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink
>> Floyd
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>      __
> Looking for the perfect gift? Give the gift of Flickr!
>
> http://www.flickr.com/gift/
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Convention plugin with custom interceptor stack

2009-04-09 Thread Musachy Barroso
Hi Ryan

In Convention, as well as in XML, if you try to use an interceptor or
result outside the package where it is defined, you will get an error.
You interceptor is defined in your package, and your actions are
getting mapped in Convention into another package. To fix this you
need to either: make convention put your actions in the package where
the interceptor stack is defined (using @ParentPackage, or setting
"struts.convention.default.parent.package"), or if you really need
your actions to be on a different package, you can create a new one in
xml, that extends the one that contains the interceptor, and use
@ParentPackage to point to it.

does that make some sense?

musachy

On Thu, Apr 9, 2009 at 5:39 PM, Ryan Chichirico  wrote:
> Can someone help me understand how to use custom interceptors with the
> convention plugin?
>
> In my struts.xml I have:
>
>           
>               
>               
>               
>               
>               
>           
>
>
>
> Currently, we use a package via XML config and it works as expected:
>
>   
>       
>   
>
> But ideally we could use the convention plugin like this:
>
> @InterceptorRef("defaultAuthenticationStack")
> @Namespace("/account" )
> public class UserAccount extends ActionSupport
> {
> 
> }
>
> When trying to init the framework I see my struts.xml file get loaded but
> when the convention plugin tries to process the actions I get the following
> error:
> 2009-04-09 14:13:52,358 INFO  iders.XmlConfigurationProvider  - Parsing
> configuration file [struts-default.xml]
> 2009-04-09 14:13:52,600 INFO  iders.XmlConfigurationProvider  - Parsing
> configuration file [struts-plugin.xml]
> 2009-04-09 14:13:52,972 INFO  iders.XmlConfigurationProvider  - Parsing
> configuration file [struts.xml]
> 2009-04-09 14:13:53,174 INFO  spring.SpringObjectFactory      - Setting
> autowire strategy to name
> Caused by: Unable to find interceptor class referenced by ref-name
> defaultAuthenticationStack - [unknown location]
>   at
> com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:52)
>   at
> org.apache.struts2.convention.DefaultInterceptorMapBuilder.buildInterceptorList(DefaultInterceptorMapBuilder.java:99)
>   at
> org.apache.struts2.convention.DefaultInterceptorMapBuilder.build(DefaultInterceptorMapBuilder.java:90)
>   at
> org.apache.struts2.convention.DefaultInterceptorMapBuilder.build(DefaultInterceptorMapBuilder.java:68)
>   at
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.createActionConfig(PackageBasedActionConfigBuilder.java:676)
>   at
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildConfiguration(PackageBasedActionConfigBuilder.java:479)
>   at
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:278)
>   at
> org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:52)
>   at
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:200)
>   at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
>   ... 15 more
>
> I noticed on the convention-plugin page that there is a reference to using a
> default interceptor stack and a  custom interceptor but not a custom
> interceptor stack.  I assumed you could use either.
> @InterceptorRefs({
> @InterceptorRef("interceptor-1"),
> @InterceptorRef("defaultStack")
> })
> public class HelloWorld extends ActionSupport
> {}
>
>
> Ideas?
>
> Thanks
> -Ryan
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Struts upgrade notes?

2009-04-11 Thread Musachy Barroso
It seems like it is using an old version of xwork I would say.

musachy

On Sat, Apr 11, 2009 at 10:57 AM, Wendy Smoak  wrote:
> Is there a page on upgrading from 2.0 to 2.1, like we used to have
> here http://wiki.apache.org/struts/StrutsUpgrade ?  I looked on the
> new wiki and didn't find anything, nor does Google turn up anything
> useful.
>
> I tried just changing the version from 2.0.14 to 2.1.6 in the
> Continuum build, and the app won't start.  It's a minor version change
> so I don't expect it to be 100% backwards compatible.  What else needs
> to change?
>
> The Continuum log file looks fine, but Tomcat says
> Apr 11, 2009 7:27:00 AM org.apache.catalina.core.StandardContext start
> SEVERE: Error filterStart
> Apr 11, 2009 7:27:00 AM org.apache.catalina.core.StandardContext start
> SEVERE: Context [/continuum] startup failed due to previous errors
>
> In Jetty I see
> 2009-04-11 07:42:53.314::WARN:  failed struts-cleanup
> java.lang.NoClassDefFoundError:
> com/opensymphony/xwork2/util/logging/LoggerFactory
>        at 
> org.apache.struts2.dispatcher.ActionContextCleanUp.(ActionContextCleanUp.java:74)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>
> Thanks,
> --
> Wendy
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Struts upgrade notes?

2009-04-11 Thread Musachy Barroso
 I was afraid to suggest you might have something wrong in the pom ;)

musachy

On Sat, Apr 11, 2009 at 11:23 AM, Wendy Smoak  wrote:
> On Sat, Apr 11, 2009 at 8:12 AM, Musachy Barroso  wrote:
>> It seems like it is using an old version of xwork I would say.
>
> Looking in WEB-INF/lib, yes, it's using xwork-2.0.7.  Thanks!
>
> I'm not sure why we have that declared separately in the pom... seems
> like it should be a transitive dependency of struts-core.
>
> --
> Wendy
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Struts Action Issue

2009-04-13 Thread Musachy Barroso
That doesn't make any sense. That link is outdated (very) from the
webwork days. Forms can use either POST or GET.

@original poster: add breakpoints to the ParametersInterceptor and see
if your params are getting filtered out by it.

musachy

On Mon, Apr 13, 2009 at 4:18 PM, Martin Gainty  wrote:
>
> except webwork forms expect method="POST"
> http://cwiki.apache.org/WW/webwork-2-ui-tag-guide.html
> is there any specific reason why you need to implement with method="get"
>
> did you use the FieldExpression-Validator as suggested earlier?
>
> what are the specific errors you are seeing with either scenario
> please post relevant jsp/taglib configs/XML configurations and backend 
> Action/Interceptor code
>
> thks
> Martin
> __
> Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note 
> de déni et de confidentialité
> This message is confidential. If you should not be the intended receiver, 
> then we ask politely to report. Each unauthorized forwarding or manufacturing 
> of a copy is inadmissible. This message serves only for the exchange of 
> information and has no legal binding effect. Due to the easy manipulation of 
> emails we cannot take responsibility over the the contents.
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>
>
>> Date: Mon, 13 Apr 2009 11:56:42 -0700
>> From: rachan...@gmail.com
>> To: user@struts.apache.org
>> Subject: RE: Struts Action Issue
>>
>>
>> Hi,
>>
>> I followed the replies but could not resolve the issue. Another update I
>> have is this request is an Ajax.Request with method = 'get'.
>>
>> Can this cause any trouble? Changing get to post however does not help.
>> Please advise.
>>
>> Thanks!
>>
>> mgainty wrote:
>> >
>> >
>> > agree with Rommel
>> > a FieldValidationInterceptor would accomplish this objective
>> > http://struts.apache.org/2.0.14/docs/fieldexpression-validator.html
>> > HINT place validation logic in expression validator e.g.
>> >  Date: Thu, 9 Apr 2009 07:23:42 -0700
>> >> From: charlesmel1...@yahoo.com
>> >> Subject: Re: Struts Action Issue
>> >> To: user@struts.apache.org
>> >> CC: charlesmel1...@yahoo.com
>> >>
>> >> Riya,
>> >>
>> >> I'm sure that if you trace the request submission from JSP to your Action
>> >> class
>> >> by debugging it step by step you will find where the culprit will be. I
>> >> had one experience
>> >> before that took me hours to figure out whats wrong in our JSP page where
>> >> its not showing
>> >> block of data. After debugging step by step, the logic that checks for
>> >> the string to show the block of
>> >> data had a trailing empty character. That string was saved in the
>> >> database with the trailing space char.
>> >> and when we pulled it and check for the matching string, our JSP was
>> >> screwed up. So just a note
>> >> always trim the data(String) you push to your database.
>> >>
>> >> Goodluck on the debugging spree :).
>> >>
>> >> Rommel
>> >>
>> >>
>> >>
>> >> 
>> >> From: Muthu Velappan 
>> >> To: Struts Users Mailing List 
>> >> Sent: Thursday, April 9, 2009 5:49:38 AM
>> >> Subject: RE: Struts Action Issue
>> >>
>> >> Out of curiosity, I gave the same value in my application and tested, I
>> >> got
>> >> the exact junk back in my action not even a truncated one. So, please
>> >> check
>> >> whether ur action bypasses only this kind of string or even valid string
>> >> like "test" or "sample". If it doesn't show valid string then there is
>> >> problem with view file field name and action variable name. If valid
>> >> strings
>> >> are working fine and only this kind of string seems to be a problem then
>> >> please generate the issue in a small testcase and send it across.
>> >>
>> >> Thanks,
>> >> Muthu
>> >>
>> >> -Original Message-
>> >> From: riya [mailto:rachan...@gmail.com]
>> >> Sent: Thursday, April 09, 2009 2:33 AM
>> >> To: user@struts.apache.org
>> >> Subject: Struts Action Issue
>> >>
>> >>
>> >> Hi,
>> >>
>> >> Recently I observed that if in JSP input text I have entered special
>> >> characters, le

Re: AJAX Theme - text fields side-by-side

2009-04-14 Thread Musachy Barroso
You can extend one of the themes, or use the simple theme(very close
to plain html). There is no way to create a layout that will fit all
possible designs.

regards
musachy

On Tue, Apr 14, 2009 at 10:32 AM, Andre L DINIZ-POLITEC
 wrote:
> Hi All,
>
> I'd like to use the ajax theme to build my jsp forms and use those smart
> features like validation, autocomplete, etc.
>
> The problem is: how can put my "textfields" side-by-side?
>
> I know that I can use "simple" theme, but many nice features will be
> disabled. I can't believe that I have to extend a theme to do that.
>
> Those page layouts showed in "ShowCase" application are very very poor.
> How come?
>
> Thanks in advance,
>
> André.
>
>
> -
> This E-mail is confidential. It may also be legally
> privileged. If you are not the addressee you may not
> copy, forward, disclose or use any part of it. If
> you have received this message in error, please delete
> it and all copies from your system and notify the sender
> immediately by return E-mail.
> Internet communications cannot be guaranteed to be timely,
> secure, error or virus-free. The sender does not accept
> liability for any errors or omissions.
> "SAVE PAPER - THINK BEFORE YOU PRINT!"
>
> Esta mensagem pode conter informações confidenciais e/ou
> privilegiadas. Se você não for o destinatário ou a pessoa
> autorizada a recebê-la, não pode usar, copiar ou divulgar
> as informações nela contidas ou tomar qualquer ação baseada
> nelas. Se você recebeu esta mensagem por engano, por favor,
> avise imediatamente o remetente, e em seguida, apague-a.
> Comunicações pela Internet não podem ser garantidas quanto
> à segurança ou inexistência de erros ou de vírus.
> O remetente, por esta razão, não aceita responsabilidade por
> qualquer erro ou omissão no contexto da mensagem decorrente
> da transmissão via Internet.
> "ECONOMIZE PAPEL - PENSE ANTES DE IMPRIMIR!"



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

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



Re: When using jsp:include or s:include in a JSP page the next Struts 2 tags will throw java.lang.NullPointerException on WebLogic 10.3

2009-04-15 Thread Musachy Barroso
is this a plain application or are you using Sitemesh or Tiles?

musachy

2009/4/15 Néstor Boscán :
> When using jsp:include or s:include in a JSP page the next Struts 2 tags
> will throw:
>
>
>
>  java.lang.NullPointerException
>
>      at
>
>  org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentT
>
>  agSupport.java:50) This happens with WebLogic 10.3 but doesn't happen
>
>  in OC4J 10.1.3.4.
>
>
>
> on Oracle WebLogic 10.3. It works on OC4J 10.1.3 and Tomcat 5.
>
>
>
> I created a simple project with an Action and two JSP pages and the problem
> reproduces.
>
>
>
> Regards,
>
>
>
> Néstor Boscán
>
>



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

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



Re: When using jsp:include or s:include in a JSP page the next Struts 2 tags will throw java.lang.NullPointerException on WebLogic 10.3

2009-04-15 Thread Musachy Barroso
can you post your filter config? I cannot test on weblogic, but maybe
someone else can.

musachy

2009/4/15 Néstor Boscán :
> Plain vanilla application. Just the Filter, an Action, two JSPs, and the
> struts tags.
> Regards,
>
> Néstor Boscán
>
> On Wed, Apr 15, 2009 at 4:46 PM, Musachy Barroso  wrote:
>
>> is this a plain application or are you using Sitemesh or Tiles?
>>
>> musachy
>>
>> 2009/4/15 Néstor Boscán :
>> > When using jsp:include or s:include in a JSP page the next Struts 2 tags
>> > will throw:
>> >
>> >
>> >
>> >  java.lang.NullPointerException
>> >
>> >      at
>> >
>> >  org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentT
>> >
>> >  agSupport.java:50) This happens with WebLogic 10.3 but doesn't happen
>> >
>> >  in OC4J 10.1.3.4.
>> >
>> >
>> >
>> > on Oracle WebLogic 10.3. It works on OC4J 10.1.3 and Tomcat 5.
>> >
>> >
>> >
>> > I created a simple project with an Action and two JSP pages and the
>> problem
>> > reproduces.
>> >
>> >
>> >
>> > Regards,
>> >
>> >
>> >
>> > Néstor Boscán
>> >
>> >
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>



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

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



Re: recipes for 2.0.x?

2009-04-17 Thread Musachy Barroso
I am not sure it is related, but make sure "showLoadingText" is set to
false, for that causes all kind of problems in IE. if you are still in
development, hear *biased* advice and don't use the Dojo based tags :)

musachy

On Fri, Apr 17, 2009 at 1:37 PM, mitch gorman  wrote:
>    is there still a v2.0.x-specific recipes page, anywhere?  (i'm still
> in dev-crunch mode, and can't take the hit to upgrade to v2.1.x, yet.)
> my issue isn't truly a struts problem, per se, but i thought i might
> find some help in debugging it in a 2.0-specific recipes page...
>
>
>    specifically, i'm trying to update a div via ajax.  it works in FF3,
> but not IE7.  i've put a notifyTopics="/change" on the button that
> triggers the update, and i'm subscribing to the topic with the following
> function:
>
>        
>            dojo.event.topic.subscribe("/change", function(a, b, c){
>                alert(b);
>                alert(dump(a));
>                alert(dump(c));
>            });
>        
>
>    i capture a before event, with a equal to "change" and c equal to
> 'cancel' with the value "false".  then i get the load event, with object
> a containing the output from the JSP i'm trying to load as a string. (c
> is not defined in either IE7 or FF3, yet it does seem to have a value in
> both chrome and safari - bizarre!)
>
>    then, in IE7, i catch an error event, and the dump of object a shows
> the following:
> 'message' => "XMLHttpTransport.watchInFlight Error: [object Error]"
> 'type' => "unknown"
> 'number' => "0"
>
>    i do *not* get that error event in FF3 (or chrome, or safari,
> although chrome doesn't handle things correctly, either).  what i need
> is to find out more details about that ajax error object, but i don't
> know how to access it.
>
>    anyone have any ideas how i can proceed with my debugging?
>
>    TIA.
>
> --
> Mitch Gorman
> mgor...@shadowtv.com
> (215) 764-6310
> Skype: mitch.shadowtv.com
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: recipes for 2.0.x?

2009-04-17 Thread Musachy Barroso
I am not sure what the status of the DWR plugin is, but I don't think
it has changed much. The DWR plugin just hooks DWR with Struts 2,
nothing more, you will be using DWR out of the box, without magic
tags.

musachy

On Fri, Apr 17, 2009 at 3:56 PM, mitch gorman  wrote:
> Musachy Barroso wrote:
>> I am not sure it is related, but make sure "showLoadingText" is set to
>> false, for that causes all kind of problems in IE. if you are still in
>> development, hear *biased* advice and don't use the Dojo based tags :)
>>
>
>    yeah, i learned that lesson already.  ;)  i did come across
> something two interesting things, although neither of them really fit my
> situation or helped much.  one of them was that IE apparently doesn't
> like it if you try to update a *part* of a table, like a single  or
> something.  a  is probably okay, but anything more granular it
> doesn't seem to like.
> (https://issues.apache.org/jira/browse/TAPESTRY-1217;  i am shipping
> down a complete table, but i've done that in other situations without a
> problem.)
>
>    the other is that turning off dojo compression may help.
> (http://www.dojoforum.com/node/6529)  this, of course, doesn't apply in
> 2.0.14, since that's not even a valid  attribute (S:head, not
> SX:head).  this page, though, did clue me in to try/catch in JS (i'm
> definitely not a JS wiz, obviously), which at least let me know that my
> own dump() function (lifted from the web; JS dump references listed
> below) was throwing an error.  when i wrapped the guts of my dump()
> function in the try/catch, i was then able to see that it was
> encountering an error when attempting to dump the "c" object in a couple
> places.  that object is basically the XMLHttpRequest object
> (http://www.w3schools.com/ajax/ajax_xmlhttprequest.asp).
>
>    as for dumping javascript objects, the simple solution, which my
> original function was a modification of, is at
> http://weblogs.asp.net/skillet/archive/2006/03/23/440940.aspx.  a more
> complex dump() function, a "port" of the Cold Fusion  tag, is at
> http://www.netgrow.com.au/files/javascript_dump.cfm .  that's what i'm
> trying to make use of, now.
>
>    dave, i saw your response, too.  i looked at the 2.0.14, 2.0.11, and
> even 2.0.8 recipes page, and they all had the newer  tags,
> specifically the .  i really do wish i had access to that
> sx:bind for what i'm doing... would've made so many things i've
> done/tried to do in this app *so* much easier...
>
>    musachy, going back to your (moderately biased) advice... before i
> started my current job, i was doing some work with DWR v2.0 (even made
> some small contributions to the project).  i know there's a dwr
> plugin... would that cover everything i'm currently using the dojo tags
> for?  would that be my best bet for a replacement, once i do finally get
> time to migrate to struts v2.1.x?
>
>
> --
> Mitch Gorman
> mgor...@shadowtv.com
> (215) 764-6310
> Skype: mitch.shadowtv.com
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Struts 2.1.6 - Alternative Template Engines - JSP

2009-04-28 Thread Musachy Barroso
The template engines just process certain types of templates(ftl, vm,
jsp, etc), but are not(directly) related to tags. The tags need to
output something, what you use to generate the output is up to you,
the struts tags use freemarker, but the javatemplates plugin uses
plain java, for example.

musachy

On Tue, Apr 28, 2009 at 3:06 AM, Kishan G. Chellap Paandy
 wrote:
> Hi,
>
> I'm using Struts 2.1.6.
>
> I'm developing custom Struts 2.1.6 tags.
>
> I want to use org.apache.struts2.components.template.JspTemplateEngine.
>
> The framework supports three template engines, which can be controlled
> by the struts.ui.templateSuffix in struts.properties.
>
> If I set the above, does all the struts2 tags and the custom tags I'm
> developing will use the JSPTemplateEngine?
>
> I want to use JSPTemplateEngine only for some custom tags I'm developing
> and I will use FreemarkerTemplateEngine for some other custom tags. Is
> this possible?
>
> Thank you.
> Regards,
> Kishan.G
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Struts 2.1.6 - Alternative Template Engines - JSP

2009-04-29 Thread Musachy Barroso
it sets the engine used by the tags.

musachy

On Wed, Apr 29, 2009 at 1:27 AM, Kishan G. Chellap Paandy
 wrote:
> Hi Musachy,
>
> Thanks for your reply.
>
> I was wondering what is the significance of struts.ui.templateSuffix is?
>
> Please advice.
>
> Thank you.
> Regards,
> Kishan.G
>
> Senior Software Engineer.
> www.spansystems.com
>
>
>
> -Original Message-
> From: Musachy Barroso [mailto:musa...@gmail.com]
> Sent: Tuesday, April 28, 2009 6:37 PM
> To: Struts Users Mailing List
> Subject: Re: Struts 2.1.6 - Alternative Template Engines - JSP
>
> The template engines just process certain types of templates(ftl, vm,
> jsp, etc), but are not(directly) related to tags. The tags need to
> output something, what you use to generate the output is up to you,
> the struts tags use freemarker, but the javatemplates plugin uses
> plain java, for example.
>
> musachy
>
> On Tue, Apr 28, 2009 at 3:06 AM, Kishan G. Chellap Paandy
>  wrote:
>> Hi,
>>
>> I'm using Struts 2.1.6.
>>
>> I'm developing custom Struts 2.1.6 tags.
>>
>> I want to use
> org.apache.struts2.components.template.JspTemplateEngine.
>>
>> The framework supports three template engines, which can be controlled
>> by the struts.ui.templateSuffix in struts.properties.
>>
>> If I set the above, does all the struts2 tags and the custom tags I'm
>> developing will use the JSPTemplateEngine?
>>
>> I want to use JSPTemplateEngine only for some custom tags I'm
> developing
>> and I will use FreemarkerTemplateEngine for some other custom tags. Is
>> this possible?
>>
>> Thank you.
>> Regards,
>> Kishan.G
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> -
> 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
>
>



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

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



Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Musachy Barroso
It could be a conflict with JUEL which uses "#", try the other
notation (I think you can disable JUEL somewhere):

#...@java.util.linkedhashmap@{ "foo" : "foo value", "bar" : "bar value" }

musachy

On Wed, Apr 29, 2009 at 3:33 PM, Griffith, Michael *
 wrote:
> Hello all,
>
> It seems as if I am always at odds with trying to figure out the correct
> OGNL syntax.  I have a Map in the HttpSession, and I'm
> trying to use one of the values in the map as an anchor tag in a link.
>
> The map is stored in the session as an attribute named
> genieProperties...
>
> None of these expressions work...
>
> 
> 
> 
> 
>
> Am I at least close? Any assistance would be appreciated.
>
> Best Regards,
> MG
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Musachy Barroso
Actually the name is Unified Expression Language, JUEL is just an
implementation of it.

musachy

On Thu, Apr 30, 2009 at 9:06 AM, Musachy Barroso  wrote:
> It could be a conflict with JUEL which uses "#", try the other
> notation (I think you can disable JUEL somewhere):
>
> #...@java.util.linkedhashmap@{ "foo" : "foo value", "bar" : "bar value" }
>
> musachy
>
> On Wed, Apr 29, 2009 at 3:33 PM, Griffith, Michael *
>  wrote:
>> Hello all,
>>
>> It seems as if I am always at odds with trying to figure out the correct
>> OGNL syntax.  I have a Map in the HttpSession, and I'm
>> trying to use one of the values in the map as an anchor tag in a link.
>>
>> The map is stored in the session as an attribute named
>> genieProperties...
>>
>> None of these expressions work...
>>
>> 
>> 
>> 
>> 
>>
>> Am I at least close? Any assistance would be appreciated.
>>
>> Best Regards,
>> MG
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



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

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



Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Musachy Barroso
if you have the debugging interceptor applied to your action, you can
add debug=console to the url, and you will get a console where you can
type OGNL expressions, and see the result.

musachy

On Thu, Apr 30, 2009 at 10:40 AM, Griffith, Michael *
 wrote:
> Ding! Sorry I didn't see this reply earlier when I repeated how do I get
> the map value. Again, thanks Dave!  Is there such a thing as an OGNL
> expression validator? It would be nice to be able to fool around with
> the expression interactively until I am able to get to the correct
> expression.
>
> Cheers~
> MG
>
> -Original Message-
> From: Dale Newfield [mailto:d...@newfield.org]
> Sent: Thursday, April 30, 2009 9:07 AM
> To: Struts Users Mailing List
> Subject: Re: What is wrong with my with OGNL Map expression??
>
> Michael Griffith wrote:
>  > I have a Map in the HttpSession  > The map is stored
> in the session as an attribute named  > genieProperties...
>
> Kishan G. Chellap Paandy wrote:
>> Assuming there's an attribute with name 'mySessionAttribute' in the
>> Session scope 
>
> Which gets you half way there.  It gets you the Map.  To get the value
> you want from it, just call it's get method:
>
> 
>
> The %{} are often left out by people, but they're critical.  That's what
> says "this is an OGNL expression".  Musachy's response illustrates the
> potential confusion as to what EL you're using when it's not specified.
>
> -Dale
>
> -
> 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
>
>



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

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



Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Musachy Barroso
http://struts.apache.org/2.x/docs/debugginginterceptor.html

On Thu, Apr 30, 2009 at 10:48 AM, Musachy Barroso  wrote:
> if you have the debugging interceptor applied to your action, you can
> add debug=console to the url, and you will get a console where you can
> type OGNL expressions, and see the result.
>
> musachy
>
> On Thu, Apr 30, 2009 at 10:40 AM, Griffith, Michael *
>  wrote:
>> Ding! Sorry I didn't see this reply earlier when I repeated how do I get
>> the map value. Again, thanks Dave!  Is there such a thing as an OGNL
>> expression validator? It would be nice to be able to fool around with
>> the expression interactively until I am able to get to the correct
>> expression.
>>
>> Cheers~
>> MG
>>
>> -Original Message-
>> From: Dale Newfield [mailto:d...@newfield.org]
>> Sent: Thursday, April 30, 2009 9:07 AM
>> To: Struts Users Mailing List
>> Subject: Re: What is wrong with my with OGNL Map expression??
>>
>> Michael Griffith wrote:
>>  > I have a Map in the HttpSession  > The map is stored
>> in the session as an attribute named  > genieProperties...
>>
>> Kishan G. Chellap Paandy wrote:
>>> Assuming there's an attribute with name 'mySessionAttribute' in the
>>> Session scope 
>>
>> Which gets you half way there.  It gets you the Map.  To get the value
>> you want from it, just call it's get method:
>>
>> 
>>
>> The %{} are often left out by people, but they're critical.  That's what
>> says "this is an OGNL expression".  Musachy's response illustrates the
>> potential confusion as to what EL you're using when it's not specified.
>>
>> -Dale
>>
>> -
>> 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
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



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

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



Re: OGNL & DisplayTag = inappropriate expressions

2009-04-30 Thread Musachy Barroso
The parameters interceptor has an attribute (excludeParams), that can
take a list of regular expressions. Any param whose name matches on of
the regex, will be ignored. We should make a FAQ out of this question.

musachy

On Thu, Apr 30, 2009 at 3:47 PM, Andy Sykes  wrote:
> Hi all,
>
> Is there a way to prevent OGNL from analysing GET parameters as expressions?
>
> Reason for asking:
>
> DisplayTag generates URLs like this: action?d-49653-p=2
>
> I'm getting tons of errors in the log, where it looks like OGNL is trying to
> evaluate this as: (d minus 49653 minus p). Naturally, this makes it throw
> ognl.InappropriateExpressionException any time a user loads a page with a
> DisplayTag table in it, which is incredibly annoying.
>
> Thoughts?
>
> Andy.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Using Expression Language (EL) To Access ActionSupport Class Properties

2009-05-04 Thread Musachy Barroso
using EL to access the stack/action is fine.

musachy

On Mon, May 4, 2009 at 3:48 PM, phillips1021  wrote:
>
> Martin thank you for the reply.
>
> Your idea:
>
> 
> 
>
> does not work with the JSecurity hasAnyRoles tag. The Struts 2 property tag
> and OGNL expresson do not work when placed as the value for the name
> attribute of the above tag.
>
> Since I could not get a Struts 2 tag or OGNL expression to work for the name
> attribute in the JSecurity hasAnyRoles tag, I used  expression language,
> which did work.
>
> I'm trying to determine if using EL to access a property of the
> ActionSupport class is OK in Struts 2.
>
> Thanks again for the suggestions.
>
> Bruce
>
> --
> View this message in context: 
> http://www.nabble.com/Using-Expression-Language-%28EL%29-To-Access-ActionSupport-Class-Properties-tp23373477p23375317.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: IllegalArgumentException using struts2-convention-plugin-2.1.6.jar on JBoss

2009-05-07 Thread Musachy Barroso
to add to what Lukasz said, don't rely too much on the reloading class
loader which is experimental, there is a flag to disable it, check the
docs.

musachy

On Thu, May 7, 2009 at 8:42 AM, Lukasz Lenart
 wrote:
> Could you try to use the latest snapshot build?
> http://people.apache.org/builds/struts/nightlies/2.x/
>
> If that doesn't help, please register an issue with Jira, JBoss 5
> introduced new virtual file system and that the origin of problems
> https://issues.apache.org/struts/browse/
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Problems setting attributes on my Action using Restful2ActionMapper

2009-05-08 Thread Musachy Barroso
That part has always lacked good documentation. I have never used
myself so I have no idea how it works. You can submit a CLA and get
edit right to the wiki.

musachy

On Fri, May 8, 2009 at 1:00 PM, David Rocks  wrote:
>
> Hi,
>
>
>
> managed to get this kind of working although I am constrained to callin in my 
> action the the names of the methods hard coded in the Restful2ActionMapper 
> class.
>
>
>
> Firstly I have to set...
>
>
>
> struts.mapper.alwaysSelectFullNamespace=false
> struts.mapper.idParameterName=entityName  <-- the name of the parameter to be 
> set in the action class
>
>
>
> Also the documentation is wrong, it is not
>
>
>
>  http://HOST/ACTION_NAME/PARAM_NAME1/PARAM_VALUE1/PARAM_NAME2/PARAM_VALUE2
>
>
>
> but
>
>
>
>  http://HOST/PARAM_NAME2/PARAM_VALUE2/ACTION_NAME/PARAM_VALUE1
>
>
>
> In the ACTION_NAME part I cannot set the action and the method name, i just 
> have to set the action name and it picks up the view method.
>
>
>
> so it has to be
>
>
>
> http://127.0.0.1:8080/myApp/region/England -> that goes to view and puts the 
> value of england into entityName  as shown above
>
>
>
> I cannot force it to go to a get method like
>
>
>
> http://127.0.0.1:8080/myApp/region/get/England   -> which calls get and sets 
> entityName
>
>
>
> I would be quite happy to set @action( "region/get" ) on my action method.
>
>
>
> So the docs could be updated and if someone knows how to set the method and 
> action name in a rest URL using Restful2ActionMapper  then I am all ears.
>
>
>
> Thanks
>
>
>
> David
>
>
>
>
>> From: rocks_da...@hotmail.com
>> To: user@struts.apache.org
>> Subject: Problems setting attributes on my Action using Restful2ActionMapper
>> Date: Thu, 7 May 2009 15:40:30 +
>>
>>
>> Hi,
>>
>>
>> I am trying to work out how populate attributes on using 
>> Restful2ActionMapper but I think I am missing something in my configuration 
>> and wondered if someone could give me some advice.
>>
>>
>> My struts file is
>>
>>
>> 
>> 
>> 
>> 
>> 
>>
>>
>> 
>>
>>
>> 
>> {0}
>> 
>> 
>>
>>
>> My action
>>
>> package com.action ;
>>
>> @Results({
>> @Result(name="get", location="region/displayRegion.jsp")
>> })
>> public class RegionAction extends ActionSupport {
>>
>>
>> private String name ;
>> private int id ;
>>
>>
>> public String get(){
>> …..
>> return "get" ;
>> }
>>
>>
>> // name & id getters and setters …...
>> }
>>
>>
>> I am trying to get the URL into the state like as the documentation claims 
>> it can handle
>>
>>
>> http://HOST/ACTION_NAME/PARAM_NAME1/PARAM_VALUE1/PARAM_NAME2/PARAM_VALUE2
>>
>>
>> So My URL would be like...
>>
>>
>> http://127.0.0.1:8080/region/name/Mexico/id/2
>>
>>
>> But that is not working out. Is there something I have missed?
>>
>>
>> Many thanks
>>
>>
>> _
>> Hotmail® has a new way to see what's up with your friends.
>> http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
>
> _
> Hotmail® has a new way to see what's up with your friends.
> http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009



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

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



Re: Problems setting attributes on my Action using Restful2ActionMapper

2009-05-08 Thread Musachy Barroso
Take a look here:
http://struts.apache.org/2.x/docs/editing-the-documentation.html, the
CLA is a form that you need to fax, after that, drop an email in the
dev@ user list asking for rights to edit the wiki.

musachy

On Fri, May 8, 2009 at 3:43 PM, David Rocks  wrote:
>
> The documentation was pretty misleading, I wasted a few hours just chasing 
> stuff on the web, in the end it came down to just stepping through the code.
>
>
>
> I tried to get the convention plugin working first but could not work out how 
> to get that to work with my application although I never looked at the code 
> for that.
>
>
>
> I am surprised that the REST stuff is quite low key with struts2, or that is 
> the way it seems to me, it really is a make or break for my application/site 
> as the URLs will need to get favourably viewed by google for it to work out.
>
>
>
> I am quite happy to knock up a small test app and write a doc on this for the 
> WIKI. Can I just apply for a 'CLA'?
>
>
>
> David
>
>
>
>
>
>> Date: Fri, 8 May 2009 14:13:02 -0400
>> Subject: Re: Problems setting attributes on my Action using 
>> Restful2ActionMapper
>> From: musa...@gmail.com
>> To: user@struts.apache.org
>>
>> That part has always lacked good documentation. I have never used
>> myself so I have no idea how it works. You can submit a CLA and get
>> edit right to the wiki.
>>
>> musachy
>>
>> On Fri, May 8, 2009 at 1:00 PM, David Rocks  wrote:
>> >
>> > Hi,
>> >
>> >
>> >
>> > managed to get this kind of working although I am constrained to callin in 
>> > my action the the names of the methods hard coded in the 
>> > Restful2ActionMapper class.
>> >
>> >
>> >
>> > Firstly I have to set...
>> >
>> >
>> >
>> > struts.mapper.alwaysSelectFullNamespace=false
>> > struts.mapper.idParameterName=entityName  <-- the name of the parameter to 
>> > be set in the action class
>> >
>> >
>> >
>> > Also the documentation is wrong, it is not
>> >
>> >
>> >
>> >  http://HOST/ACTION_NAME/PARAM_NAME1/PARAM_VALUE1/PARAM_NAME2/PARAM_VALUE2
>> >
>> >
>> >
>> > but
>> >
>> >
>> >
>> >  http://HOST/PARAM_NAME2/PARAM_VALUE2/ACTION_NAME/PARAM_VALUE1
>> >
>> >
>> >
>> > In the ACTION_NAME part I cannot set the action and the method name, i 
>> > just have to set the action name and it picks up the view method.
>> >
>> >
>> >
>> > so it has to be
>> >
>> >
>> >
>> > http://127.0.0.1:8080/myApp/region/England -> that goes to view and puts 
>> > the value of england into entityName  as shown above
>> >
>> >
>> >
>> > I cannot force it to go to a get method like
>> >
>> >
>> >
>> > http://127.0.0.1:8080/myApp/region/get/England   -> which calls get and 
>> > sets entityName
>> >
>> >
>> >
>> > I would be quite happy to set @action( "region/get" ) on my action method.
>> >
>> >
>> >
>> > So the docs could be updated and if someone knows how to set the method 
>> > and action name in a rest URL using Restful2ActionMapper  then I am all 
>> > ears.
>> >
>> >
>> >
>> > Thanks
>> >
>> >
>> >
>> > David
>> >
>> >
>> >
>> >
>> >> From: rocks_da...@hotmail.com
>> >> To: user@struts.apache.org
>> >> Subject: Problems setting attributes on my Action using 
>> >> Restful2ActionMapper
>> >> Date: Thu, 7 May 2009 15:40:30 +
>> >>
>> >>
>> >> Hi,
>> >>
>> >>
>> >> I am trying to work out how populate attributes on using 
>> >> Restful2ActionMapper but I think I am missing something in my 
>> >> configuration and wondered if someone could give me some advice.
>> >>
>> >>
>> >> My struts file is
>> >>
>> >>
>> >> 
>> >> 
>> >> 
>> >> 
>> >> 
>> >>
>> >>
>> >> 
>> >>
>> >>
>> >> 
>> >> {0}
>> >> 
>> >> 
>> >>
>> >>
>> >> My action
>> >>
>> >> package com.action ;
>> >>
>> >> @Results({
>> >> @Result(name="get", location="region/displayRegion.jsp")
>> >> })
>> >> public class RegionAction extends ActionSupport {
>> >>
>> >>
>> >> private String name ;
>> >> private int id ;
>> >>
>> >>
>> >> public String get(){
>> >> …..
>> >> return "get" ;
>> >> }
>> >>
>> >>
>> >> // name & id getters and setters …...
>> >> }
>> >>
>> >>
>> >> I am trying to get the URL into the state like as the documentation 
>> >> claims it can handle
>> >>
>> >>
>> >> http://HOST/ACTION_NAME/PARAM_NAME1/PARAM_VALUE1/PARAM_NAME2/PARAM_VALUE2
>> >>
>> >>
>> >> So My URL would be like...
>> >>
>> >>
>> >> http://127.0.0.1:8080/region/name/Mexico/id/2
>> >>
>> >>
>> >> But that is not working out. Is there something I have missed?
>> >>
>> >>
>> >> Many thanks
>> >>
>> >>
>> >> _
>> >> Hotmail® has a new way to see what's up with your friends.
>> >> http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
>> >
>> > _
>> > Hotmail® has a new way to see what's up with your friends.
>> > http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floy

Re: Problems setting attributes on my Action using Restful2ActionMapper

2009-05-08 Thread Musachy Barroso
On Fri, May 8, 2009 at 5:52 PM, David Rocks  wrote:
> Anyway it's 11pm. Pizza and beer time.

now that, sounds good :)

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

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



Re: Retrieving instance of XWorkConverter in 2.1.x

2009-05-11 Thread Musachy Barroso
If your action is instantiated by the default object factory, do this:

@Inject
public void setConverter(XWorkConverter converter) {.}

if you are using a different object factory (I think injection still
happens with the Spring factory, but I am not 100% sure):

Dispatcher.getInstance().getContainer().getInstance(XWorkConverter.class)

as always, use at your own risk, internal "API" changes without notice.

musachy

On Mon, May 11, 2009 at 10:18 AM, Bob Jacoby  wrote:
> XWorkConverter



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

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



Re: Removing default mappings in Convention plugin [SEC=UNCLASSIFIED]

2009-05-12 Thread Musachy Barroso
Right now there is no way, we could add a flag that check if there are
annotated methods, and prevents the mapping of "execute"

musachy

On Tue, May 12, 2009 at 8:58 AM, Dave Newton  wrote:
> Crombie, Joe - BRS wrote:
>>
>> Hi All,
>>  I'm currently switching to 2.1.6 and the Convention plugin for
>> configuration.   I tend to use POJOs for my Action classes, and map
>> actions to methods.
>> My problem is that when I extend ActionSupport, Convention generates a
>> default mapping to the execute method (which I generally don't provide).
>
> If you're extending ActionSupport there's an execute() method. (As well as
> input.)
>
> I'd think the easiest, quickest, dirtiest solution would just be to provide
> an execute() that either provides a "nocontents" result as you said or map
> it to something else in the action. Making it private might work, but I
> haven't tried it.
>
> Off the top of my head I don't know an easy way to not have some methods
> mapped.
>
> Dave
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Removing default mappings in Convention plugin [SEC=UNCLASSIFIED]

2009-05-12 Thread Musachy Barroso
https://issues.apache.org/struts/browse/WW-3123

On Tue, May 12, 2009 at 9:24 AM, Musachy Barroso  wrote:
> Right now there is no way, we could add a flag that check if there are
> annotated methods, and prevents the mapping of "execute"
>
> musachy
>
> On Tue, May 12, 2009 at 8:58 AM, Dave Newton  wrote:
>> Crombie, Joe - BRS wrote:
>>>
>>> Hi All,
>>>  I'm currently switching to 2.1.6 and the Convention plugin for
>>> configuration.   I tend to use POJOs for my Action classes, and map
>>> actions to methods.
>>> My problem is that when I extend ActionSupport, Convention generates a
>>> default mapping to the execute method (which I generally don't provide).
>>
>> If you're extending ActionSupport there's an execute() method. (As well as
>> input.)
>>
>> I'd think the easiest, quickest, dirtiest solution would just be to provide
>> an execute() that either provides a "nocontents" result as you said or map
>> it to something else in the action. Making it private might work, but I
>> haven't tried it.
>>
>> Off the top of my head I don't know an easy way to not have some methods
>> mapped.
>>
>> Dave
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



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

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



Re: Removing default mappings in Convention plugin [SEC=UNCLASSIFIED]

2009-05-12 Thread Musachy Barroso
Fixed in svn trunk

musachy

On Tue, May 12, 2009 at 9:32 AM, Musachy Barroso  wrote:
> https://issues.apache.org/struts/browse/WW-3123
>
> On Tue, May 12, 2009 at 9:24 AM, Musachy Barroso  wrote:
>> Right now there is no way, we could add a flag that check if there are
>> annotated methods, and prevents the mapping of "execute"
>>
>> musachy
>>
>> On Tue, May 12, 2009 at 8:58 AM, Dave Newton  wrote:
>>> Crombie, Joe - BRS wrote:
>>>>
>>>> Hi All,
>>>>  I'm currently switching to 2.1.6 and the Convention plugin for
>>>> configuration.   I tend to use POJOs for my Action classes, and map
>>>> actions to methods.
>>>> My problem is that when I extend ActionSupport, Convention generates a
>>>> default mapping to the execute method (which I generally don't provide).
>>>
>>> If you're extending ActionSupport there's an execute() method. (As well as
>>> input.)
>>>
>>> I'd think the easiest, quickest, dirtiest solution would just be to provide
>>> an execute() that either provides a "nocontents" result as you said or map
>>> it to something else in the action. Making it private might work, but I
>>> haven't tried it.
>>>
>>> Off the top of my head I don't know an easy way to not have some methods
>>> mapped.
>>>
>>> Dave
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



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

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



Re: Javatemplates plugin error in 2.1.7 with struts2-blank.war

2009-05-12 Thread Musachy Barroso
A patch was recently applied to the templates plugin, and maybe
something is broken. I will take a look, thanks for reporting.

musachy

On Tue, May 12, 2009 at 9:13 AM, Thomas Terrace  wrote:
> Has anyone else been able to use the java templates plugin
> successfully with 2.1.7? Using struts2-blank-2.1.7.war compiled from
> source yesterday, I dropped the javatemplates 2.1.7 jar into lib and
> added the following lines to struts.xml:
>
>
>
>     
>     
>
>
>  The error:
>
>
>
> SEVERE: Could not open template
> java.lang.RuntimeException: java.lang.RuntimeException:
> com.opensymphony.xwork2.inject.DependencyException:
> com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
> No mapping found for dependency [type=java.lang.String,
> name='struts.javatemplates.customThemes'] in public void
> org.apache.struts2.views.java.JavaTemplateEngine.setThemeClasses(java.lang.String).
>
>
> Following the same process with 2.1.6 works normally (tested on
> tomcat6 and weblogic 10.3).
> Any help is appreciated,
> Tom
>
> --
> Sent from my mobile device
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Javatemplates plugin error in 2.1.7 with struts2-blank.war

2009-05-12 Thread Musachy Barroso
yeah, it is broken: https://issues.apache.org/struts/browse/WW-3124

On Tue, May 12, 2009 at 9:51 AM, Musachy Barroso  wrote:
> A patch was recently applied to the templates plugin, and maybe
> something is broken. I will take a look, thanks for reporting.
>
> musachy
>
> On Tue, May 12, 2009 at 9:13 AM, Thomas Terrace  wrote:
>> Has anyone else been able to use the java templates plugin
>> successfully with 2.1.7? Using struts2-blank-2.1.7.war compiled from
>> source yesterday, I dropped the javatemplates 2.1.7 jar into lib and
>> added the following lines to struts.xml:
>>
>>
>>
>>     
>>     
>>
>>
>>  The error:
>>
>>
>>
>> SEVERE: Could not open template
>> java.lang.RuntimeException: java.lang.RuntimeException:
>> com.opensymphony.xwork2.inject.DependencyException:
>> com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
>> No mapping found for dependency [type=java.lang.String,
>> name='struts.javatemplates.customThemes'] in public void
>> org.apache.struts2.views.java.JavaTemplateEngine.setThemeClasses(java.lang.String).
>>
>>
>> Following the same process with 2.1.6 works normally (tested on
>> tomcat6 and weblogic 10.3).
>> Any help is appreciated,
>> Tom
>>
>> --
>> Sent from my mobile device
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



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

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



Re: Javatemplates plugin error in 2.1.7 with struts2-blank.war

2009-05-12 Thread Musachy Barroso
fixed in svn trunk. not big deal, the dependency is not required as it
is an extension point. Thanks for reporting!

musachy

On Tue, May 12, 2009 at 9:55 AM, Musachy Barroso  wrote:
> yeah, it is broken: https://issues.apache.org/struts/browse/WW-3124
>
> On Tue, May 12, 2009 at 9:51 AM, Musachy Barroso  wrote:
>> A patch was recently applied to the templates plugin, and maybe
>> something is broken. I will take a look, thanks for reporting.
>>
>> musachy
>>
>> On Tue, May 12, 2009 at 9:13 AM, Thomas Terrace  wrote:
>>> Has anyone else been able to use the java templates plugin
>>> successfully with 2.1.7? Using struts2-blank-2.1.7.war compiled from
>>> source yesterday, I dropped the javatemplates 2.1.7 jar into lib and
>>> added the following lines to struts.xml:
>>>
>>>
>>>
>>>     
>>>     
>>>
>>>
>>>  The error:
>>>
>>>
>>>
>>> SEVERE: Could not open template
>>> java.lang.RuntimeException: java.lang.RuntimeException:
>>> com.opensymphony.xwork2.inject.DependencyException:
>>> com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
>>> No mapping found for dependency [type=java.lang.String,
>>> name='struts.javatemplates.customThemes'] in public void
>>> org.apache.struts2.views.java.JavaTemplateEngine.setThemeClasses(java.lang.String).
>>>
>>>
>>> Following the same process with 2.1.6 works normally (tested on
>>> tomcat6 and weblogic 10.3).
>>> Any help is appreciated,
>>> Tom
>>>
>>> --
>>> Sent from my mobile device
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



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

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



Re: How do I get a request parameter

2009-05-13 Thread Musachy Barroso
don't forget that what is returned from #parameters['somename'] is an
array of values, so try: #parameters['somename'][0]

musachy

On Wed, May 13, 2009 at 3:57 PM, Wes Wannemacher  wrote:
> Well, parameters are available in the OGNL context through the named
> variable 'parameters.' So, you should be able to do one of -
>
> %{#parameters.someName}
> %{#parameters['someName']}
> %{parameters.someName}
> %{parameters['someName'}
> parameters.someName
> parameters['someName']
> #parameters.someName
> #parameters['someName']
>
> Another possibility is to use plain ol' EL... I think that something
> like ${someName} would work. Of course, if nothing else, I'm guessing
> that <%= request.getParameter("someName") %> is not broken...
>
> -Wes
>
> On Wed, May 13, 2009 at 3:46 PM, Jim Collings  wrote:
>> The question is simpler than it seems.  It's the syntax that's the kicker.
>>
>> The old script based way is like this:
>> <%= request.getParameter("someName") %>
>>
>> What's the new way?
>>
>> On Wed, May 13, 2009 at 3:28 PM, Jim Collings  wrote:
>>
>>> Has to be in the jsp.
>>> tried:
>>>  value="#parameters.something"
>>>
>>> Didnt work.  Showed up as text in the textfield we are using.
>>>
>>> On 5/13/09, Terry Gardner  wrote:
>>> > One way is via the ServletActionContext, for example,
>>> > ServletActionContext.getRequest().getParameter(String);
>>> >
>>> > On May 13, 2009, at 3:16 PM, Jim Collings wrote:
>>> >
>>> >> It isn't in the value stack but I need to snag it. Can't find any
>>> >> examples
>>> >> of how to do this.
>>> >>
>>> >> Clue anyone?
>>> >>
>>> >>
>>> >> Jim C.
>>> >
>>> >
>>>
>>
>
>
>
> --
> Wes Wannemacher
> Author - Struts 2 In Practice
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: convention plug-in question

2009-05-14 Thread Musachy Barroso
Do you have a custom stack interceptor? If the fields are not
populated in the action, then the params interceptor is not getting
applied, it is hard to say without more details.

musachy

On Thu, May 14, 2009 at 1:30 PM, Jim Collings  wrote:
> I have an action with "execute" in the superclass (ActionSupport) being
> called by one activity and another method of the same Action called
> "doSomething" being called by ! notation in a form submit.
>
> I've noticed that when I annotate the "doSomething" method with:
>
> @Action(results = {...@result(name = "success", location = "somewhere-else",
> type = "chain")})
>
> What happens is that I start getting NPE's in the execute method because the
> properties of the Action have not been set.
>
> Is this a Bug?  Am I not annotating correctly? Anybody got ideas regarding
> this?
>
>
> Jim C.
>



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

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



Re: convention plug-in question

2009-05-14 Thread Musachy Barroso
if you add a "/" to the action name, it won't append the namespace to
it, but use it as the whole action name. If your namespace is
"myactions", and you set the name as "/action", the action name is
"/action", if you set it to "action" then the action name will be
"/myaction/action".

musachy

On Thu, May 14, 2009 at 3:30 PM, Jim Collings  wrote:
> So I have this working but I had to specify a value for @Action.  I don't
> think I should have to do this. There should be a convention in the
> convention plugin of assuming that a result mapped the way I tried to map it
> is for the current method using it's conventional url when value is left
> blank.  Note that it also didn't work when I specified the actual url being
> used for a value. It seems the intent was to force changing it.  Anyone know
> why?
>
> @Action(value = "/dir/some-action",results = {...@result(name = "success",
> location = "somewhere-else", type = "chain")})
>
>
> On Thu, May 14, 2009 at 1:30 PM, Jim Collings  wrote:
>
>> I have an action with "execute" in the superclass (ActionSupport) being
>> called by one activity and another method of the same Action called
>> "doSomething" being called by ! notation in a form submit.
>>
>> I've noticed that when I annotate the "doSomething" method with:
>>
>> @Action(results = {...@result(name = "success", location = "somewhere-else",
>> type = "chain")})
>>
>> What happens is that I start getting NPE's in the execute method because
>> the properties of the Action have not been set.
>>
>> Is this a Bug?  Am I not annotating correctly? Anybody got ideas regarding
>> this?
>>
>>
>> Jim C.
>>
>>
>



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

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



Re: [S2 2.1.6] Struts2 sucks wrt. OGNL expressions

2009-05-15 Thread Musachy Barroso
It was added after 2.1.6 and it will be available in 2.1.7, here is the ticket:

https://issues.apache.org/struts/browse/WW-3051

you need to set:



musachy

On Fri, May 15, 2009 at 9:09 AM, Robert Graf-Waczenski  wrote:
> Zoran Avtarovski schrieb:
>>
>> We upgraded to 2.1.6 and I remember that the messages starting appearing
>> in
>> the logs.
>>
>> Here are the two entries in my log4j properties file to restrict output
>> only
>> to errors:
>>
>> log4j.logger.com.opensymphony.xwork2.ognl.OgnlValueStack=ERROR
>> log4j.logger.org.apache.struts2.util.TextProviderHelper=ERROR
>>
>>
>> Z.
>>
>>
>
> This does not address the issue i was complaining about. What i would like
> to have is that errors are thrown out to the JVM and not handled by any of
> the configured loggers. Dave wrote that this option was added a few months
> ago, i.e. after the release of 2.1.6.
>
> Robert
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: [S2 2.1.6] Struts2 sucks wrt. OGNL expressions

2009-05-15 Thread Musachy Barroso
it has to be friday because all I can think about is happy hour :)

musachy

On Fri, May 15, 2009 at 9:23 AM, Dave Newton  wrote:
> Musachy Barroso wrote:
>>
>> It was added after 2.1.6 and it will be available in 2.1.7, here is the
>> ticket:
>>
>> https://issues.apache.org/struts/browse/WW-3051
>>
>> you need to set:
>>
>> 
>
> Yeah! That's the one.
>
> Man--I am ***so*** glad it's Friday.
>
> It's Friday, right?
>
> (Which reminds me--I have WebLogic now, so can look at WebLogic issues
> again. Luucky me.)
>
> Dave
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: Struts2Builder 0.1.0 has been released

2009-05-15 Thread Musachy Barroso
I gotta say, that sounds really cool.

thanks
musachy

On Fri, May 15, 2009 at 2:23 PM, tsattler  wrote:
>
> Greetings all.
>
> I have posted the initial release of Struts2Builder over at SourceForge.
>
> Struts2Builder is a Java code generation system.  It will log into an
> existing Postgres or MySql database, examine the metadata, and automatically
> generate a real, live, functioning Struts2 / Spring / Hibernate CRUD
> (Create, Read, Update, Delete) system for every table in that database, as
> well as automatically generate all the pertinent configuration files.
>
> It is intended to create a baseline, which you can build upon to create your
> final customized application.
>
> It can be downloaded (for free, of course) at
> http://struts2builder.sourceforge.net.  I have provided it to the Struts
> community in hope it helps everyone get their projects done faster.
>
> All feedback on Struts2Builder is appreciated.
>
> --Tom
> --
> View this message in context: 
> http://www.nabble.com/Struts2Builder-0.1.0-has-been-released-tp23564985p23564985.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: JSON plugin class loading problem?

2009-05-19 Thread Musachy Barroso
That's pretty weird, you could try mapping that action with XML, if
the problem goes away, then it is a Codebehind problem, but I can't
think of anything causing this.

musachy

On Tue, May 19, 2009 at 2:26 PM,   wrote:
> I am using version 0.32 of the JSON plugin with Struts 2.0.11.  It seems
> to work well except for the fact that the JSON results from my struts
> action are inconsistent.
> I have annotated my action as follows:
>
> @Results( {
>       �...@result(name = "jsonPopsResult", type = JSONResult.class, value =
> "", params = {"root", "jsonResult", "noCache", "true"}),
>       �...@result(name = "jsonRefugesResult", type = JSONResult.class, value
> = "", params = {"root", "jsonResult", "noCache", "true"})})
> public class MapQueryAction extends ActionSupport {
> ...
> }
>
> Sometimes the response generated by the action is (for example)
>
>        {"trustResources":[{"displayName":"Bull Trout","id":301}]}
>
> at other times it is
>
>        {"jsonResult":{"trustResources":[{"displayName":"Bull
> Trout","id":301}]}}
>
> Note that the second response has an outer level of wrapping that
> corresponds to the root parameter in the annotation (the action property
> to be serialized).
>
> I think (though am not 100% positive) that the change in behavior happens
> when I restart my tomcat container, so this smells strongly of a class
> loading problem.  I've looked for duplicate jars/classes, but have come up
> empty.  In particular, I have only one json-plugin jar
> (json-plugin-0.32.jar) in my application's WEB-INF/lib directory.  Has
> anyone else experienced this kind of problem with the JSON plugin?
>
> Thanks,
> Jim Greuel



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

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



Re: JSON plugin class loading problem?

2009-05-19 Thread Musachy Barroso
Martin, where do you get these random code sections from? Please
refrain from posting "answers" that will just confuse users. This is a
community and we benefit from the help and collaboration of users, so
we encourage everyone to participate, but just throwing random code,
from projects that are not even relevant, on any thread will only
confuse users, not help them.

musachy

On Tue, May 19, 2009 at 6:35 PM, Martin Gainty  wrote:
>
> Jim-
>  /**
>     * Generates the key to store the bean in the session with.
>     */
>    private void updateBeanKey() {
>        if (this.sessionKey == null) {
>            final StringBuffer buff = new StringBuffer();
>
>            buff.append(this.getClass().getName()); //WHAT iS THE CLASSNAME 
> doing here!
>            buff.append("_");
>            buff.append(this.getTargetBeanName());
>
>            this.compiledSessionKey = buff.toString();
>        }
>        else {
>            this.compiledSessionKey = this.sessionKey;
>        }
>    }
>
> later on in getTarget
> //the mucked value is set to beanKey
>            String beanKey = this.compiledSessionKey;
>
>            Object instance = session.get(beanKey);
>            if (instance == null) {
>                instance = this.newPrototypeInstance();
> //too late now its stored in session!
>                session.put(beanKey, instance);
>
>                if (LOG.isDebugEnabled()) {
>                    LOG.debug("Created instance of '" + 
> this.getTargetBeanName() + "', bound to webWorkSession for '"
>                       + Thread.currentThread().getName() + "' using key '" + 
> beanKey + "'.");
>                }
>            }
>            else if (LOG.isDebugEnabled()) {
>                LOG.debug("Found instance of '" + this.getTargetBeanName() + 
> "', bound to webWorkSession for '"
>                       + Thread.currentThread().getName() + "' using key '" + 
> beanKey + "'.");
>            }
>
>            return instance;
>        }
> http://www.opensymphony.com/webwork/wikidocs/Spring%20Session%20Components%20Workarounds.html
>
> I will put this into WebWork JIRA
>
> Good Catch!
> Martin Gainty
> __
> Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  Ez az
> üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
> jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
> készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
> semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
> könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
> ezen üzenet tartalma miatt.
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>> To: user@struts.apache.org
>> Subject: JSON plugin class loading problem?
>> From: jim_gre...@fws.gov
>> Date: Tue, 19 May 2009 12:26:27 -0600
>>
>> I am using version 0.32 of the JSON plugin with Struts 2.0.11.  It seems
>> to work well except for the fact that the JSON results from my struts
>> action are inconsistent.
>> I have annotated my action as follows:
>>
>> @Results( {
>>         @Result(name = "jsonPopsResult", type = JSONResult.class, value =
>> "", params = {"root", "jsonResult", "noCache", "true"}),
>>         @Result(name = "jsonRefugesResult", type = JSONResult.class, value
>> = "", params = {"root", "jsonResult", "noCache", "true"})})
>> public class MapQueryAction extends ActionSupport {
>> ...
>> }
>>
>> Sometimes the response generated by the action is (for example)
>>
>>         {"trustResources":[{"displayName":"Bull Trout","id":301}]}
>>
>> at other times it is
>>
>>         {"jsonResult":{"trustResources":[{"displayName":"Bull
>> Trout","id":301}]}}
>>
>> Note that the second response has an outer level of wrapping that
>> corresponds to the root parameter in the annotation (the action property
>> to be serialized).
>>
>> I think (though am not 100% positive) that the change in behavior happens
>> when I restart my tomcat container, so this smells strongly of a class
>> loading problem.

Re: JSON plugin class loading problem? (Part Deux)

2009-05-19 Thread Musachy Barroso
The OP stated that he is using the JSON plugin, v32, which is this
Struts 2 plugin: http://cwiki.apache.org/S2PLUGINS/json-plugin.html,
not related to xwork in anyway.

musachy

On Tue, May 19, 2009 at 7:58 PM, Martin Gainty  wrote:
>
> something else
> com.opensymphony.webwork.dispatcher.json.JsonObject
>
>     * For example, if an object has a method named "getName", and
>     * if the result of calling object.getName() is "Larry 
> Fine",
>     * then the JSONObject will contain "name": "Larry Fine".
>     *
>     * @param bean An object that has getter methods that should be used
>     * to make a JSONObject.
>     */
>    public JSONObject(Object bean) {
>
> the question is getJsonResult created to produce this JSON output?
> {"jsonResult":{"trustResources":[{"displayName":"Bull Trout","id":301}]}}
> ?
> Martin
> __
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
>
>
>
>
> From: mgai...@hotmail.com
> To: user@struts.apache.org
> Subject: RE: JSON plugin class loading problem?
> Date: Tue, 19 May 2009 18:35:08 -0400
>
>
>
>
>
>
>
>
> Jim-
>  /**
>     * Generates the key to store the bean in the session with.
>     */
>    private void updateBeanKey() {
>        if (this.sessionKey == null) {
>            final StringBuffer buff = new StringBuffer();
>
>            buff.append(this.getClass().getName()); //WHAT iS THE CLASSNAME 
> doing here!
>            buff.append("_");
>            buff.append(this.getTargetBeanName());
>
>            this.compiledSessionKey = buff.toString();
>        }
>        else {
>            this.compiledSessionKey = this.sessionKey;
>        }
>    }
>
> later on in getTarget
> //the mucked value is set to beanKey
>            String beanKey = this.compiledSessionKey;
>
>            Object instance = session.get(beanKey);
>            if (instance == null) {
>                instance = this.newPrototypeInstance();
> //too late now its stored in session!
>                session.put(beanKey, instance);
>
>                if (LOG.isDebugEnabled()) {
>                    LOG.debug("Created instance of '" + 
> this.getTargetBeanName() + "', bound to webWorkSession for '"
>                       + Thread.currentThread().getName() + "' using key '" + 
> beanKey + "'.");
>                }
>            }
>            else if (LOG.isDebugEnabled()) {
>                LOG.debug("Found instance of '" + this.getTargetBeanName() + 
> "', bound to webWorkSession for '"
>                       + Thread.currentThread().getName() + "' using key '" + 
> beanKey + "'.");
>            }
>
>            return instance;
>        }
> http://www.opensymphony.com/webwork/wikidocs/Spring%20Session%20Components%20Workarounds.html
>
> I will put this into WebWork JIRA
>
> Good Catch!
> Martin Gainty
> __
> Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  Ez az
> üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
> jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
> készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
> semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
> könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
> ezen üzenet tartalma miatt.
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou l

Re: problems upgrading from struts 2.0 to 2.1

2009-05-20 Thread Musachy Barroso
are you using the REST plugin? I can't think of anything else that
would add that ".xhtml" extension.

musachy

On Wed, May 20, 2009 at 11:48 AM, akoo  wrote:
>
> Hi guys,
> I am having some strange issues trying to upgrade from struts 2.0 to 2.1.
> I have this simple login form
>
>
>
> 
>  Simple jsp page
>  
>    
>    
>        
>            Username
>             
>        
>        
>            Password
>            
>        
>        
>             
>        
>    
>    
>  
> 
>
>
>
> which seems to get rendered as.
>
>
> 
>  Simple jsp page
>  
>     method="post">
>    
>        
>            Username
>             id="Login_username"/> 
>        
>        
>            Password
>             id="Login_password"/>
>        
>        
>             value="Login"/>
>  
>        
>        
>            
>        
>    
>    
>
>  
> 
> After going through the struts 2.1 filter.  Web.xml is set up the following
> way
>
>
>   Red Dragon
>    
>        struts2
>
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
>    
>
>    
>        struts2
>        /*
>    
> 
>        struts2
>        /struts/*
> 
>
> and struts.xml is setup this way
>
> 
>    
>    
>    
>       
>         class="org.apache.struts2.views.tiles.TilesResult">
>    
>        
>         method="login">
>            mainpage
>            index.jsp
>        
>    
> 
>
>
> I suspect on the the gazillions of plugins jars that I downloaded with 2.1
> is getting in the way.  I have no explanation why that form action is set to
> xhtml and not a .action.
> The form of course does not work when I submit and gives me the following
> error
>
>
> java.lang.NoSuchMethodException:
> com.castle.webapp.actions.LoginAction.create()
>        java.lang.Class.getMethod(Class.java:1605)
>
> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.getActionMethod(AnnotationValidationInterceptor.java:75)
>
> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:47)
>
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>
> com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
>
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
>
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>
>
>  What is this create method and why is it looking for a create method?
> Thanks.
> --
> View this message in context: 
> http://www.nabble.com/problems-upgrading-from-struts-2.0-to-2.1-tp23638049p23638049.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



Re: JSON plugin ignoring includeProperties parameter

2009-05-21 Thread Musachy Barroso
There is a getItems() in your action right? Does anything get generated at all?

musachy

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

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



Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread Musachy Barroso
Please don't send private emails following up a thread. This is not a
test case for a bug, this is commented code. I am not saying that
there isn't a bug there, maybe there is.

musachy

On Fri, May 22, 2009 at 9:50 AM, Martin Gainty  wrote:
> //rather lengthy testcase for includeProperties
>
> com.googlecode.jsonplugin.JSONResultTest
>   public void testIncludePropertiesWithList() throws Exception {
>     JSONResult result = new JSONResult();
>
> /*public class JSONResult implements Result {
>     private static final long serialVersionUID = 8624350183189931165L;
>     private String defaultEncoding = "ISO-8859-1";
>     private List includeProperties; //you want to initialise this!
> */
>
>     result.setIncludeProperties("^list\\[\\d+\\]\\.booleanField");
>
> /*** @param includedProperties the includeProperties to set
>  */
>     public void setIncludeProperties(String commaDelim) {
>
>     List includePatterns = JSONUtil.asList(commaDelim);
> //splits all Strings using , as delimiter
> /*    public static List asList(String commaDelim) {
>     if ((commaDelim == null) || (commaDelim.trim().length() == 0))
>     return null;
>     List list = new ArrayList();
>     String[] split = commaDelim.split(",");
>     for (int i = 0; i < split.length; i++) {
>     String trimmed = split[i].trim();
>     if (trimmed.length() > 0) {
>     list.add(trimmed);
>     }
>     }
>     return list;
>     }
> */
>
>     if (includePatterns != null)  //TRUE
>     {
>     this.includeProperties = new
> ArrayList(includePatterns.size());
> //includeProperties now includes ArrayList
>
>     HashMap existingPatterns = new HashMap();
>
>     for (String pattern : includePatterns) {
>     // Compile a pattern for each *unique* "level" of the object
>     // hierarchy specified in the regex.
>     //split according to \ delimiter found
>     String[] patternPieces = pattern.split("\\.");
>
>     String patternExpr = "";
>
> //the individual patternPieces will be referred to as patternPiece
>     for (String patternPiece : patternPieces)
>     {
> //patternExpr is null on first go-around (bypass this logic on first
> go-around)
>     if (patternExpr.length() > 0)
>     {
>     patternExpr += "\\.";
>     }
>     patternExpr += patternPiece; //patternExpr=patternPiece
>
> // Check for duplicate patterns so that there is no overlap.
> //first go around will always execute logic as !existingPatterns returns
> true
>     if (!existingPatterns.containsKey(patternExpr))
>     {
>
> //doesnt make sense..if existingPatterns already contains patternExpr why
> add it again?
> //would'nt you want to leave existingPatterns HashMap alone?
>     existingPatterns.put(patternExpr, patternExpr);
>
> //Add a pattern that does not have the indexed property matching (ie.
> list\[\d+\] //becomes list).
>
> //look for the end in the piece we have
>  if (patternPiece.endsWith("\\]"))
>  {
> //doesnt make sense..you're testing patternPiece.lastIndexOf("\\[";
> //then why compile patternExpr?
> //why not take the relevant patternPiece and assign it to patternExpr
> //then let the statement  later in the code
> this.includeProperties.add(Pattern.compile(patternExpr)); handle this?
>
> this.includeProperties.add(Pattern.compile(patternExpr.substring(0,
> patternPiece.lastIndexOf("\\[";
>
> //enable the log so we can see this message
>     if (log.isDebugEnabled())
>     log.debug("Adding include property
> expression:  " + patternExpr.substring(0, patternPiece.lastIndexOf("\\[")));
>     }
>
> //this unconditionally adds the (compiled version of) patternExpr to
> includeProperties
>
> this.includeProperties.add(Pattern.compile(patternExpr));
>
>     if (log.isDebugEnabled())
>     log.debug("Adding include property expression:
> " + patternExpr);
>     }
>     }
>     }
>     }
>     }
> */
>
> from what i can see there is a bug with JSONResult
> public void setIncludeProperties(String commaDelim) method
>
> ?
> Martin Gainty
> "Good Manners dont cost nothing" - Pink Floyd
> __
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierba

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread Musachy Barroso
exclude/include properties have to match the java name of the
properties, not the name in the output. Try using "features.*\.name"
as the regular expression.

musachy

On Fri, May 22, 2009 at 10:48 AM, John Cartwright
 wrote:
> Thanks for your reply Musachy.
>
> I'm using the JSON annotation to modify the output, e.g.
>
> @JSON(name="items")
> public List getFeatures() {
>   return (features);
> }
>
> Yes, I am getting a result. It's just that all the fields are being output
> rather than just the ones listed in the includeProperties.  As an aside, the
> "excludeProperties" also seems to be ignored, but the
> "excludeNullProperties" is respected.
>
> Thanks again for your help!
>
> --john
>
> Musachy Barroso wrote:
>>
>> There is a getItems() in your action right? Does anything get generated at
>> all?
>>
>> musachy
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

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



  1   2   3   4   5   6   7   8   9   10   >