Re: Bizarre sporadic problem with streaming a stylesheet.

2010-09-22 Thread Andy Law


DNewfield wrote:
 
 Anyway, glad you've solved your issue.  Too bad we didn't all learn 
 something from it :-)
 

Apologies for being late to the party, but this smells like a browser/proxy
cache issue to me?

Later,

Andy


-- 
View this message in context: 
http://old.nabble.com/Bizarre-sporadic-problem-with-streaming-a-stylesheet.-tp29766033p29777309.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



RE: Bizarre sporadic problem with streaming a stylesheet.

2010-09-22 Thread Martin Gainty

i agree with andy
 
do a view source and tracert on all urls

i it is possible you'll see there is a man-in-the middle proxy altering the 
response

Martin
__ 
American Wireshark Operators: do not alter or modify this transmission.



 

 Date: Wed, 22 Sep 2010 01:20:16 -0700
 From: andy@roslin.ed.ac.uk
 To: user@struts.apache.org
 Subject: Re: Bizarre sporadic problem with streaming a stylesheet.
 
 
 
 DNewfield wrote:
  
  Anyway, glad you've solved your issue. Too bad we didn't all learn 
  something from it :-)
  
 
 Apologies for being late to the party, but this smells like a browser/proxy
 cache issue to me?
 
 Later,
 
 Andy
 
 
 -- 
 View this message in context: 
 http://old.nabble.com/Bizarre-sporadic-problem-with-streaming-a-stylesheet.-tp29766033p29777309.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
 
  

Struts 2.2.1 Problem

2010-09-22 Thread Michelle Weeks
I have just started using Struts 2.2.1, and I have found a bug ... I
have several Hash Maps with a String for the key value.  These key
values sometimes contain special characters, including '-, /, \, _' any
Map with a key value containing one of these characters seems to
silently fail to call the set method.  Any ideas on a fix?? 


Re: Struts 2.2.1 Problem

2010-09-22 Thread Dave Newton
Under what circumstances?

On Wed, Sep 22, 2010 at 11:20 AM, Michelle Weeks michelle.we...@jetisre.com
 wrote:

 I have just started using Struts 2.2.1, and I have found a bug ... I
 have several Hash Maps with a String for the key value.  These key
 values sometimes contain special characters, including '-, /, \, _' any
 Map with a key value containing one of these characters seems to
 silently fail to call the set method.  Any ideas on a fix??



RE: Struts 2.2.1 Problem

2010-09-22 Thread Michelle Weeks
I guess I'm not sure what exactly you are asking ...

My project uses the core Struts components as well as the Struts portlet
components.  All of the portlets we are having the issue in are pretty
basic, using just the portletDefaultStack and basicStack interceptors.
One of the Hash Maps that is not setting simply has a String key and a
String value.  If I find a key that does not contain a special
character, the data saves.  If one key has a special character the whole
Map is not set into the action. 

-Original Message-
From: Dave Newton [mailto:davelnew...@gmail.com] 
Sent: Wednesday, September 22, 2010 10:21 AM
To: Struts Users Mailing List
Subject: Re: Struts 2.2.1 Problem

Under what circumstances?

On Wed, Sep 22, 2010 at 11:20 AM, Michelle Weeks
michelle.we...@jetisre.com
 wrote:

 I have just started using Struts 2.2.1, and I have found a bug ... I
 have several Hash Maps with a String for the key value.  These key
 values sometimes contain special characters, including '-, /, \, _'
any
 Map with a key value containing one of these characters seems to
 silently fail to call the set method.  Any ideas on a fix??


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



Re: Struts 2.2.1 Problem

2010-09-22 Thread Dave Newton
On Wed, Sep 22, 2010 at 11:56 AM, Michelle Weeks michelle.we...@jetisre.com
 wrote:

 I guess I'm not sure what exactly you are asking ...


When the error happens: the original message just said you had a map that
set wasn't called on when you had key values containing certain
characters--on its own, it's not really enough to help.


 One of the Hash Maps that is not setting simply has a String key and a
 String value.  If I find a key that does not contain a special
 character, the data saves.  If one key has a special character the whole
 Map is not set into the action.


Do you mean on the JSP side? Can you show the code that's causing the
problem? It would make it much easier to help.

Dave


Re: Struts 2.2.1 Problem

2010-09-22 Thread Dale Newfield

On 9/22/10 11:56 AM, Michelle Weeks wrote:

If one key has a special character the whole Map is not set into the action.


I'm guessing it's an encoding issue.  Are these strings encoded in the 
resulting html?  If the parameters are part of the URL (GET request) 
then they'll probably wind up encoded by the browser before they get 
sent back, anyway.  Trace it through the path outbound from the jsp to 
the browser back to the server through the params interceptor and see 
where the values are getting encoded and decoded.


-Dale

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



order of plugin-struts.xml and struts.xml

2010-09-22 Thread Josep García
We are currently using struts 2.0.14 with Spring.

Is there any way of modifying the order of the config files for Struts2
plug-in modules?
Currently, we have a Basic web app with a default package in which we
define an adminCheck interceptor stack.

Besides, we have an Advanced web app, which is supposed to be the Basic
plus additional features. This we have implemented like a struts-plugin.xml.

I would like to use for some actions of this plugin the adminCheck
interceptor stack.
This does not seem to work as the load order is struts-plugin.xml first,
then struts.xml.

Is this possible at all? Any other better solution?

Josep


RE: Struts 2.2.1 Problem

2010-09-22 Thread Michelle Weeks
Sorry ... I forgot a big piece, we were running with Struts 2.1.8.1 and
then upgraded to 2.2.1 because of the security fix.  All HashMaps were
working correctly before the upgrade.

Loading the HashMaps, with JavaScript, into the DOM like this ...

input type=text name=pagesMap['name/name'].key value=keyValue /

The actions contain getters and setters for the HashMaps ...

public MapString, Object getPagesMap()
{
return this.pagesMap;
}
public void setPagesMap(MapString, Object pagesmap)
{
this.pagesMap = pagesmap;
}

And I have the conversion properties in the resources directory.

-Original Message-
From: Dave Newton [mailto:davelnew...@gmail.com] 
Sent: Wednesday, September 22, 2010 11:10 AM
To: Struts Users Mailing List
Subject: Re: Struts 2.2.1 Problem

On Wed, Sep 22, 2010 at 11:56 AM, Michelle Weeks
michelle.we...@jetisre.com
 wrote:

 I guess I'm not sure what exactly you are asking ...


When the error happens: the original message just said you had a map
that
set wasn't called on when you had key values containing certain
characters--on its own, it's not really enough to help.


 One of the Hash Maps that is not setting simply has a String key and a
 String value.  If I find a key that does not contain a special
 character, the data saves.  If one key has a special character the
whole
 Map is not set into the action.


Do you mean on the JSP side? Can you show the code that's causing the
problem? It would make it much easier to help.

Dave

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



Re: order of plugin-struts.xml and struts.xml

2010-09-22 Thread Dale Newfield

On 9/22/10 12:35 PM, Josep García wrote:

This does not seem to work as the load order is struts-plugin.xml first,
then struts.xml.


http://struts.apache.org/2.2.1/docs/plugins.html
describes this strict ordering:
struts-default.xml (bundled in the Core JAR)
struts-plugin.xml (as many as can be found in other JARs)
struts.xml (provided by your application)

but note it doesn't discuss the order that multiple struts-plugin.xml's 
(in separate plugin.jars) will be loaded.  I believe Musachy worked on 
making this specifiable, but haven't checked to see if this ever made it 
into the trunk:


http://old.nabble.com/plugin-loading-order-to22889649.html

Usually struts.xml will depend upon stuff in the earlier .xml documents, 
so I don't think it's either possible or advisable to load that 
earlier...I assume you tried using an undefined interceptor-ref that's 
defined in a document loaded later and that didn't work?


-Dale

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



Re: order of plugin-struts.xml and struts.xml

2010-09-22 Thread Dave Newton
I think I remember seeing an ordering attribute/element somewhere, but I
honestly don't recall where.

On Wed, Sep 22, 2010 at 2:26 PM, Dale Newfield d...@newfield.org wrote:

 On 9/22/10 12:35 PM, Josep García wrote:

 This does not seem to work as the load order is struts-plugin.xml first,
 then struts.xml.


 http://struts.apache.org/2.2.1/docs/plugins.html
 describes this strict ordering:
 struts-default.xml (bundled in the Core JAR)
 struts-plugin.xml (as many as can be found in other JARs)
 struts.xml (provided by your application)

 but note it doesn't discuss the order that multiple struts-plugin.xml's (in
 separate plugin.jars) will be loaded.  I believe Musachy worked on making
 this specifiable, but haven't checked to see if this ever made it into the
 trunk:

 http://old.nabble.com/plugin-loading-order-to22889649.html

 Usually struts.xml will depend upon stuff in the earlier .xml documents, so
 I don't think it's either possible or advisable to load that earlier...I
 assume you tried using an undefined interceptor-ref that's defined in a
 document loaded later and that didn't work?

 -Dale

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




additional onsubmit javascript validation

2010-09-22 Thread Robert Taylor
Greetings,

I'm using Struts2.2.1 and have a form using the xhtml theme which performs some 
simple javascript validation (required, etc...).
Works great.
Now, after the simple javascript validation executes I would like to add some 
more validation to the onsubmit event.
Apart from modifying a template, I couldn't see how this could be achieved 
easily.
If you include the validation in the form onsubmit attribute, it is prepended 
to the dynamically generated javascript validation function name. 

For example:
s:form action=MyAction namespace=/mynamespace theme=xhtml 
validate=true onsubmit=return myValidation()

produces the following markup.

form id=Myaction 
 name=MyAction 
 onsubmit=return myValidation(); return validateForm_MyAction(); 
 action=/scname/mynamespace/MyAction.html method=post  
 onreset=clearErrorMessages(this);clearErrorLabels(this);

As is evident, this won't work for me. 

I want to leverage the dynamically generated Javascript validation when 
validate=true. If that validation succeeds, then I want to execute some 
proprietary validation.

I also know the name of the dynamically generated javascript method so I could 
call it in myValidation();


Any suggestions would be appreciated.

Thanks,

/robert




Re: additional onsubmit javascript validation

2010-09-22 Thread Dave Newton
I modified the templates to allow pages to inject their own validation
messages. Unfortunately I never checked this in. You could do it with a
JavaScript framework, though, through binding.

Dave

On Wed, Sep 22, 2010 at 9:26 PM, Robert Taylor rtay...@dtgresults.comwrote:

 Greetings,

 I'm using Struts2.2.1 and have a form using the xhtml theme which performs
 some simple javascript validation (required, etc...).
 Works great.
 Now, after the simple javascript validation executes I would like to add
 some more validation to the onsubmit event.
 Apart from modifying a template, I couldn't see how this could be achieved
 easily.
 If you include the validation in the form onsubmit attribute, it is
 prepended to the dynamically generated javascript validation function name.

 For example:
 s:form action=MyAction namespace=/mynamespace theme=xhtml
 validate=true onsubmit=return myValidation()

 produces the following markup.

 form id=Myaction
 name=MyAction
 onsubmit=return myValidation(); return validateForm_MyAction();
 action=/scname/mynamespace/MyAction.html method=post
 onreset=clearErrorMessages(this);clearErrorLabels(this);

 As is evident, this won't work for me.

 I want to leverage the dynamically generated Javascript validation when
 validate=true. If that validation succeeds, then I want to execute some
 proprietary validation.

 I also know the name of the dynamically generated javascript method so I
 could call it in myValidation();


 Any suggestions would be appreciated.

 Thanks,

 /robert





Re: additional onsubmit javascript validation

2010-09-22 Thread Mead Lai
Hi Robert,

Do you have another submit button? such as s:submit/,
Try to bind a event listener to this button, that when you click this
button, you do some validation();

Another way is using the js to remove the  onsubmit event, then binding
another method you write, and invoke the myValidation() in that method;
bind
AnoterMethod(){

if(!validateForm_MyAction()){return;}
//Here do your validation
return myValidation()
}

Regards,
Mead


Re: additional onsubmit javascript validation

2010-09-22 Thread Dale Newfield

On 9/22/10 9:44 PM, Dave Newton wrote:

I modified the templates


http://struts.apache.org/2.2.1/docs/template-loading.html

describes how you can override existing templates within your application.

-Dale

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



Re: Struts 2.2.1 Problem

2010-09-22 Thread Dale Newfield

On 9/22/10 1:58 PM, Michelle Weeks wrote:

input type=text name=pagesMap['name/name'].key value=keyValue /


And is that form submitted with GET or POST?
Are any characters encoded in that submission?

Are you certain that the pagesMap map isn't having .put(name%2fname, 
keyValue) called on it?


-Dale

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