RE: getText in error messages: resource bundle or bean value?

2012-10-19 Thread Hoying, Ken
I believe that your problem is that the field names are the same as your label 
names and with the validator both are in the stack. ${getText(user.password)} 
is first evaluating user.password and finding the field value 1234.  getText 
is then trying to locate an entry for 1234 and cannot find one so it is just 
return 1234.

It might work if you try ${getText('user.password')}.  Otherwise, you may need 
to rename it.

-Original Message-
From: J. Garcia [mailto:jogaco...@gmail.com] 
Sent: Friday, October 19, 2012 8:10 AM
To: Struts Users Mailing List
Subject: getText in error messages: resource bundle or bean value?

Hi,
I'm having a problem with getText().
I have the following xml validator:

field name=user.confirmPassword
field-validator type=requiredstring
message key=errors.required/
/field-validator
field-validator type=fieldexpression
param name=expression
(user.confirmPassword.equals(user.password))
/param
message key=errors.confirmPassSame/
/field-validator
/field

And the error message is defined in a bundle like this:
errors.confirmPassSame=The ${getText(user.confirmPassword)} field has to
have the same value as the ${getText(user.password)} field.
...
user.confirmPassword=Confirm Password
user.password=Password

I would expect a message like:
The Confirm Password field has to have the same value as the Password field.

However, when the error message is shown, instead of the text from the
resource bundle, what is shown are the actual values of the bean, like this:
The abcd field has to have the same value as the 1234 field.

Is this a bug in getText()?

Cheers,
J. Garcia

-
***Note:The information contained in this message may be privileged and 
confidential and protected from disclosure. If the reader of this message is 
not the intended recipient, or an employee or agent responsible for delivering 
this message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify 
the Sender immediately by replying to the message and deleting it from your 
computer.  Thank you.  Premier Inc.



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



RE: [Struts2] Retrieve parameter scope variables with OGNL

2010-03-25 Thread Hoying, Ken
If you can display it with ${ param.blocSource }, did you try 
#attr.param.blocSource?



-Original Message-
From: poof65 [mailto:poo...@gmail.com] 
Sent: Thursday, March 25, 2010 6:01 AM
To: user@struts.apache.org
Subject: [Struts2] Retrieve parameter scope variables with OGNL

Hi,

i'm using jsp:include to include a jsp from another but i've a problem
to get the value set in the jsp:param tag.

jsp:include page=../include/blocs/blocEnteteDossier.jsp
jsp:param name=blocSource value=depeche /
/jsp:include

I can display the value with EL (${ param.blocSource }) but my goal is
to test it in a s:if tag.
I've tried many solutions but none of them give me the correct result.

s:property value=blocSource/
s:property value=#blocSource/
s:property value=#attr.blocSource/
s:property value=#request.blocSource/
s:property value=#session.blocSource/
s:property value=#application.blocSource/
s:property value=#parameters.blocSource/


My question is, are the struts scopes compatbiles with standards
jsp/servlets scopes ?

Thanks for reading :-)

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


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

RE: Getting the authenticated user from Spring Security for use in an Action

2010-03-17 Thread Hoying, Ken
Try:

SecurityContextHolder.getContext().getAuthentication().getPrincipal()

-Original Message-
From: Lance Hill [mailto:la...@baldhead.com] 
Sent: Tuesday, March 16, 2010 5:15 PM
To: 'Struts Users Mailing List'
Subject: Getting the authenticated user from Spring Security for use in an 
Action

I need to access information about the currently logged in user. I don't
think putting the user into the session during login is how it is supposed
to be done, but I have not found examples of how to get access to the
current user from Spring/Spring Security. Can someone please provide a link
or brief example of the best practice?


Thank you.


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

-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

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



RE: SecurityContextHolder.getContext().getAuthentication() returning null

2010-03-17 Thread Hoying, Ken
Check your filter order.  I cannot recall if it is the filters are chained by 
the filter declaration order of the filter mapping order.

-Original Message-
From: Lance Hill [mailto:la...@baldhead.com] 
Sent: Wednesday, March 17, 2010 12:08 PM
To: 'Struts Users Mailing List'; lukasz.len...@gmail.com
Subject: RE: SecurityContextHolder.getContext().getAuthentication() returning 
null

I'm using Spring 3/Spring Security 3.

I tried using security:authentication property=principal.username/ on the 
protected page and the username actually appears when I go directly to 
http://localhost/jsp/hello.jsp. 

If I go to http://localhost/hello.action, the security:authentication 
property=principal.username/ tag renders nothing and 
SecurityContextHolder.getContext().getAuthentication() returns a null value.

Here is my struts.xml

struts
package name=myPackage extends=struts-default 
action name=hello class=helloAction 
result/jsp/hello.jsp/result
/action
/package
/struts

And my web.xml


!-- Filters --

filter
filter-namespringSecurityFilterChain/filter-name

filter-classorg.springframework.web.filter.DelegatingFilterProxy/filter-class
/filter

filter
filter-nameaction2-cleanup/filter-name

filter-classorg.apache.struts2.dispatcher.ActionContextCleanUp/filter-class
/filter

filter
filter-namesitemesh/filter-name

filter-classcom.opensymphony.module.sitemesh.filter.PageFilter/filter-class
/filter

filter
filter-nameaction2/filter-name

filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
/filter

filter
   filter-nameCAS Single Sign Out Filter/filter-name
   
filter-classorg.jasig.cas.client.session.SingleSignOutFilter/filter-class
/filter

 !-- --

filter-mapping
filter-nameaction2-cleanup/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-namesitemesh/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-nameaction2/filter-name
url-pattern/*/url-pattern
/filter-mapping

filter-mapping
   filter-nameCAS Single Sign Out Filter/filter-name
   url-pattern/*/url-pattern
/filter-mapping

filter-mapping
  filter-namespringSecurityFilterChain/filter-name
  url-pattern/*/url-pattern
/filter-mapping

!--  --
!-- Listeners --
listener

listener-classorg.jasig.cas.client.session.SingleSignOutHttpSessionListener/listener-class
/listener
listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
listener

listener-classorg.apache.tiles.web.startup.TilesListener/listener-class
/listener

!-- Servlets --
servlet
servlet-namedwr/servlet-name
servlet-classuk.ltd.getahead.dwr.DWRServlet/servlet-class
init-param
param-namedebug/param-name
param-valuetrue/param-value
/init-param
/servlet
servlet
servlet-namejspSupportServlet/servlet-name

servlet-classorg.apache.struts2.views.JspSupportServlet/servlet-class
load-on-startup5/load-on-startup
/servlet
servlet
servlet-nametiles/servlet-name
servlet-classorg.apache.tiles.web.startup.TilesServlet/servlet-class
init-param

param-nameorg.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG/param-name
param-value/WEB-INF/tiles-defs.xml/param-value
/init-param
load-on-startup2/load-on-startup
/servlet

servlet-mapping
servlet-namedwr/servlet-name
url-pattern/dwr/*/url-pattern
/servlet-mapping


!-- Welcome file lists --
welcome-file-list
welcome-fileindex.jsp/welcome-file
welcome-filedefault.jsp/welcome-file
welcome-fileindex.html/welcome-file
/welcome-file-list

error-page
error-code403/error-code
location/403.jsp/location
/error-page



-Original Message-
From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] 
Sent: Wednesday, March 17, 2010 11:52 AM
To: Struts Users Mailing List
Subject: Re: SecurityContextHolder.getContext().getAuthentication() returning 
null

2010/3/17 Lance Hill la...@baldhead.com:
 Any hints about why SecurityContextHolder.getContext().getAuthentication()
 would return a null?

Spring version? Configuration? Did you try the simplest possible setup?


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

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




[Q] executeScripts

2010-02-18 Thread Hoying, Ken
I have a tabbed panel that contains a div which loads its content via ajax.  
Very standard.  The ajax content includes javascript that I want to be executed 
so I have set the executeScripts parameter to true for the div.  This all 
worked fantastic prior to upgrading to Struts 2.1.8.1 from 2.0.11.1.  However, 
it now will not run my javascript code.

I have tracked down the issue or at least isolated it.  In addition to the 
javascript, my content returned via ajax also contains an ajax themed submit 
tag.  If I look at the template/ajax/submit.ftl in the dojo plugin and compare 
it to the version found in 2.0.11.1, I notice that it now contains the 
following three lines at the botton of the ftl:

#if parameters.pushId
script language=JavaScript 
type=text/javascriptdjConfig.searchIds.push(${parameters.id?html});/script
/#if

If I remove these lines, then all works fine again.  Does anyone know why that 
would be or have a suggestion for a good fix for this issue?

Thanks in advance,
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

RE: [Q] executeScripts

2010-02-18 Thread Hoying, Ken
As a followup, the problem does not seem to be with the script tag being there 
but the javascript call itself.  If I replace the javascript: 
djConfig.searchIds.push(${parameters.id?html}); with some other code, all 
works fine.  Not sure if this is throwing some error that is getting swallowed 
and as a result is stopping other code from running.

-Original Message-
From: Hoying, Ken [mailto:ken_hoy...@premierinc.com] 
Sent: Thursday, February 18, 2010 1:06 PM
To: Struts Users Mailing List
Subject: [Q] executeScripts

I have a tabbed panel that contains a div which loads its content via ajax.  
Very standard.  The ajax content includes javascript that I want to be executed 
so I have set the executeScripts parameter to true for the div.  This all 
worked fantastic prior to upgrading to Struts 2.1.8.1 from 2.0.11.1.  However, 
it now will not run my javascript code.

I have tracked down the issue or at least isolated it.  In addition to the 
javascript, my content returned via ajax also contains an ajax themed submit 
tag.  If I look at the template/ajax/submit.ftl in the dojo plugin and compare 
it to the version found in 2.0.11.1, I notice that it now contains the 
following three lines at the botton of the ftl:

#if parameters.pushId
script language=JavaScript 
type=text/javascriptdjConfig.searchIds.push(${parameters.id?html});/script
/#if

If I remove these lines, then all works fine again.  Does anyone know why that 
would be or have a suggestion for a good fix for this issue?

Thanks in advance,
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

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



RE: [Q] executeScripts

2010-02-18 Thread Hoying, Ken
The problem is definitely with 
djConfig.searchIds.push(${parameters.id?html});.  If I place this anywhere 
in my code then anything dojo related seems to come to a halt.  Am I doing 
something wrong?  Am I missing something?  Where does Freemarker get the 
parameters.pushId from?

Thanks,
Ken

-Original Message-
From: Hoying, Ken [mailto:ken_hoy...@premierinc.com] 
Sent: Thursday, February 18, 2010 1:25 PM
To: Struts Users Mailing List
Subject: RE: [Q] executeScripts

As a followup, the problem does not seem to be with the script tag being there 
but the javascript call itself.  If I replace the javascript: 
djConfig.searchIds.push(${parameters.id?html}); with some other code, all 
works fine.  Not sure if this is throwing some error that is getting swallowed 
and as a result is stopping other code from running.

-Original Message-
From: Hoying, Ken [mailto:ken_hoy...@premierinc.com] 
Sent: Thursday, February 18, 2010 1:06 PM
To: Struts Users Mailing List
Subject: [Q] executeScripts

I have a tabbed panel that contains a div which loads its content via ajax.  
Very standard.  The ajax content includes javascript that I want to be executed 
so I have set the executeScripts parameter to true for the div.  This all 
worked fantastic prior to upgrading to Struts 2.1.8.1 from 2.0.11.1.  However, 
it now will not run my javascript code.

I have tracked down the issue or at least isolated it.  In addition to the 
javascript, my content returned via ajax also contains an ajax themed submit 
tag.  If I look at the template/ajax/submit.ftl in the dojo plugin and compare 
it to the version found in 2.0.11.1, I notice that it now contains the 
following three lines at the botton of the ftl:

#if parameters.pushId
script language=JavaScript 
type=text/javascriptdjConfig.searchIds.push(${parameters.id?html});/script
/#if

If I remove these lines, then all works fine again.  Does anyone know why that 
would be or have a suggestion for a good fix for this issue?

Thanks in advance,
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

-
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: [Q] JavaTemplate Plugin

2010-02-17 Thread Hoying, Ken
This ended up being a little tougher to accomplish than I had expected.

I tried to override the TemplateEngineManager by specifying the bean in my 
struts.xml file.  However, struts did not like that there was one already 
loaded from the struts-default.xml.

So I created a copy of the struts-default.xml and placed it in my class path 
with a different name.  In this new default xml I replaced the configuration 
for the TemplateEngineManager with one that specified my class.  I then updated 
the filter configuration in my web.xml to load my default xml file instead of 
the struts default xml.

filter
filter-namestruts2/filter-name
filter-class

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

!-- Override so that we can replace struts-default.xml with 
struts-sca-default.xml --
init-param
param-nameconfig /param-name

param-valuestruts-sca-default.xml,struts-plugin.xml,struts.xml/param-value
/init-param
/filter

In my custom TemplateEngineManager, I extended the existing 
TemplateEngineManager and overrode the getTemplateEngine() as such:

public TemplateEngine getTemplateEngine(Template template, String 
templateTypeOverride)
{
TemplateEngine engSelected = super.getTemplateEngine(template, 
templateTypeOverride);

if(engSelected instanceof JavaTemplateEngine)
{
if(simple.equalsIgnoreCase(template.getTheme()))
{ 
return engSelected;
} // end if
else
{
// JavaTemplateEngine currently only supports the simple 
theme, so need to override
return super.getTemplateEngine(template, DEFAULT_TEMPLATE_TYPE);
} // end else
} // end if
else
{
return engSelected;
} // end else
} // end getTemplateEngine


Thanks,
Ken

-Original Message-
From: Hoying, Ken [mailto:ken_hoy...@premierinc.com] 
Sent: Monday, February 15, 2010 12:35 PM
To: Struts Users Mailing List
Subject: [Q] JavaTemplate Plugin

I would like to make use of the JavaTemplate Plugin in order to improve my 
applications performance.  However, I do have ajax themed tags, as well as, 
some of my own theme tags.  I perfectly realize that the any non simple theme 
tags would not be able to take advantage of the performance improvement.  
However, I cannot seem to get my application to work at all.  Does this mean 
that in order to use this plugin, I can only use the simple theme and no 
other?

Cannot render tag [head] because theme [ajax] was not found. - [unknown 
location]
at 
org.apache.struts2.views.java.JavaTemplateEngine.renderTemplate(JavaTemplateEngine.java:58)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
at org.apache.struts2.components.UIBean.end(UIBean.java:513)
-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

-
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: [Q] JavaTemplate Plugin

2010-02-17 Thread Hoying, Ken
Issue registered:  https://issues.apache.org/jira/browse/WW-3386


-Original Message-
From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] 
Sent: Wednesday, February 17, 2010 11:44 AM
To: Struts Users Mailing List
Subject: Re: [Q] JavaTemplate Plugin

2010/2/17 Hoying, Ken ken_hoy...@premierinc.com:
 This ended up being a little tougher to accomplish than I had expected.

 I tried to override the TemplateEngineManager by specifying the bean in my 
 struts.xml file.  However, struts did not like that there was one already 
 loaded from the struts-default.xml.

 So I created a copy of the struts-default.xml and placed it in my class path 
 with a different name.  In this new default xml I replaced the configuration 
 for the TemplateEngineManager with one that specified my class.  I then 
 updated the filter configuration in my web.xml to load my default xml file 
 instead of the struts default xml.

        filter
                filter-namestruts2/filter-name
                filter-class
                        
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
                /filter-class

                !-- Override so that we can replace struts-default.xml with 
 struts-sca-default.xml --
                init-param
                param-nameconfig /param-name
                
 param-valuestruts-sca-default.xml,struts-plugin.xml,struts.xml/param-value
        /init-param
        /filter

 In my custom TemplateEngineManager, I extended the existing 
 TemplateEngineManager and overrode the getTemplateEngine() as such:

    public TemplateEngine getTemplateEngine(Template template, String 
 templateTypeOverride)
    {
        TemplateEngine engSelected = super.getTemplateEngine(template, 
 templateTypeOverride);

        if(engSelected instanceof JavaTemplateEngine)
        {
            if(simple.equalsIgnoreCase(template.getTheme()))
            {
                return engSelected;
            } // end if
            else
            {
                // JavaTemplateEngine currently only supports the simple 
 theme, so need to override
                return super.getTemplateEngine(template, 
 DEFAULT_TEMPLATE_TYPE);
            } // end else
        } // end if
        else
        {
            return engSelected;
        } // end else
    } // end getTemplateEngine


 Thanks,
 Ken

Could you register this as a new issue?
https://issues.apache.org/jira/browse/


Pozdrawiam
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

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


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

RE: [Q] Enable Freemarker template caching

2010-02-16 Thread Hoying, Ken
Not exactly sure what you are attempting, but you can utilize OGNL in 
struts.xml and in particular within results.  Take a look at the following and 
see if it is any help:

http://struts.apache.org/2.1.8.1/docs/parameters-in-configuration-results.html

 

-Original Message-
From: Oscar [mailto:oscar.kalde...@gmail.com] 
Sent: Monday, February 15, 2010 11:53 PM
To: Struts Users Mailing List
Subject: Re: [Q] Enable Freemarker template caching

Hi to all, i have a doubt about struts 2. Is possible to write ognl
expressions on struts.xml . Let's say, something like wildcards but instead
wildcards build the value of result with some attribute from request or a
value of session, that's possible?

THanks in regard

-- 
Oscar
-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

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



[Q] Configuration Parameter: struts.configuration

2010-02-16 Thread Hoying, Ken
I have a need to override a bean that is present in the struts default 
configuration.  Specifically: 
org.apache.struts2.components.template.TemplateEngineManager

However, it appears that the default configuration loader does not allow for 
this to be overwritten.  As a result, I get the following error during 
deployment:

 Caused by: Unable to load bean: 
type:org.apache.struts2.components.template.TemplateEngineManager 
class:com.premierinc.sca.actions.util.ScaTemplateEngineManager - bean - 
vfsfile:/C:/jboss5/server/sca-app/deploy/scaEar.ear/webapp.war/WEB-INF/classes/struts.xml:40:71
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:221)
at 
org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:169)
at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)

I would like to be able to specify my own configuration loader (specifically 
override the class:  org.apache.struts2.config.StrutsXmlConfigurationProvider).

I thought that this would just be a matter of utilizing the struts.properties 
setting (http://struts.apache.org/2.1.8.1/docs/strutsproperties.html):

### Specifies the Configuration used to configure Struts
### one could extend org.apache.struts2.config.Configuration
### to build one's customize way of getting the configurations parameters into 
Struts
# struts.configuration=org.apache.struts2.config.DefaultConfiguration

However, it does not appear to be working as I thought.  Now I am not sure what 
this setting does at all.  The class specified in the help 
(org.apache.struts2.config.Configuration) does not even exist.

Can someone please point me in the right direction?

Thanks in advance,
Ken






-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

RE: [Q] Configuration Parameter: struts.configuration

2010-02-16 Thread Hoying, Ken
It appears that the strust.configuration setting in struts.properties was not 
what I was really looking for.

I needed to make the config change to the web.xml and the Struts filter:
http://struts.apache.org/2.1.8.1/docs/webxml.html

Thanks,
Ken


-Original Message-
From: Hoying, Ken [mailto:ken_hoy...@premierinc.com] 
Sent: Tuesday, February 16, 2010 3:10 PM
To: Struts Users Mailing List
Subject: [Q] Configuration Parameter: struts.configuration

I have a need to override a bean that is present in the struts default 
configuration.  Specifically: 
org.apache.struts2.components.template.TemplateEngineManager

However, it appears that the default configuration loader does not allow for 
this to be overwritten.  As a result, I get the following error during 
deployment:

 Caused by: Unable to load bean: 
type:org.apache.struts2.components.template.TemplateEngineManager 
class:com.premierinc.sca.actions.util.ScaTemplateEngineManager - bean - 
vfsfile:/C:/jboss5/server/sca-app/deploy/scaEar.ear/webapp.war/WEB-INF/classes/struts.xml:40:71
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:221)
at 
org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:169)
at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)

I would like to be able to specify my own configuration loader (specifically 
override the class:  org.apache.struts2.config.StrutsXmlConfigurationProvider).

I thought that this would just be a matter of utilizing the struts.properties 
setting (http://struts.apache.org/2.1.8.1/docs/strutsproperties.html):

### Specifies the Configuration used to configure Struts
### one could extend org.apache.struts2.config.Configuration
### to build one's customize way of getting the configurations parameters into 
Struts
# struts.configuration=org.apache.struts2.config.DefaultConfiguration

However, it does not appear to be working as I thought.  Now I am not sure what 
this setting does at all.  The class specified in the help 
(org.apache.struts2.config.Configuration) does not even exist.

Can someone please point me in the right direction?

Thanks in advance,
Ken






-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

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



[Q] JavaTemplate Plugin

2010-02-15 Thread Hoying, Ken
I would like to make use of the JavaTemplate Plugin in order to improve my 
applications performance.  However, I do have ajax themed tags, as well as, 
some of my own theme tags.  I perfectly realize that the any non simple theme 
tags would not be able to take advantage of the performance improvement.  
However, I cannot seem to get my application to work at all.  Does this mean 
that in order to use this plugin, I can only use the simple theme and no 
other?

Cannot render tag [head] because theme [ajax] was not found. - [unknown 
location]
at 
org.apache.struts2.views.java.JavaTemplateEngine.renderTemplate(JavaTemplateEngine.java:58)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
at org.apache.struts2.components.UIBean.end(UIBean.java:513)
-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

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



[Q] TabbedPanel changes in 2.1.8.1??

2010-02-15 Thread Hoying, Ken
I am in the process of upgrading from Struts 2.0.11.1 to 2.1.8.1 and am having 
some issues with the TabbedPanel.

Previously, I had customized how the TabbedPanel looks by setting the 
templateCssPath attribute to the location of a CSS file that was a copy of the 
provided TabContainer.css with my changes.  I made a few minor changes which 
included pointing to different image files with different names.  This worked 
great in 2.0.11.1.  However, it does not appear to be working at all in 2.1.8.1.

When I look at the HTTP header in my browser, it does look like the control is 
attempting to do something with the templateCssPath that I provided.  I just 
cannot tell what.  In particular, I notice the following in my HTTP headers 
when using 2.1.8.1:

68:29:11.8230.345   800 260 GET 200 text/css
http://localhost:8180/sca/struts/TabbedPanel.css
68:29:11.9610.274   823 1186GET 404 text/html 
(NS_IMAGELIB_ERROR_NO_DECODER)
http://localhost:8180/sca/static/css/images/tab_left.gif
68:29:12.0360.222   828 1201GET 404 text/html 
(NS_IMAGELIB_ERROR_NO_DECODER)
http://localhost:8180/sca/static/css/images/tab_top_right.gif

If I remove the templateCssPath, I notice the following in my HTTP headers when 
using 2.1.8.1:

00:00:02.5820.286   800 260 GET 200 text/css
http://localhost:8180/sca/struts/TabbedPanel.css
00:00:02.6870.203   845 260 GET 200 image/gif   
http://localhost:8180/sca/struts/dojo/src/widget/templates/images/tab_left.gif
00:00:02.7700.126   850 260 GET 200 image/gif   
http://localhost:8180/sca/struts/dojo/src/widget/templates/images/tab_top_right.gif

This is what is looks likes using 2.0.11.1 with the templateCssPath set:

00:00:47.1490.233   13863919GET 200 text/css
http://localhost:8180/sca/static/css/tabContainerGray.css
00:00:47.5260.026   1405518 GET 200 text/html   
http://localhost:8180/sca/struts/dojo/src/widget/templates/TabContainer.html
00:00:47.6450.131   13561556GET 200 image/gif   
http://localhost:8180/sca/static/images/gray_tab_left.gif
00:00:47.7240.062   13613318GET 200 image/gif   
http://localhost:8180/sca/static/images/gray_tab_top_right.gif

Am I doing something wrong or is this a bug?

Thanks in advance,
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

[Q] Enable Freemarker template caching

2010-02-15 Thread Hoying, Ken
I am finding the text regarding the enablement of Freemarker template caching 
in the performance tuning document 
(http://struts.apache.org/2.1.8.1/docs/performance-tuning.html) to be a bit 
confusing.

The document states:
start clip
As of Struts 2.0.10, setting the property struts.freemarker.templatesCache  to 
true will enable the Struts internal caching of Freemarker templates. This 
property is set to false by default.

In Struts versions prior to 2.0.10, you had to copy the /template directory 
from the Struts 2 jar in your WEB_APP root to utilize Freemarker's built in 
chaching mechanism in order to achieve similar results.

The built in Freemarker caching mechanism fails to properly cache templates 
when they are retrieved from the classpath. Copying them to the WEB_APP root 
allows Freemarker to cache them correctly. Freemarker looks at the last 
modified time of the template to determine if it needs to reload the templates. 
Resources retrieved from the classpath have no last modified time, so 
Freemarker will reload them on every request.
end clip

I am confused.  Do I or don't I need to copy the Freemarker templates to my 
WEBAPP to take advantage of the caching?  Do I copy them to WEBAPP\template\..  
or to WEBAPP\struts\template like with the static content?

Thanks,
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

JavaTemplate Plugin

2010-02-12 Thread Hoying, Ken
I would like to make use of the JavaTemplate Plugin in order to improve my 
applications performance.  However, I do have ajax themed tags, as well as, 
some of my own theme tags.  I perfectly realize that the any non simple theme 
tags would not be able to take advantage of the performance improvement.  
However, I cannot seem to get my application to work at all.  Does this mean 
that in order to use this plugin, I can only use the simple theme and no 
other?

Cannot render tag [head] because theme [ajax] was not found. - [unknown 
location]
at 
org.apache.struts2.views.java.JavaTemplateEngine.renderTemplate(JavaTemplateEngine.java:58)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
at org.apache.struts2.components.UIBean.end(UIBean.java:513)



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

RE: Upgrading xWork??

2009-07-23 Thread Hoying, Ken
The 2.1.4 code for xWork is as you posted with the synchronized block.  
However, the 2.0.4 code does not contain the symbolization block.  As a result, 
it appears that my threads are sometimes hanging.  I am not getting any errors 
in the log.  What is happening on occasion (not very often) is some sort of 
contention will happen and user threads will start hanging.  

When a thread dump is done, the hung threads are all seem hung on the same 
HahsMap get() method from the call made in the line below:
MessageFormat format = (MessageFormat) messageFormats.get(key);

The line below being from the 2.0.4 code:

private static MessageFormat buildMessageFormat(String pattern, Locale locale) {
MessageFormatKey key = new MessageFormatKey(pattern, locale);
MessageFormat format = (MessageFormat) messageFormats.get(key);
if (format == null) {
format = new MessageFormat(pattern);
format.setLocale(locale);
format.applyPattern(pattern);
messageFormats.put(key, format);
}

return format;
} 

Thanks,
Ken

-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com] 
Sent: Wednesday, July 22, 2009 7:38 PM
To: Struts Users Mailing List
Subject: RE: Upgrading xWork??


i'm running xwork-2.1.4

private static final MapMessageFormatKey, MessageFormat messageFormats = new 
HashMapMessageFormatKey, MessageFormat();  private static MessageFormat 
buildMessageFormat(String pattern, Locale locale) {
MessageFormatKey key = new MessageFormatKey(pattern, locale);
MessageFormat format = null;
synchronized (messageFormats) 
{
format = (MessageFormat) messageFormats.get(key);
if (format == null) {
format = new MessageFormat(pattern);
format.setLocale(locale);
format.applyPattern(pattern);
messageFormats.put(key, format);
}
}
return format;
}
//same as your latest version
can you display the synchronisation errors from the log?

thanks,
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, 22 Jul 2009 13:39:02 -0700
 Subject: Re: Upgrading xWork??
 From: thechrispr...@gmail.com
 To: user@struts.apache.org
 
 I'd still suggest making your changes to the 2.0.5 source, since it 
 most likely has other bug fixes that you just haven't needed yet.
   (*Chris*)
 
 On Wed, Jul 22, 2009 at 1:21 PM, Hoying, Ken ken_hoy...@premierinc.comwrote:
 
  I checked and it was not.  Thank you though.  It only seems to 
  appear in the 2.1.x versions.
 
  -Original Message-
  From: Chris Pratt [mailto:thechrispr...@gmail.com]
  Sent: Wednesday, July 22, 2009 4:08 PM
  To: Struts Users Mailing List
  Subject: Re: Upgrading xWork??
 
  If I remember correctly there was a 2.0.5 that was probably 
  compatible with the 2.0.x versions of Struts 2, but I have no idea 
  if that fix is in that version.
   (*Chris*)
 
 
  On Wed, Jul 22, 2009 at 9:47 AM, Hoying, Ken 
  ken_hoy...@premierinc.com
  wrote:
 
   We are running with Struts 2.0.1.1 (which uses xWork 2.0.4) and 
   are noticing that we are getting hung threads sometimes on a 
   HashMap call from com.opensymphony.xwork2.util.LocalizedTextUtil.
  
   It looks like the xWork code is question needs to be synchronized 
   and is causing the threads to lock due to corruption in the 
   HashMap.  The problem code from xWork 2.0.4 is:
  
   private static MessageFormat buildMessageFormat(String pattern, 
   Locale
   locale) {
  MessageFormatKey key = new MessageFormatKey(pattern, locale);
  MessageFormat format = (MessageFormat) messageFormats.get(key);
  if (format == null) {
  format = new MessageFormat(pattern);
  format.setLocale(locale);
  format.applyPattern(pattern);
  messageFormats.put(key, format);
  }
  
  return format;
  }
  
   I noticed

Upgrading xWork??

2009-07-22 Thread Hoying, Ken
We are running with Struts 2.0.1.1 (which uses xWork 2.0.4) and are noticing 
that we are getting hung threads sometimes on a HashMap call from 
com.opensymphony.xwork2.util.LocalizedTextUtil.

It looks like the xWork code is question needs to be synchronized and is 
causing the threads to lock due to corruption in the HashMap.  The problem code 
from xWork 2.0.4 is:

private static MessageFormat buildMessageFormat(String pattern, Locale locale) {
MessageFormatKey key = new MessageFormatKey(pattern, locale);
MessageFormat format = (MessageFormat) messageFormats.get(key);
if (format == null) {
format = new MessageFormat(pattern);
format.setLocale(locale);
format.applyPattern(pattern);
messageFormats.put(key, format);
}

return format;
}

I noticed that in later version of xWork this appears to have been fixed by the 
following change:

private static MessageFormat buildMessageFormat(String pattern, Locale locale) {
 MessageFormatKey key = new MessageFormatKey(pattern, locale);
 MessageFormat format = null;
 synchronized(messageFormats) {
 format = (MessageFormat) messageFormats.get(key);
 if (format == null) {
 format = new MessageFormat(pattern);
 format.setLocale(locale);
 format.applyPattern(pattern);
 messageFormats.put(key, format);
 }
 }

 return format;
 }



So my question is, has anyone attempted to upgrade the xWork library to a later 
version in Struts 2.0.1.1?  And if so, what version did you use and what was 
your experience?

Thank you in advance!
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

RE: Upgrading xWork??

2009-07-22 Thread Hoying, Ken
I mis-typed to Struts version we are using.  It is 2.0.11.1.

I looked at the code history and interestingly enough, this fix does not appear 
to be in any 2.0.x release, including the latest 2.0.7 from 11/15/08.

However, the fix is included in release 2.1.0 from 10/15/07.

Does anyone have experience using an xWork version 2.1.x with Struts 2.0.11.1?

Thank you!
Ken


-Original Message-
From: Hoying, Ken [mailto:ken_hoy...@premierinc.com]
Sent: Wednesday, July 22, 2009 12:47 PM
To: user@struts.apache.org
Subject: Upgrading xWork??

We are running with Struts 2.0.1.1 (which uses xWork 2.0.4) and are noticing 
that we are getting hung threads sometimes on a HashMap call from 
com.opensymphony.xwork2.util.LocalizedTextUtil.

It looks like the xWork code is question needs to be synchronized and is 
causing the threads to lock due to corruption in the HashMap.  The problem code 
from xWork 2.0.4 is:

private static MessageFormat buildMessageFormat(String pattern, Locale locale) {
MessageFormatKey key = new MessageFormatKey(pattern, locale);
MessageFormat format = (MessageFormat) messageFormats.get(key);
if (format == null) {
format = new MessageFormat(pattern);
format.setLocale(locale);
format.applyPattern(pattern);
messageFormats.put(key, format);
}

return format;
}

I noticed that in later version of xWork this appears to have been fixed by the 
following change:

private static MessageFormat buildMessageFormat(String pattern, Locale locale) {
 MessageFormatKey key = new MessageFormatKey(pattern, locale);
 MessageFormat format = null;
 synchronized(messageFormats) {
 format = (MessageFormat) messageFormats.get(key);
 if (format == null) {
 format = new MessageFormat(pattern);
 format.setLocale(locale);
 format.applyPattern(pattern);
 messageFormats.put(key, format);
 }
 }

 return format;
 }



So my question is, has anyone attempted to upgrade the xWork library to a later 
version in Struts 2.0.1.1?  And if so, what version did you use and what was 
your experience?

Thank you in advance!
Ken



-
***Note:The information contained in this message may be privileged and 
confidential and protected from disclosure. If the reader of this message is 
not the intended recipient, or an employee or agent responsible for delivering 
this message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify 
the Sender immediately by replying to the message and deleting it from your 
computer.  Thank you.  Premier Inc.

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



RE: Upgrading xWork??

2009-07-22 Thread Hoying, Ken
Thank you, Haroon.

I looked through the forum originally but may have missed the post.  I will 
take another look.

Thank you,
Ken 

-Original Message-
From: Haroon Rafique [mailto:haroon.rafi...@utoronto.ca] 
Sent: Wednesday, July 22, 2009 1:25 PM
To: Struts Users Mailing List
Subject: RE: Upgrading xWork??

On Today at 1:04pm, HK=Hoying, Ken ken_hoy...@premierinc.com wrote:

HK [..snip..]
HK 
HK Does anyone have experience using an xWork version 2.1.x with Struts 
2.0.11.1?
HK 

I say this, based on no evidence other than remembering it from a thread 
earlier, that xwork 2.1.x is incompatiple with struts 2.0.x because of lot of 
internal changes. I know for sure that the other way around, i.e., struts 2.1.x 
will not work with xwork 2.0.x.

Later,
--
Haroon Rafique
haroon.rafi...@utoronto.ca


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org 
-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

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



RE: Upgrading xWork??

2009-07-22 Thread Hoying, Ken
Thanks, Wes.

That is our fallback plan and most likely the route we will take.

Thanks,
Ken 

-Original Message-
From: Wes Wannemacher [mailto:w...@wantii.com] 
Sent: Wednesday, July 22, 2009 1:33 PM
To: Struts Users Mailing List
Subject: Re: Upgrading xWork??

I would say that you're better off grabbing the source for the version you are 
using and adding that fix you found and building your own copy. It's not great, 
but if you don't want to upgrade to struts 2.1.x, then patching is your best 
bet.

-Wes

On Wed, Jul 22, 2009 at 1:25 PM, Haroon
Rafiqueharoon.rafi...@utoronto.ca wrote:
 On Today at 1:04pm, HK=Hoying, Ken ken_hoy...@premierinc.com wrote:

 HK [..snip..]
 HK
 HK Does anyone have experience using an xWork version 2.1.x with Struts 
 2.0.11.1?
 HK

 I say this, based on no evidence other than remembering it from a 
 thread earlier, that xwork 2.1.x is incompatiple with struts 2.0.x 
 because of lot of internal changes. I know for sure that the other way 
 around, i.e., struts 2.1.x will not work with xwork 2.0.x.

 Later,
 --
 Haroon Rafique
 haroon.rafi...@utoronto.ca


 -
 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 
-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

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



RE: Upgrading xWork??

2009-07-22 Thread Hoying, Ken
I checked and it was not.  Thank you though.  It only seems to appear in the 
2.1.x versions. 

-Original Message-
From: Chris Pratt [mailto:thechrispr...@gmail.com] 
Sent: Wednesday, July 22, 2009 4:08 PM
To: Struts Users Mailing List
Subject: Re: Upgrading xWork??

If I remember correctly there was a 2.0.5 that was probably compatible with the 
2.0.x versions of Struts 2, but I have no idea if that fix is in that version.
  (*Chris*)


On Wed, Jul 22, 2009 at 9:47 AM, Hoying, Ken ken_hoy...@premierinc.comwrote:

 We are running with Struts 2.0.1.1 (which uses xWork 2.0.4) and are 
 noticing that we are getting hung threads sometimes on a HashMap call 
 from com.opensymphony.xwork2.util.LocalizedTextUtil.

 It looks like the xWork code is question needs to be synchronized and 
 is causing the threads to lock due to corruption in the HashMap.  The 
 problem code from xWork 2.0.4 is:

 private static MessageFormat buildMessageFormat(String pattern, Locale
 locale) {
MessageFormatKey key = new MessageFormatKey(pattern, locale);
MessageFormat format = (MessageFormat) messageFormats.get(key);
if (format == null) {
format = new MessageFormat(pattern);
format.setLocale(locale);
format.applyPattern(pattern);
messageFormats.put(key, format);
}

return format;
}

 I noticed that in later version of xWork this appears to have been 
 fixed by the following change:

 private static MessageFormat buildMessageFormat(String pattern, Locale
 locale) {
 MessageFormatKey key = new MessageFormatKey(pattern, locale);
 MessageFormat format = null;
 synchronized(messageFormats) {
 format = (MessageFormat) messageFormats.get(key);
 if (format == null) {
 format = new MessageFormat(pattern);
 format.setLocale(locale);
 format.applyPattern(pattern);
 messageFormats.put(key, format);
 }
 }

 return format;
 }



 So my question is, has anyone attempted to upgrade the xWork library 
 to a later version in Struts 2.0.1.1?  And if so, what version did you 
 use and what was your experience?

 Thank you in advance!
 Ken



 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you 
 are hereby notified that any dissemination, distribution or copying of 
 this communication is strictly prohibited.  If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer.  Thank 
 you.  Premier Inc.

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



[S2] Ajax Anchor Tag

2009-02-03 Thread Hoying, Ken
 I would like to take advantage of the Struts 2 Ajax Anchor tag's functionality 
to build the url on the client based on an href and the parameters for a given 
form (formId).  However, I do not want the call to be made asynchronously.  I 
just want it to build the url and then get it normally.  I am using Struts 
2.0.11.1.  Is there a way that to accomplish this?

Thanks in advance,
Ken
-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

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



RE: [S2] Ajax Anchor Tag

2009-02-03 Thread Hoying, Ken
 That is what I had hoped for.  Unfortunately, it appears that the formId 
property is only considered when using the ajax theme.

Thanks,
Ken

-Original Message-
From: Wes Wannemacher [mailto:w...@wantii.com]
Sent: Tuesday, February 03, 2009 2:45 PM
To: Struts Users Mailing List
Subject: Re: [S2] Ajax Anchor Tag

On Tuesday 03 February 2009 14:39:25 Hoying, Ken wrote:
  I would like to take advantage of the Struts 2 Ajax Anchor tag's
 functionality to build the url on the client based on an href and the
 parameters for a given form (formId).  However, I do not want the call
 to be made asynchronously.  I just want it to build the url and then
 get it normally.  I am using Struts 2.0.11.1.  Is there a way that to
 accomplish this?

 Thanks in advance,
 Ken

I believe if you are using the simple theme (or any non-ajax theme) the url 
will be built and a link made for a synchronous request.

-Wes

--

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


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

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



[S2] OgnlException for ServletRedirectResult

2008-09-26 Thread Hoying, Ken

I am need to be able to redirect to a url from Struts2 passing in an odd
looking parameter name.  The parameter name is '6578706f7274'. I know..
I would love to change the name to something else a little more
reasonable but I can't as it is for a call to a third party component
(Thanks, DisplayTag!).

It seems that OGNL is trying to split the name or convert it into a
number and splitting it at the 'f''.  However, this makes no sense to me
what so ever.  Why is OGNL even trying to parse the param name?  Why
does it care?  I just want the name and value added to the request
string. 

I am running out of ideas around this.  Does anyone have anything?  

Thanks in advance,
Ken

result name=DownloadContractSearch type=redirect
param name=locationContractSearchGet.action/param
param name=6578706f72741/param
param name=parsetrue/param
param
name=d-3998960-e${exportType}/param
param
name=searchId${parameters['searchId']}/param
/result


Caught OgnlException while setting property '6578706f7274' on type
'org.apache.struts2.dispatcher.ServletRedirectResult'. - action -
file:/C:/jboss/server/default/deploy/scaEar-1.0-SNAPSHOT.ear/webapp.war/
WEB-INF/classes/struts-catalog.xml:803:88
at
com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActi
onInvocation.java:199)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:342)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:253)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInterce
pt(DefaultWorkflowInterceptor.java:221)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept
(ConversionErrorInterceptor.java:123)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Pa
rametersInterceptor.java:167)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInt
erceptor.java:83)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Chaini
ngInterceptor.java:115)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterc
eptor.java:143)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at

RE: [S2] OgnlException for ServletRedirectResult

2008-09-26 Thread Hoying, Ken
Thanks, Dave!

I was able to get it to work, as you suggested, by setting everything in
the location param.

Thank you!
Ken 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 26, 2008 4:33 PM
To: Struts Users Mailing List
Subject: Re: [S2] OgnlException for ServletRedirectResult

--- On Fri, 9/26/08, Hoying, Ken wrote:
 It seems that OGNL is trying to split the name or convert it into a 
 number and splitting it at the 'f''.  However, this makes no sense to 
 me what so ever.  Why is OGNL even trying to parse the param name?  
 Why does it care?

Because that's how parameters are set on results or actions-by the
parameter name.

The first thing I'd try is:

result name=DownloadContractSearch type=redirect
  param name=locationContractSearchGet.action?6578706f7274=l/param
  param name=parsetrue/param
  ...

Most likely the other non-legal Java identifier will give a similar
error.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Ajax DIV Question

2008-08-06 Thread Hoying, Ken
THANK YOU!!!

That fixed the problem.  Thank you for taking the time to share.

I hate not having a message for the users there though.  Does anyone
know of a fix for this?

Thanks in advance!
 

-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2008 2:06 AM
To: Struts Users Mailing List
Subject: Re: [S2] Ajax DIV Question

Hoying, Ken wrote:
  I was able to update the href and formId via JavaScript and DOJO as
 follows:

 dojo.widget.byId('divId').href = 'myUrl'; 
 dojo.widget.byId('divId').formId = 'myFormId';

 This works fine as long as the form itself was not loaded infot the 
 DIV (divId).  However, if myFormId is located in divId and was loaded 
 into the div via the initial ajax call, then it does not work.

 Any ideas?
   
Set showLoadingText=false on the relevant tags/widgets.
It's a bug in Dojo in IE where it overwites the form with the loading
text prior to reading the values from the request.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Ajax DIV Question

2008-08-06 Thread Hoying, Ken
Thanks!  I saw the indicator property right after I sent the email.
Works like a charm.

Thank you! 

-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2008 8:52 AM
To: Struts Users Mailing List
Subject: Re: [S2] Ajax DIV Question


Dave Newton wrote:
 http://struts.apache.org/2.x/docs/dojo-submit.html

 Put the notification message in a different div?

 Dave
   

Yeah, use the indicator attribute to show/hide an image as per the
example at the top of that page. It looks better too.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Ajax DIV Question

2008-08-05 Thread Hoying, Ken
 I was able to update the href and formId via JavaScript and DOJO as
follows:

dojo.widget.byId('divId').href = 'myUrl';
dojo.widget.byId('divId').formId = 'myFormId';

This works fine as long as the form itself was not loaded infot the DIV
(divId).  However, if myFormId is located in divId and was loaded into
the div via the initial ajax call, then it does not work.

Any ideas?

Thanks in advance,
Ken

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2008 10:48 AM
To: user@struts.apache.org
Subject: [S2] Ajax DIV Question

I have a tabbed panel.  I would like to refresh the contents of this tab
and am able to do so by publishing to the proper topic.  However, I
really need to take it a step further and be able to dynamically specify
the formid and href attributes of the Ajax DIV in my JavaScript, before
refreshing it.  Is there a way to do this?

If I cannot do this, then I guess my next option would be to use
multiple nested Ajax DIVs.  I believe that this would work okay if I
could specify that these DIVs not preload.  However, it appears that
this is functionality was not added until 2.1 and I am using 2.0.11.
Would there be another way to accomplish this?

Thanks in advance,
Ken  


-
***Note:The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited.  If you have received this
communication in error, please notify the Sender immediately by replying
to the message and deleting it from your computer.  Thank you.  Premier
Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Ajax DIV Question

2008-08-04 Thread Hoying, Ken
I have a tabbed panel.  I would like to refresh the contents of this tab
and am able to do so by publishing to the proper topic.  However, I
really need to take it a step further and be able to dynamically specify
the formid and href attributes of the Ajax DIV in my JavaScript, before
refreshing it.  Is there a way to do this?

If I cannot do this, then I guess my next option would be to use
multiple nested Ajax DIVs.  I believe that this would work okay if I
could specify that these DIVs not preload.  However, it appears that
this is functionality was not added until 2.1 and I am using 2.0.11.
Would there be another way to accomplish this?

Thanks in advance,
Ken  


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

[S2] Validator Framework

2008-06-19 Thread Hoying, Ken

I would like to use the Struts2 validation classes outside of Struts2.
What I would like to do specifically is use the UrlValidator to test a
string to determine if it is a URL and if it is create the link and if
not just display the value.  I would like to use the validator for this
since we use it other places to validate url input and in this way the
algorithim used to test URL validity would be consistent.  So I was
hoping to maybe create a simple taglib using the url validator to do the
trick.

Thanks in Advance!
Ken


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer.  Thank you.  Premier Inc.

RE: Re: [S2] Advice on Handling CLOBs in Struts2

2008-05-22 Thread Hoying, Ken
 Sorry, I misunderstood what you were asking.  I believe that it
probably does use the current request response.  

I guess I am a bit confused then on the action tag.  Does it or does it
not support content from a streamed result?  Is this intended
functionality or a bug?  I am able to use the action tag to JSP result.
I get an error if I try to use a stream result.  I get an error if I try
to get the response outputstream in the JSP and write to it.  I get an
error if I try to get the response outputstream in my action and write
to it.

It was my impression from the documentation surrounding the result
stream and the action tag, that my approach of using the stream result
type and calling the associated action using the action tag would be the
proper way to stream my CLOB to the page.

I guess I am going about this the wrong way.  What is the correct way
then to stream a large amount of data to be placed in a page in Struts2?
I have a CLOB that I need to display on the page and cannot figure out
how to do this in Struts2.  

Thank you,
Ken

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 21, 2008 4:29 PM
To: Struts Users Mailing List
Subject: RE: Re: [S2] Advice on Handling CLOBs in Struts2

--- Hoying, Ken [EMAIL PROTECTED] wrote:
 It appears to and that is my understanding.  

It appears to what, make a request? Where does it appear to do that? In
the code it looks like it just creates an action proxy and calls execute
on it. Without doing any real digging it looks like it uses the current
request/response/etc. in the action context for the action proxy.

 The examples show it as a way to include images that are built from an

 action.

Which examples?

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Advice on Handling CLOBs in Struts2

2008-05-21 Thread Hoying, Ken
Generally when working with Struts2, we have been loading a domaon
object from the database in our action and then sending then referencing
the properties as needed from the JSP to generate our output.  

However, we now what could potentially be a large amount of data stored
in a CLOB.  Using the method that we have been using to date, we would
have to place the entire CLOB in a string in the action and then access
it from the JSP.  Obviously, we would like to avoid doing that.  

I was wondering if anyone else had come across this and how they had
managed to solve it.  How do we stream the content of the CLOB?

Thank you!
Ken


RE: [S2] Advice on Handling CLOBs in Struts2

2008-05-21 Thread Hoying, Ken
4)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595) 
 

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 21, 2008 9:42 AM
To: user@struts.apache.org
Subject: [S2] Advice on Handling CLOBs in Struts2

Generally when working with Struts2, we have been loading a domaon
object from the database in our action and then sending then referencing
the properties as needed from the JSP to generate our output.  

However, we now what could potentially be a large amount of data stored
in a CLOB.  Using the method that we have been using to date, we would
have to place the entire CLOB in a string in the action and then access
it from the JSP.  Obviously, we would like to avoid doing that.  

I was wondering if anyone else had come across this and how they had
managed to solve it.  How do we stream the content of the CLOB?

Thank you!
Ken

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Advice on Handling CLOBs in Struts2 - Help with IllegalStateException

2008-05-21 Thread Hoying, Ken
 I still cannot figure out why I am getting this error.  However, if I
do not use a stream result and use a result that returns a JSP then all
works. 

Any help would be greatly apprecietd!

Thanks,
Ken

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 21, 2008 12:46 PM
To: Struts Users Mailing List
Subject: RE: [S2] Advice on Handling CLOBs in Struts2

I have tried to accomplish this by creating an action with a stream
result type.

I am then including calling the action from with in my JSP page using
the s:action tag.  

Unfortunately though, I am getting the following error:

[2008-05-21 11:26:25,702] [http-0.0.0.0-8080-2] [ERROR] []
[ts2.components.ActionComponent]: Could not execute action:
/catalog/ContractDetailsNote
java.lang.IllegalStateException: getWriter() has already been called for
this response
at
org.apache.catalina.connector.Response.getOutputStream(Response.java:573
)
at
org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFac
ade.java:183)
at
org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java:2
19)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:178)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:348)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:253)
at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:50)
at
org.apache.struts2.components.ActionComponent.executeAction(ActionCompon
ent.java:255)
at
org.apache.struts2.components.ActionComponent.end(ActionComponent.java:1
55)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSu
pport.java:43)
at
org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005faction
_005f0(AjaxContractInfo_jsp.java:413)
at
org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005fiterat
or_005f0(AjaxContractInfo_jsp.java:297)
at
org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005fsort_0
05f0(AjaxContractInfo_jsp.java:247)
at
org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005felse_0
05f0(AjaxContractInfo_jsp.java:200)
at
org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspService(AjaxContrac
tInfo_jsp.java:99)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:373)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:654)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio
nDispatcher.java:445)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:379)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:292)
at
org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletD
ispatcherResult.java:139)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:178)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:348)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:253)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInterce
pt(DefaultWorkflowInterceptor.java:221)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.TimerInterceptor.invokeUnderTiming(T
imerInterceptor.java:125)
at
com.opensymphony.xwork2.interceptor.TimerInterceptor.intercept(TimerInte
rceptor.java:112)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java

RE: Re: [S2] Advice on Handling CLOBs in Struts2

2008-05-21 Thread Hoying, Ken
Thank you for the response.  Below is my config for the action.  Please
let me know what else I am missing.  I am at a real loss.  I would hate
to have to create a JSP and place Java code in there to do the streaming
or to stream directly in the action.  I would really like to do it in
keeping with the Strust2 framework.

action name=ContractDetailsNote
class=actnContractDetail method=streamNote
result name=success type=stream
param
name=inputNamenoteStream/param
param
name=contentTypetext/html/param
param name=bufferSize1024/param
/result
result
name=error/jsps/catalog/DisplayError.jsp/result
/action

Here is the call in my JSP page:

s:action name=ContractDetailsNote
executeResult=true 
s:param name=contractDetailId
value=contractDetailId/
/s:action 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, May 21, 2008 2:09 PM
To: user@struts.apache.org
Subject: Re: [S2] Advice on Handling CLOBs in Struts2

Since that's not a normal result of using a stream result, I have to
assume you are doing something wrong. Without seeing the relevant
code/configuration, though, we can't offer much help.

L.

Hoying, Ken wrote:
 I have tried to accomplish this by creating an action with a stream 
 result type.
 
 I am then including calling the action from with in my JSP page using 
 the s:action tag.
 
 Unfortunately though, I am getting the following error:
 
 [2008-05-21 11:26:25,702] [http-0.0.0.0-8080-2] [ERROR] []
 [ts2.components.ActionComponent]: Could not execute action:
 /catalog/ContractDetailsNote
 java.lang.IllegalStateException: getWriter() has already been called 
 for this response
   at
 org.apache.catalina.connector.Response.getOutputStream(Response.java:5
 73
 )
   at
 org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseF
 ac
 ade.java:183)
   at
 org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java
 :2
 19)
   at
 org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResult
 Su
 pport.java:178)
   at
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultA
 ct
 ionInvocation.java:348)
   at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionIn
 vo
 cation.java:253)
   at
 org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.ja
 va
 :50)
   at
 org.apache.struts2.components.ActionComponent.executeAction(ActionComp
 on
 ent.java:255)
   at
 org.apache.struts2.components.ActionComponent.end(ActionComponent.java
 :1
 55)
   at
 org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTag
 Su
 pport.java:43)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005facti
 on
 _005f0(AjaxContractInfo_jsp.java:413)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005fiter
 at
 or_005f0(AjaxContractInfo_jsp.java:297)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005fsort
 _0
 05f0(AjaxContractInfo_jsp.java:247)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005felse
 _0
 05f0(AjaxContractInfo_jsp.java:200)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspService(AjaxContr
 ac
 tInfo_jsp.java:99)
   at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.
 ja
 va:373)
   at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
   at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
 ca
 tionFilterChain.java:290)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
 lt
 erChain.java:206)
   at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispa
 tc
 her.java:654)
   at
 org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicat
 io
 nDispatcher.java:445)
   at
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDi
 sp
 atcher.java:379)
   at
 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDisp
 at
 cher.java:292)
   at
 org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(Servle
 tD
 ispatcherResult.java:139)
   at
 org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResult
 Su
 pport.java:178)
   at
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultA
 ct
 ionInvocation.java:348)
   at
 com.opensymphony.xwork2

RE: Re: [S2] Advice on Handling CLOBs in Struts2

2008-05-21 Thread Hoying, Ken
BTW.. I have tested the stream action by calling it directly by placing
the url to action in the address window of my browser and it works
perfectly then.
 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, May 21, 2008 2:09 PM
To: user@struts.apache.org
Subject: Re: [S2] Advice on Handling CLOBs in Struts2

Since that's not a normal result of using a stream result, I have to
assume you are doing something wrong. Without seeing the relevant
code/configuration, though, we can't offer much help.

L.

Hoying, Ken wrote:
 I have tried to accomplish this by creating an action with a stream 
 result type.
 
 I am then including calling the action from with in my JSP page using 
 the s:action tag.
 
 Unfortunately though, I am getting the following error:
 
 [2008-05-21 11:26:25,702] [http-0.0.0.0-8080-2] [ERROR] []
 [ts2.components.ActionComponent]: Could not execute action:
 /catalog/ContractDetailsNote
 java.lang.IllegalStateException: getWriter() has already been called 
 for this response
   at
 org.apache.catalina.connector.Response.getOutputStream(Response.java:5
 73
 )
   at
 org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseF
 ac
 ade.java:183)
   at
 org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java
 :2
 19)
   at
 org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResult
 Su
 pport.java:178)
   at
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultA
 ct
 ionInvocation.java:348)
   at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionIn
 vo
 cation.java:253)
   at
 org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.ja
 va
 :50)
   at
 org.apache.struts2.components.ActionComponent.executeAction(ActionComp
 on
 ent.java:255)
   at
 org.apache.struts2.components.ActionComponent.end(ActionComponent.java
 :1
 55)
   at
 org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTag
 Su
 pport.java:43)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005facti
 on
 _005f0(AjaxContractInfo_jsp.java:413)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005fiter
 at
 or_005f0(AjaxContractInfo_jsp.java:297)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005fsort
 _0
 05f0(AjaxContractInfo_jsp.java:247)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005felse
 _0
 05f0(AjaxContractInfo_jsp.java:200)
   at
 org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspService(AjaxContr
 ac
 tInfo_jsp.java:99)
   at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.
 ja
 va:373)
   at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
   at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
 ca
 tionFilterChain.java:290)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
 lt
 erChain.java:206)
   at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispa
 tc
 her.java:654)
   at
 org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicat
 io
 nDispatcher.java:445)
   at
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDi
 sp
 atcher.java:379)
   at
 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDisp
 at
 cher.java:292)
   at
 org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(Servle
 tD
 ispatcherResult.java:139)
   at
 org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResult
 Su
 pport.java:178)
   at
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultA
 ct
 ionInvocation.java:348)
   at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionIn
 vo
 cation.java:253)
   at
 com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInter
 ce
 pt(DefaultWorkflowInterceptor.java:221)
   at
 com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
 Me
 thodFilterInterceptor.java:86)
   at
 com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultA
 ct
 ionInvocation.java:224)
   at
 com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultA
 ct
 ionInvocation.java:223)
   at
 com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTime
 rS
 tack.java:455)
   at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionIn
 vo
 cation.java:221)
   at
 com.opensymphony.xwork2.interceptor.TimerInterceptor.invokeUnderTiming
 (T
 imerInterceptor.java:125

RE: Re: [S2] Advice on Handling CLOBs in Struts2

2008-05-21 Thread Hoying, Ken
It appears to and that is my understanding.  The examples show it as a
way to include images that are built from an action.

I tried to punt and stream the result by directly accessing a the
response.getOutputStream() in the JSP and get the error:

java.io.IOException: Stream closed
at
org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20
4)
at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1
15)
at
org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:173)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja
va:956)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:6
09)
at
org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletD
ispatcherResult.java:119)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:178)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:348)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:253)
at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:50)
at
org.apache.struts2.components.ActionComponent.executeAction(ActionCompon
ent.java:255)
at
org.apache.struts2.components.ActionComponent.end(ActionComponent.java:1
55)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSu
pport.java:43)
at
org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005faction
_005f0(AjaxContractInfo_jsp.java:413) 

I then punted again and tried to stream from the action method by
accessing the outputSteam and returning null so that it would not
forward to a result and got the error:

java.lang.IllegalStateException: getWriter() has already been called for
this response
at
org.apache.catalina.connector.Response.getOutputStream(Response.java:573
)
at
org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFac
ade.java:183)
at
com.premierinc.sca.catalog.actions.ContractDetail.streamNote(ContractDet
ail.java:201)  

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 21, 2008 2:52 PM
To: Struts Users Mailing List
Subject: RE: Re: [S2] Advice on Handling CLOBs in Struts2

Does the s:action... take make an actual request?

I guess I assumed it executed the action without making a full request,
which could cause the error you're seeing, as the response would already
have been written to by the time your stream result got ahold of it.

Dave
 
--- Hoying, Ken [EMAIL PROTECTED] wrote:

 BTW.. I have tested the stream action by calling it directly by 
 placing the url to action in the address window of my browser and it 
 works perfectly then.
  
 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
 Sent: Wednesday, May 21, 2008 2:09 PM
 To: user@struts.apache.org
 Subject: Re: [S2] Advice on Handling CLOBs in Struts2
 
 Since that's not a normal result of using a stream result, I have to 
 assume you are doing something wrong. Without seeing the relevant 
 code/configuration, though, we can't offer much help.
 
 L.
 
 Hoying, Ken wrote:
  I have tried to accomplish this by creating an action with a stream
 
  result type.
  
  I am then including calling the action from with in my JSP page
 using
  the s:action tag.
  
  Unfortunately though, I am getting the following error:
  
  [2008-05-21 11:26:25,702] [http-0.0.0.0-8080-2] [ERROR] []
  [ts2.components.ActionComponent]: Could not execute action:
  /catalog/ContractDetailsNote
  java.lang.IllegalStateException: getWriter() has already been
 called
  for this response
  at
 

org.apache.catalina.connector.Response.getOutputStream(Response.java:5
  73
  )
  at
 

org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseF
  ac
  ade.java:183)
  at
 

org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java
  :2
  19)
  at
 

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResult
  Su
  pport.java:178)
  at
 

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultA
  ct
  ionInvocation.java:348)
  at
 

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionIn
  vo
  cation.java:253)
  at
 

org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.ja
  va
  :50)
  at
 

org.apache.struts2.components.ActionComponent.executeAction(ActionComp
  on
  ent.java:255)
  at
 

org.apache.struts2.components.ActionComponent.end(ActionComponent.java
  :1
  55)
  at
 

org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTag
  Su
  pport.java:43)
  at
 

org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005facti
  on
  _005f0(AjaxContractInfo_jsp.java:413)
  at
 

org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp

RE: Re: [S2] Advice on Handling CLOBs in Struts2

2008-05-21 Thread Hoying, Ken
 
BTW:  Both of the test cases (using the JSP and using the action) work
fine when caling the action directly from the browser. They only fail
when calling them using the s:action tag.  Is there some kind of bug
in this tag?  I am using struts 2.0.11.1.

Thanks,
Ken

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 21, 2008 3:48 PM
To: Struts Users Mailing List
Subject: RE: Re: [S2] Advice on Handling CLOBs in Struts2

It appears to and that is my understanding.  The examples show it as a
way to include images that are built from an action.

I tried to punt and stream the result by directly accessing a the
response.getOutputStream() in the JSP and get the error:

java.io.IOException: Stream closed
at
org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20
4)
at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1
15)
at
org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:173)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja
va:956)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:6
09)
at
org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletD
ispatcherResult.java:119)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:178)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:348)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:253)
at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:50)
at
org.apache.struts2.components.ActionComponent.executeAction(ActionCompon
ent.java:255)
at
org.apache.struts2.components.ActionComponent.end(ActionComponent.java:1
55)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSu
pport.java:43)
at
org.apache.jsp.jsps.catalog.AjaxContractInfo_jsp._jspx_meth_s_005faction
_005f0(AjaxContractInfo_jsp.java:413) 

I then punted again and tried to stream from the action method by
accessing the outputSteam and returning null so that it would not
forward to a result and got the error:

java.lang.IllegalStateException: getWriter() has already been called for
this response
at
org.apache.catalina.connector.Response.getOutputStream(Response.java:573
)
at
org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFac
ade.java:183)
at
com.premierinc.sca.catalog.actions.ContractDetail.streamNote(ContractDet
ail.java:201)  

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 21, 2008 2:52 PM
To: Struts Users Mailing List
Subject: RE: Re: [S2] Advice on Handling CLOBs in Struts2

Does the s:action... take make an actual request?

I guess I assumed it executed the action without making a full request,
which could cause the error you're seeing, as the response would already
have been written to by the time your stream result got ahold of it.

Dave
 
--- Hoying, Ken [EMAIL PROTECTED] wrote:

 BTW.. I have tested the stream action by calling it directly by 
 placing the url to action in the address window of my browser and it 
 works perfectly then.
  
 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
 Sent: Wednesday, May 21, 2008 2:09 PM
 To: user@struts.apache.org
 Subject: Re: [S2] Advice on Handling CLOBs in Struts2
 
 Since that's not a normal result of using a stream result, I have to 
 assume you are doing something wrong. Without seeing the relevant 
 code/configuration, though, we can't offer much help.
 
 L.
 
 Hoying, Ken wrote:
  I have tried to accomplish this by creating an action with a stream
 
  result type.
  
  I am then including calling the action from with in my JSP page
 using
  the s:action tag.
  
  Unfortunately though, I am getting the following error:
  
  [2008-05-21 11:26:25,702] [http-0.0.0.0-8080-2] [ERROR] []
  [ts2.components.ActionComponent]: Could not execute action:
  /catalog/ContractDetailsNote
  java.lang.IllegalStateException: getWriter() has already been
 called
  for this response
  at
 

org.apache.catalina.connector.Response.getOutputStream(Response.java:5
  73
  )
  at
 

org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseF
  ac
  ade.java:183)
  at
 

org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java
  :2
  19)
  at
 

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResult
  Su
  pport.java:178)
  at
 

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultA
  ct
  ionInvocation.java:348)
  at
 

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionIn
  vo
  cation.java:253)
  at
 

org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.ja
  va
  :50

Struts[2] : Checkboxlist Problems

2008-05-20 Thread Hoying, Ken
I have a list of search filters that I am displaying on the page where
each is a checkboxlist.  I am implementing this as such:

s:iterator value=searchCriteria.filters status=filterStatus
s:checkboxlist 

name=searchCriteria.filterMap['%{fieldName}'].selectedFilters 
value=%{selectedFilters}

list=filterItems listKey=value listValue=label/
/s:iterator

Everything works great except for one small problem.  I do not seem to
be able to deselect all of the values for a filter.  For example, if one
of my filters is Status and the check box values are Active and Inactive
then:

- I can select both Active and Inactive.
- I can leave both Active and Inactive deselected.
- I can default to have Active selected and then deslect it and then
select Inactive.
- I CANNOT default to have Active selected and then deselect it. 

It appears that if a checkbox was originally set you can change the
value as long as you change it to some other value.  However if I do not
set the field to any value at all, then it keeps the previous or default
value.

I am not sure what is occurring here.  Does anyone have any ideas on how
I can overcome this?

Thank you!
Ken


RE: Struts[2] : Checkboxlist Problems

2008-05-20 Thread Hoying, Ken
I did not have any errors.  I am not sure exactly what I was doing that
caused this not to work, but I reorganized my code in the action class
and was able to make things work.   

-Original Message-
From: Greg Lindholm [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 20, 2008 2:37 PM
To: user@struts.apache.org
Subject: Re: Struts[2] : Checkboxlist Problems


Are you getting any errors?

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

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



Hoying, Ken-2 wrote:
 
 I have a list of search filters that I am displaying on the page where

 each is a checkboxlist.  I am implementing this as such:
 
 s:iterator value=searchCriteria.filters status=filterStatus
   s:checkboxlist
   
 name=searchCriteria.filterMap['%{fieldName}'].selectedFilters 
   value=%{selectedFilters}
 
   list=filterItems listKey=value listValue=label/
/s:iterator
 
 Everything works great except for one small problem.  I do not seem to

 be able to deselect all of the values for a filter.  For example, if 
 one of my filters is Status and the check box values are Active and 
 Inactive
 then:
 
 - I can select both Active and Inactive.
 - I can leave both Active and Inactive deselected.
 - I can default to have Active selected and then deslect it and then 
 select Inactive.
 - I CANNOT default to have Active selected and then deselect it. 
 
 It appears that if a checkbox was originally set you can change the 
 value as long as you change it to some other value.  However if I do 
 not set the field to any value at all, then it keeps the previous or 
 default value.
 
 I am not sure what is occurring here.  Does anyone have any ideas on 
 how I can overcome this?
 
 Thank you!
 Ken
 
 

--
View this message in context:
http://www.nabble.com/Struts-2--%3A--Checkboxlist-Problems-tp17339322p17
347543.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JSON Plugin - excludeProperties Issues

2008-05-08 Thread Hoying, Ken
I am trying to specify properties for the JSON plugin to ignore.
However, this does not seem to be working.  Am I specfiying something
incorrectly?  Does it not work in conjunction with specifying the root?

result type=json
param
name=rootcategoryChildren/param
param name=excludeProperties
createdTs, createdBy,
lastModifiedTs, lastModifiedBy, allCategoriesOfRoot,
products, contracts, children,
contractCount, productCount,
allTaxonomyCategories,
rootTaxonomyCategories
/param
/result



RE: JSON Plugin - excludeProperties Issues

2008-05-08 Thread Hoying, Ken
I thought that might be the case and tried to reference them that way
(i.e.  categoryChildren.createdTs). However, that did not seem to work
either.

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 08, 2008 4:06 PM
To: Struts Users Mailing List
Subject: Re: JSON Plugin - excludeProperties Issues

The exclude properties are relative to the action, not the root.

musachy

On Thu, May 8, 2008 at 4:01 PM, Hoying, Ken [EMAIL PROTECTED]
wrote:
 I am trying to specify properties for the JSON plugin to ignore.
 However, this does not seem to be working.  Am I specfiying something 
 incorrectly?  Does it not work in conjunction with specifying the
root?

result type=json
param
 name=rootcategoryChildren/param
param name=excludeProperties
createdTs, createdBy, 
 lastModifiedTs, lastModifiedBy, allCategoriesOfRoot,
products, contracts, children, 
 contractCount, productCount,
allTaxonomyCategories, 
 rootTaxonomyCategories
/param
/result





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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JSON Plugin - excludeProperties Issues

2008-05-08 Thread Hoying, Ken
I see now.  categoryChildren returns a collection so I need
categoryChildren.*\.createdTs.  However this only works if I do not
specify root.  If I specify root then it does not appear to work.

I noticed that there was mention on the Wiki of an enhancement with an
includeProperties param.  Is there a release date for update?  That
would be nice.


-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 08, 2008 4:11 PM
To: Struts Users Mailing List
Subject: RE: JSON Plugin - excludeProperties Issues

I thought that might be the case and tried to reference them that way
(i.e.  categoryChildren.createdTs). However, that did not seem to work
either.

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 08, 2008 4:06 PM
To: Struts Users Mailing List
Subject: Re: JSON Plugin - excludeProperties Issues

The exclude properties are relative to the action, not the root.

musachy

On Thu, May 8, 2008 at 4:01 PM, Hoying, Ken [EMAIL PROTECTED]
wrote:
 I am trying to specify properties for the JSON plugin to ignore.
 However, this does not seem to be working.  Am I specfiying something 
 incorrectly?  Does it not work in conjunction with specifying the
root?

result type=json
param
 name=rootcategoryChildren/param
param name=excludeProperties
createdTs, createdBy, 
 lastModifiedTs, lastModifiedBy, allCategoriesOfRoot,
products, contracts, children, 
 contractCount, productCount,
allTaxonomyCategories, 
 rootTaxonomyCategories
/param
/result





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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upgrade from 2.06 to 2.011.1 Error

2008-05-06 Thread Hoying, Ken

After upgrading my libraries and TLD from 2.06 to 2.0.11.1, I am getting
the following error.

2008-05-06 10:42:36,648 ERROR (http-0.0.0.0-8080-2:)
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/sca].[
jsp]] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException:
/jsps/npc/DownloadContractsWithErrors.jsp(43,2) According to TLD or
attribute directive in tag file, attribute action does not accept any
expressions

Do I have the correct TLD?




RE: Upgrade from 2.06 to 2.011.1 Error

2008-05-06 Thread Hoying, Ken
Thanks, Dave.

I saw the short blurb in the release notes on the changes for security.
I did not see any work around.  The only one I have been able to come up
with is to use the previous versions TLD with the new code.   I am not
sure that I want to have to rewrite all of my JSP pages to not use JSTL
in Struts tags.  It appears from some of the documentation that I am
seeing on 2.1 that I may have to rewrite again anyhow as Ajax and Dojo
support sounds like it is going to be separate and use plugins instead.


Editorial:  I cannot help but wonder if these consecutive painful
upgrades are going to have an adverse affect on Struts2 adoption, future
user base and perception.  I have been a big proponent of Struts2 up
till now, but must admit that I am finding myself questioning if there
are not better frameworks with friendlier release strategies available.
If it was a vendor rather than open source that did this to me, I would
be one very unhappy customer.

Thanks,
Ken

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 06, 2008 12:14 PM
To: Struts Users Mailing List
Subject: Re: Upgrade from 2.06 to 2.011.1 Error

--- Hoying, Ken [EMAIL PROTECTED] wrote:
 After upgrading my libraries and TLD from 2.06 to 2.0.11.1, I am 
 getting the following error.
 
 2008-05-06 10:42:36,648 ERROR (http-0.0.0.0-8080-2:)

[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/sca].[
 jsp]] Servlet.service() for servlet jsp threw exception
 org.apache.jasper.JasperException:
 /jsps/npc/DownloadContractsWithErrors.jsp(43,2) According to TLD or 
 attribute directive in tag file, attribute action does not accept any 
 expressions
 
 Do I have the correct TLD?

Yep.

See the release notes for 2.0.10/2.0.11 for the short explanation, or
any number of list messages posted since then for workarounds and
solutions.

http://struts.apache.org/2.x/docs/release-notes-2010.html
http://struts.apache.org/2.x/docs/release-notes-2011.html

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] DEBUG NPE

2008-03-18 Thread Hoying, Ken
 
I have created a template which utilizes parameters that are passed into
it to generate HTML conditionally based on those parameters.  For
example:

s:component theme=scaTheme templateDir=template
template=Header.jsp
s:param name=titleKey
value=%{'title.appNpc'} /
s:param name=helpPage
value=%{'Non_Premier_Contract_Home_Page.htm'} /
/s:component

However, I do not wish to require that all the parameters be required.
For example, it would be ok if the helpPage parameter was not
specified.  At runtime, everything works fine if I do not specify the
helpPage parameter.  However if I place my logging level at DEBUG, I
my log is cluttered with NPEs like the one below.  I cannot seem to find
any kind of syntax to reference the parameter to even test if it is null
without generating this NPE in DEBUG.  Does anyone know if it is
possible to avoid these NPEs?  I make heavy use of templates with
optional parameters and it is really cluttering up the logs when trying
to debug.  Am I doing something wrong?  Should this maybe be readdressed
in the Struts code base?  I understand why the DEBUG statement is
logged.  Just not sure since it is a DEBUG statement, if the stack trace
is warranted.

Thanks in advance!


2008-03-14 14:30:14,364 DEBUG (http-127.0.0.1-8080-2:)
[com.opensymphony.xwork2.util.DefaultObjectTypeDeterminer] Error while
retrieving generic property class for property=parameters
java.lang.NullPointerException
at
com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer.getClass(Gener
icsObjectTypeDeterminer.java:222)
at
com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer.getKeyClass(Ge
nericsObjectTypeDeterminer.java:44)
at
com.opensymphony.xwork2.util.XWorkMapPropertyAccessor.getKey(XWorkMapPro
pertyAccessor.java:136)
at
com.opensymphony.xwork2.util.XWorkMapPropertyAccessor.getProperty(XWorkM
apPropertyAccessor.java:68)
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643)
at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTChain.getValueBody(ASTChain.java:109)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTNotEq.getValueBody(ASTNotEq.java:49)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTAnd.getValueBody(ASTAnd.java:56)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.Ognl.getValue(Ognl.java:333)
at
com.opensymphony.xwork2.util.OgnlUtil.getValue(OgnlUtil.java:194)
at
com.opensymphony.xwork2.util.OgnlValueStack.findValue(OgnlValueStack.jav
a:238)
at
org.apache.struts2.components.Component.findValue(Component.java:322)
at org.apache.struts2.components.If.start(If.java:85)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTag
Support.java:54)
at
org.apache.jsp.template.scaTheme.Header_jsp._jspx_meth_s_005fif_005f0(He
ader_jsp.java:273) 



-
***Note:The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify the Sender immediately by replying
to the message and deleting it from your computer. Thank you. Premier
Inc.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] DEBUG NPE

2008-03-14 Thread Hoying, Ken

I have created a template which utilizes parameters that are passed into
it to generate HTML conditionally based on those parameters.  For
example:

s:component theme=scaTheme templateDir=template
template=Header.jsp
s:param name=titleKey
value=%{'title.appNpc'} /
s:param name=helpPage
value=%{'Non_Premier_Contract_Home_Page.htm'} /
/s:component

However, I do not wish to require that all the parameters be required.
For example, it would be ok if the helpPage parameter was not
specified.  At runtime, everything works fine if I do not specify the
helpPage parameter.  However if I place my logging level at DEBUG, I
my log is cluttered with NPEs like the one below.  I cannot seem to find
any kind of syntax to reference the parameter to even test if it is null
without generating this NPE in DEBUG.  Does anyone know if it is
possible to avoid these NPEs?  I make heavy use of templates with
optional parameters and it is really cluttering up the logs when trying
to debug.  Am I doing something wrong?  Should this maybe be readdressed
in the Struts code base?  I understand why the DEBUG statement is
logged.  Just not sure since it is a DEBUG statement, if the stack trace
is warranted.

Thanks in advance!


2008-03-14 14:30:14,364 DEBUG (http-127.0.0.1-8080-2:)
[com.opensymphony.xwork2.util.DefaultObjectTypeDeterminer] Error while
retrieving generic property class for property=parameters
java.lang.NullPointerException
at
com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer.getClass(Gener
icsObjectTypeDeterminer.java:222)
at
com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer.getKeyClass(Ge
nericsObjectTypeDeterminer.java:44)
at
com.opensymphony.xwork2.util.XWorkMapPropertyAccessor.getKey(XWorkMapPro
pertyAccessor.java:136)
at
com.opensymphony.xwork2.util.XWorkMapPropertyAccessor.getProperty(XWorkM
apPropertyAccessor.java:68)
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643)
at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTChain.getValueBody(ASTChain.java:109)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTNotEq.getValueBody(ASTNotEq.java:49)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTAnd.getValueBody(ASTAnd.java:56)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.Ognl.getValue(Ognl.java:333)
at
com.opensymphony.xwork2.util.OgnlUtil.getValue(OgnlUtil.java:194)
at
com.opensymphony.xwork2.util.OgnlValueStack.findValue(OgnlValueStack.jav
a:238)
at
org.apache.struts2.components.Component.findValue(Component.java:322)
at org.apache.struts2.components.If.start(If.java:85)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTag
Support.java:54)
at
org.apache.jsp.template.scaTheme.Header_jsp._jspx_meth_s_005fif_005f0(He
ader_jsp.java:273) 



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

[S2] OGNL Syntax Question

2008-02-22 Thread Hoying, Ken

I was using the following statement under Weblogic which worked
perfectly:

s:set name=imgShowExpand scope=page value=%{'\'' +
#attr.imgExpandId + '\''}/

However, we have recenly changed out our appication server to Jboss and
now this statement appears to be evaluating to null.  I do not appear to
be getting any errors.  It is simply just not evaluating.  I believe it
is taking issue with the how the single parens are being escaped.  Can
anyone recommend an alternative syntax?

Thank you,
Ken


RE: [S2] Checkboxes

2007-12-03 Thread Hoying, Ken
Thanks, Dave!

This got me moving in the right direction.  For future reference, I
ended using the checkboxlist tag inside of my loop and set the list
attribute to a single value so I would only get the one option.  This
seems to have solved my issue.

Thanks,
Ken

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 30, 2007 6:06 PM
To: Struts Users Mailing List
Subject: RE: [S2] Checkboxes

A single checkbox, AFAIK, only expects to check a single value, not an
array or collection.

I would consider using a modified version of the checkboxlist tag if
it's just a matter of the rendered HTML you're having an issue with.

d.

--- Hoying, Ken [EMAIL PROTECTED] wrote:

 Thank you for the response.
 
 I had looked at the example, but it really appears to only push the 
 checkbox results to the action.  I am not sure that it would 
 repopulate the checkbox with the values.
 
 I do not believe that checkbox list is going to work for me as it does

 not give me control on where to put the checkboxes.
 I need one in each
 row.
 
 It appears that my understanding of how the checkbox works is not 
 correct.
 
 I am expecting that the checkbox control will call the
 getSelectedContracts() method and see if any of these values in the 
 array it returns matches the value specified in the fieldValue 
 attribute specified in the checkbox tag.  If there is a match then 
 check the box, if not don't check it.  However, all of my checkboxes 
 are always being selected no matter what.
 
 I am also expecting that when submitting the form,
 setSelectedContracts() will be called with an array of the values that

 were selected.  This does appear to be working with one caveat. If 
 nothing is selected then I get the error: Invalid field value for 
 field selectedContracts.
 
 This obviously does not work the way I thought and I was hoping 
 someone could maybe explain how it does work as I am really struggling

 on gaining an understanding of this tag and its usage.
 
 Thanks in advance,
 Ken
 
 -Original Message-
 From: Martin Gainty [mailto:[EMAIL PROTECTED]
 Sent: Friday, November 30, 2007 11:09 AM
 To: Struts Users Mailing List
 Subject: Re: [S2] Checkboxes
 
 Hi Ken-
 
 struts.xml has this definition of EmployeeAction where results 
 populate editEmployee.jsp
 action name=delete

class=org.apache.struts2.showcase.action.EmployeeAction
 method=delete
 result
 name=error/empmanager/editEmployee.jsp/result
 result

type=redirectedit-${currentEmployee.empId}.action/result
 /action
 
 looking at the results jsp
 /empmanager/editEmployee.jsp has a checkbox defined as s:checkbox 
 fieldValue=true label=Married
 name=currentEmployee.married/
 
 The EmployeeAction is defined as
 package org.apache.struts2.showcase.action;
 public class EmployeeAction extends
 AbstractCRUDAction implements
 Preparable {  private Employee currentEmployee;
 
 whereas Employee is defined as
 package org.apache.struts2.showcase.model;
 public class Employee implements IdEntity {
 private boolean married; //checkbox
 
 so the individual checkbox works fine for setting booleans 
 http://struts.apache.org/2.0.11/docs/checkbox.html
 
 For handling a list of checkboxes you may want to implement with 
 checkboxlist?

http://struts.apache.org/2.0.11/docs/checkboxlist.html
 
 M--
 - Original Message -
 From: Hoying, Ken [EMAIL PROTECTED]
 To: user@struts.apache.org
 Sent: Friday, November 30, 2007 8:45 AM
 Subject: [S2] Checkboxes
 
 
 I am having a difficult time getting checkboxes to work in the 
 following scenario and am not sure what I am doing wrong.  Any help or

 guidance would be greatly appreciated.
 
 I have table which displays several rows.  In the first column of each

 row, I have a check box to select that row.  I am keeping track of 
 user selections so when they return to the page, the checkboxes are 
 prepopulated with their previous selections.
 
 
 My Action contains the following:
 
 public Long[] getSelectedContracts()
 {
 return setSelectedContracts.toArray(new Long[0]); }
 // end
 getSelectedContracts
 
 /**
 * This setter takes the provided String[] of
 selected contract ids.
 */
 public void setSelectedContracts(Long[]
 palngSelectedContracts)
   {
 

setSelectedContracts.addAll(Arrays.asList(palngSelectedContracts));
 } // end setSelectedContracts
 
 My JSP contains the following:
 
 s:checkbox name=selectedContracts
 fieldValue=${contract.npcContractId}/
 
 
 
 
 
 
 -
 ***Note:The information contained in this message
 may be privileged and
 confidential and protected from disclosure. If the
 reader of this
 message is not the intended recipient, or an
 employee or agent
 responsible for delivering this message to the
 intended recipient, you
 are hereby notified that any dissemination,
 distribution or copying of
 this communication is strictly prohibited. If you
 have received

RE: [S2] Checkboxes

2007-11-30 Thread Hoying, Ken
Thank you for the response.

I had looked at the example, but it really appears to only push the
checkbox results to the action.  I am not sure that it would repopulate
the checkbox with the values.

I do not believe that checkbox list is going to work for me as it does
not give me control on where to put the checkboxes.  I need one in each
row.

It appears that my understanding of how the checkbox works is not
correct.

I am expecting that the checkbox control will call the
getSelectedContracts() method and see if any of these values in the
array it returns matches the value specified in the fieldValue attribute
specified in the checkbox tag.  If there is a match then check the box,
if not don't check it.  However, all of my checkboxes are always being
selected no matter what.

I am also expecting that when submitting the form,
setSelectedContracts() will be called with an array of the values that
were selected.  This does appear to be working with one caveat. If
nothing is selected then I get the error: Invalid field value for field
selectedContracts.

This obviously does not work the way I thought and I was hoping someone
could maybe explain how it does work as I am really struggling on
gaining an understanding of this tag and its usage.

Thanks in advance,
Ken

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 30, 2007 11:09 AM
To: Struts Users Mailing List
Subject: Re: [S2] Checkboxes

Hi Ken-

struts.xml has this definition of EmployeeAction where results populate
editEmployee.jsp
action name=delete
class=org.apache.struts2.showcase.action.EmployeeAction
method=delete
result name=error/empmanager/editEmployee.jsp/result
result
type=redirectedit-${currentEmployee.empId}.action/result
/action

looking at the results jsp
/empmanager/editEmployee.jsp has a checkbox defined as s:checkbox
fieldValue=true label=Married
name=currentEmployee.married/

The EmployeeAction is defined as
package org.apache.struts2.showcase.action;
public class EmployeeAction extends AbstractCRUDAction implements
Preparable {  private Employee currentEmployee;

whereas Employee is defined as
package org.apache.struts2.showcase.model;
public class Employee implements IdEntity {
private boolean married; //checkbox

so the individual checkbox works fine for setting booleans
http://struts.apache.org/2.0.11/docs/checkbox.html

For handling a list of checkboxes you may want to implement with
checkboxlist?
http://struts.apache.org/2.0.11/docs/checkboxlist.html

M--
- Original Message -
From: Hoying, Ken [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Friday, November 30, 2007 8:45 AM
Subject: [S2] Checkboxes


I am having a difficult time getting checkboxes to work in the following
scenario and am not sure what I am doing wrong.  Any help or guidance
would be greatly appreciated.

I have table which displays several rows.  In the first column of each
row, I have a check box to select that row.  I am keeping track of user
selections so when they return to the page, the checkboxes are
prepopulated with their previous selections.


My Action contains the following:

public Long[] getSelectedContracts()
{
return setSelectedContracts.toArray(new Long[0]); } // end
getSelectedContracts

/**
* This setter takes the provided String[] of selected contract ids.
*/
public void setSelectedContracts(Long[] palngSelectedContracts)
  {

setSelectedContracts.addAll(Arrays.asList(palngSelectedContracts));
} // end setSelectedContracts

My JSP contains the following:

s:checkbox name=selectedContracts
fieldValue=${contract.npcContractId}/






-
***Note:The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify the Sender immediately by replying
to the message and deleting it from your computer. Thank you. Premier
Inc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from

[S2] Checkboxes

2007-11-30 Thread Hoying, Ken
I am having a difficult time getting checkboxes to work in the following
scenario and am not sure what I am doing wrong.  Any help or guidance
would be greatly appreciated.

I have table which displays several rows.  In the first column of each
row, I have a check box to select that row.  I am keeping track of user
selections so when they return to the page, the checkboxes are
prepopulated with their previous selections.  


My Action contains the following:

public Long[] getSelectedContracts() 
{
return setSelectedContracts.toArray(new Long[0]);
} // end getSelectedContracts

/**
 * This setter takes the provided String[] of selected contract
ids.
 */
public void setSelectedContracts(Long[] palngSelectedContracts)
  {

setSelectedContracts.addAll(Arrays.asList(palngSelectedContracts));
} // end setSelectedContracts
 
My JSP contains the following:

s:checkbox name=selectedContracts
fieldValue=${contract.npcContractId}/






-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: s2 File Upload Progress Bar

2007-11-01 Thread Hoying, Ken
I have implemented a file upload progress bar in S2.  I used the
following as the basis for my work:

http://kencochrane.blogspot.com/2006/03/ajax-struts-file-upload-progress
-meter.html

 

-Original Message-
From: Markus Stauffer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 7:51 AM
To: user@struts.apache.org
Subject: s2 File Upload Progress Bar

Hello

Has anyone tried to implement a file upload progress bar in s2?

I have seen this technique on
http://www.learntechnology.net/content/ajax/ajax_upload.jsp .

Regards
--
Markus Stauffer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] FTL Help - Access Properties

2007-10-01 Thread Hoying, Ken
That will work.  However, I really need to assign the value to a
variable for use later since one cannot nest the tags.  I need to
perform the @s.text so that I can later use that value in a call to
@s.url.  I am not sure how I can do that.  Any ideas?

Thanks in advance!
 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 28, 2007 4:19 PM
To: Struts Users Mailing List
Subject: Re: [S2] FTL Help - Access Properties

--- Hoying, Ken [EMAIL PROTECTED] wrote:
 In JSP, I would use the text tag (s:text name=myKey
 
 How do I accomplish this in FTL?

Does @s.text name=myKey/ not work?

http://struts.apache.org/2.x/docs/freemarker.html
http://struts.apache.org/2.x/docs/freemarker-tags.html

d.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] FTL Help - Access Properties

2007-09-28 Thread Hoying, Ken
I am new to FTL and need to access the my global properties from my
resource bundle.

In JSP, I would use the text tag (s:text name=myKey

How do I accomplish this in FTL?

Thanks in Advance!



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] Iterator Tag and Status Count

2007-09-27 Thread Hoying, Ken
Thank you for clearing this up.  I had checked the JavaDoc before making
the post, as well, and as you report it is a bit thin.  Never occurred
to me that it was a 1 based index.  I have never seen that before.  I
guess someone thought it useful rather than just doing the math if
needed.

Thanks to all who responded!

-Original Message-
From: Chris Pratt [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 26, 2007 4:37 PM
To: Struts Users Mailing List
Subject: Re: [S2] Iterator Tag and Status Count

I think count is a one based position in the iteration where as index is
zero based.  But there is almost no information in the documentation.
The tag library documentation simply says that a InteratorStatus is
pushed on the Value Stack.  And the JavaDocs for IteratorStatus has one
line of useful information:

The iterator tag can export an IteratorStatus object so that one can
get information about the status of the iteration, such as the size,
current index, and whether any more items are available.

Which, since there is no size information in the IteratorStatus, could
be interpreted that the count represents the size.  It's too bad there
is no JavaDoc information on the methods, since that could easily clear
up the confusion.
  (*Chris*)

On 9/26/07, Hoying, Ken [EMAIL PROTECTED] wrote:
 I believe that I have come across a bug in the iterator tag.  It 
 appears that the count value for the status object is returning (index

 + 1) rather than the size of the collection being iterated over.

 Has anyone else seen this behavior?
 Is this the correct behavior and I am just not interepreting its usage

 correctly?

 Thank you!
 Ken



 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution or copying of

 this communication is strictly prohibited. If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer. Thank you.

 Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] TabbedPanel Events

2007-09-27 Thread Hoying, Ken
It looks like version 2.1 will contain the ability to capture events in
the TabbedPanel.

We are currently using v2.0.6 and need to be able to capture a change in
tab.  Has anyone come across a solution for this?

Thank you!




-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] TabbedPanel Events

2007-09-27 Thread Hoying, Ken
Thank you!  That was exactly what I was looking for! 

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 27, 2007 2:58 PM
To: Struts Users Mailing List
Subject: Re: [S2] TabbedPanel Events

Try to listen to a topic with the name: widgetId + -selectChild
(hardcoded in dojo's code), let's say that your tab pannel is something
like:

s:tabbedPanel id=myTab ...

Add this to your page

dojo.event.topic.subscribe(myTab-selectChild, function(tab) {
   do something
});

regards

musachy

On 9/27/07, Hoying, Ken [EMAIL PROTECTED] wrote:
 It looks like version 2.1 will contain the ability to capture events 
 in the TabbedPanel.

 We are currently using v2.0.6 and need to be able to capture a change 
 in tab.  Has anyone come across a solution for this?

 Thank you!




 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution or copying of

 this communication is strictly prohibited. If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer. Thank you.

 Premier Inc.


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Iterator Tag and Status Count

2007-09-26 Thread Hoying, Ken
I believe that I have come across a bug in the iterator tag.  It appears
that the count value for the status object is returning (index + 1)
rather than the size of the collection being iterated over.

Has anyone else seen this behavior?
Is this the correct behavior and I am just not interepreting its usage
correctly?

Thank you!
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

[S2] Struts Tokens and ParametersInterceptor Question

2007-08-27 Thread Hoying, Ken
I am using the Sruts2 token tag with the token interceptor to restrict
double submits of a page.  It appears to be working.  However, I am
getting the following in my log.  Do I not have something configured
correctly?


[2007-08-27 11:27:49,565] [ERROR] [anjone  ]
[erceptor.ParametersInterceptor]: ParametersInterceptor -
[setParameters]: Unexpected Exception catched: Error setting expression
'struts.token' with value '[Ljava.lang.String;@1108a83'
[2007-08-27 11:27:49,612] [ERROR] [anjone  ]
[erceptor.ParametersInterceptor]: ParametersInterceptor -
[setParameters]: Unexpected Exception catched: Error setting expression
'struts.token.name' with value '[Ljava.lang.String;@f5d665'



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

[S2] Help with Templates

2007-08-06 Thread Hoying, Ken
I love the idea of being able to create JSP templates and reference them
with the Component tag.  However, I am not sure that I am implementing
them correctly.

If I have another Struts tag in my template, such as s:a, then I get
errors saying that it cannot find the template in my theme and template
directory.  As a result, I am forced to specify the theme and
templateDir for each Struts tag that I use in my template.  Is that the
correct way to implement this or am I missing something?

Thanks in Advance,


RE: [S2] Help with Templates

2007-08-06 Thread Hoying, Ken
I have created new JSP template file and placed it in a directory of wbe
root where the directory format template/theme.   This new JSP templat
file contains other Struts2 tags, including s:a.  However if I do not
specifically set the theme and templateDir attributes to that of the
Struts2 tag location, then I get an error stating that Struts2 cannot
locate the s:a tag in my template/theme location.

Thanks,
Ken

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 06, 2007 11:32 AM
To: Struts Users Mailing List
Subject: Re: [S2] Help with Templates

Can you give more details on what you are doing? I'm using the
component tag without problems (I only specify the templateDir and
theme attributes in the component tag).

regards
musachy

On 8/6/07, Hoying, Ken [EMAIL PROTECTED] wrote:
 I love the idea of being able to create JSP templates and reference 
 them with the Component tag.  However, I am not sure that I am 
 implementing them correctly.

 If I have another Struts tag in my template, such as s:a, then I get

 errors saying that it cannot find the template in my theme and 
 template directory.  As a result, I am forced to specify the theme and

 templateDir for each Struts tag that I use in my template.  Is that 
 the correct way to implement this or am I missing something?

 Thanks in Advance,



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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Design Advice Needed

2007-08-02 Thread Hoying, Ken
I could use some advice from some folks with more experience and
knowledge of Struts2 than I to assist me in determining the correct way
(or lay out some viable options) to design a solution for the following
senario:

We need to generate a PDF report real time based on data in a database
that is available for download.  What we believe that we would like to
do is utilize FOP (http://xmlgraphics.apache.org/fop/) and use a JSP
page to actually generate the formatting objects and then run the
formatting objects through the FOP processor to generate and stream the
PDF back to the user.  

However, we are not real sure how to implement this in Struts2.  How do
we invoke the JSP page and then get access to the results?  Do we just
use the stream result type and then use a http call to the JSP as the
input source?  This would seem like it would not be optimal from a
performance standpoint, as we are making another http call to get the
formatting objects from the jsp.  It also adds the complexity of passing
security credentials in the call.  Or do we need to somehow create or
own result type and if so how do we get those JSP results?  I have not
really found any good documentation or example on writing your own
result types.

Thanks in advance!



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] Design Advice Needed

2007-08-02 Thread Hoying, Ken
Thanks, Rene!

I actually just found that after sending my question.  Somehow I missed
it earlier.  We are definitely going to take a look at Jasper and the
plugin as it appears a lot of the heavy lifting may already be done for
us. 

Thank you!

-Original Message-
From: Rene Gielen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 02, 2007 8:07 AM
To: Struts Users Mailing List
Subject: Re: [S2] Design Advice Needed

You should definitely have a look into the struts2-jasperreports-plugin
- both for checking out how to write own results and evaluating if you
might want to use jasper over FOP, since full s2 result support is
already available for jasper.

The plugin is part of the struts2 source distribution.

Regards,
Rene

Hoying, Ken schrieb:
 I could use some advice from some folks with more experience and 
 knowledge of Struts2 than I to assist me in determining the correct 
 way (or lay out some viable options) to design a solution for the 
 following
 senario:
 
 We need to generate a PDF report real time based on data in a database

 that is available for download.  What we believe that we would like to

 do is utilize FOP (http://xmlgraphics.apache.org/fop/) and use a JSP 
 page to actually generate the formatting objects and then run the 
 formatting objects through the FOP processor to generate and stream 
 the PDF back to the user.
 
 However, we are not real sure how to implement this in Struts2.  How 
 do we invoke the JSP page and then get access to the results?  Do we 
 just use the stream result type and then use a http call to the JSP as

 the input source?  This would seem like it would not be optimal from a

 performance standpoint, as we are making another http call to get the 
 formatting objects from the jsp.  It also adds the complexity of 
 passing security credentials in the call.  Or do we need to somehow 
 create or own result type and if so how do we get those JSP results?  
 I have not really found any good documentation or example on writing 
 your own result types.
 
 Thanks in advance!
 
 
 
 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution or copying of

 this communication is strictly prohibited. If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer. Thank you.

 Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Submit Tag Bug

2007-07-30 Thread Hoying, Ken
There appears to be a bug with the Submit tag.  URLs for the src
attribute do not appear to be resolved the same way for this tag as they
are with other tags.  Other tags appear to be able to determine the
webroot and build the path to the image correctly.  The Submit tag does
not.  Has anyone else noticed this or do I have something
mis-configured?



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] How Does struts.multipart.parser work?

2007-07-27 Thread Hoying, Ken
Please disregard.  I see the problem now.  There was another entry for
struts.multipart.parser in the file later down in the property file that
someone else had set.

Thank you!

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 27, 2007 10:42 AM
To: user@struts.apache.org
Subject: [S2] How Does struts.multipart.parser work?

I have created my own MultiPartRequest and specified it in the
struts.properties file as such:

struts.multipart.parser=package.MonitoredMultiPartRequest

When we originally started the project we were using Tomcat and this was
working great. We have now moved to Weblogic 9.2 and it no longer seems
to work.  At first we were getting collisions with Beehive and the
Weblogic Console app.  We have not moved the app to its own managed
server without the console app.  We are no longer getting the collision
errors or any other errors.  However, the class is not being loaded.  

Does anyone know how this is set by Struts or seen this issue before?
Any one else using a custom MultiPartRequest?

Thanks in Advance



-
***Note:The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify the Sender immediately by replying
to the message and deleting it from your computer. Thank you. Premier
Inc.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] How Does struts.multipart.parser work?

2007-07-27 Thread Hoying, Ken
I have created my own MultiPartRequest and specified it in the
struts.properties file as such:

struts.multipart.parser=package.MonitoredMultiPartRequest

When we originally started the project we were using Tomcat and this was
working great. We have now moved to Weblogic 9.2 and it no longer seems
to work.  At first we were getting collisions with Beehive and the
Weblogic Console app.  We have not moved the app to its own managed
server without the console app.  We are no longer getting the collision
errors or any other errors.  However, the class is not being loaded.  

Does anyone know how this is set by Struts or seen this issue before?
Any one else using a custom MultiPartRequest?

Thanks in Advance



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

[S2] Enhancement Request

2007-07-25 Thread Hoying, Ken
I am trying to get my head around what the best practices are in terms
of managing interceptors and interceptor stacks.  One would obviously
like things to be as efficient as possible.  However when it comes to
interceptor stacks, it seems that one also has to balance
maintainability.  There are so many possible permutations possible.
Rather than creating several various stacks representing desired
permutations, I was wondering if it might just be nicer and easier to
maintain if all of the Interceptors supported a bypass parameter that
could then be set as needed from the action or when creating other
stacks.



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] TabbedPanel with Remote DIVs

2007-07-17 Thread Hoying, Ken
I must have had my syntax wrong or something else before.  It is working
for me now.  Thank you for the follow up. 

Take care,
Ken
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 17, 2007 11:45 AM
To: Struts Users Mailing List
Subject: Re: [S2] TabbedPanel with Remote DIVs

Using any tool like firebug, and building the url with the url tag, do
you see the parameters in the request?

musachy

On 7/16/07, Hoying, Ken [EMAIL PROTECTED] wrote:

 I have a tabbed panel with divs that retrieve their content remotely.
 Basically the control is acting like a tabbed address book with each 
 tab showing a subset of names broken out alphabetically (i.e. Tabs: 
 A-B, C-D, etc..)

 When specifying the URL for the remote div to call, I am having 
 difficulty determining how to pass in my parameter (i.e.
 ?startLetter=AendLetter=B).  I tried to use an s:url tag with 
 parameters and pass it to the div via its id. However, this is not 
 working.  It appears that the DIV is ignoring the parameters.  The 
 only way that I have been able to get this to work is to create a 
 dummy form for each tab which contains fields with the desired param 
 names and values and then reference the form in each tab.

 This is obviously a very ugly implementation as it results in a lot of

 unneeded forms whose sole purpose is for the div remote calls.  I am 
 new to tabbedPanels and remote div calls and am certain I am missing 
 something here.  Can anyone perhaps enlighten me with a better
solution?

 Thanks in advance,
 Ken



 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution or copying of

 this communication is strictly prohibited. If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer. Thank you.

 Premier Inc.




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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] How to Validate Indexed Lists?

2007-07-12 Thread Hoying, Ken

I am using the Type Conversion functionality
(http://struts.apache.org/2.x/docs/type-conversion.html) for handling
indexed lists.  BTW.. Very cool stuff and worked great right off.  

My question is that I would now like to take it one step further and use
the XML validation definitions to validate my fields where my fields
will look something like the following:

contracts(1).sharingLevel
contracts(2).sharingLevel
contracts(3).sharingLevel
...
...
contracts(N).sharingLevel


However, I am just not sure how to do this syntactically or if it is
even possible.  I did see one other similar question in the mail list
archive.  However, it did not have any responses.  

Does anyone know if this is possible and if so the correct syntax?

Thanks in advance!



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] Interceptor Question (Thread Safety)

2007-07-10 Thread Hoying, Ken
Thank you, Rene!  

This is a great help to me and allows me to move forward with my current
implementation.  It might be a good idea for someone from the Struts2
project to update the documentation with Rene's finding, as I am sure
others will also find this unclear and concerning.

Thank you again! 

-Original Message-
From: Rene Gielen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 10, 2007 2:38 AM
To: Struts Users Mailing List
Subject: Re: [S2] Interceptor Question (Thread Safety)

Ken, others,

now for the definitive answer:
There is one instance per interceptor ref, thus interceptor instances
being unique within the scope they are referenced in.

Example:
package name=foo extends=struts-default namespace=/foo
 interceptors
 interceptor name=foo class=FooInterceptor/
 /interceptors
 action name=bar1 class=com.opensymphony.xwork2.ActionSupport
 interceptor-ref name=foo
 param name=barbarfoobar/param
 /interceptor-ref
 result name=success/index.jsp/result
 /action
 action name=bar2 class=com.opensymphony.xwork2.ActionSupport
 interceptor-ref name=foo
 param name=barbarfoo/param
 /interceptor-ref
 result name=success/index.jsp/result
 /action
/package

This will cause two instances of FooInterceptor being created, one with
bar property set to barfoobar and one with barfoo. The interceptors
parameters given in struts.xml are only set once per instance, which
means that there are no thread safety issues with interceptor instance
variables.

HTH,
Rene


Rene Gielen schrieb:
 Uahhh,
 
 thanks for pointing out this information, I was way to fast to reply 
 on the said question - I recalled it wrong. Indeed documentation is 
 right here, they need to be thread safe - sorry for causing 
 misunderstanding here.
 
 Anyway, this does not answer the question if interceptor parameters 
 introduce thread safety issues. The builder mechanism is a little 
 complicated here, but AFAIK Interceptor instances are unique to the 
 scope they are configured in. I will check this tonight to ensure we 
 do not face a problem here with current implementation and hopefully 
 can provide a reliable answer then.
 
 Regards,
 Rene
 
 interceptor name=
 
 Am Mo, 9.07.2007, 15:01, schrieb Hoying, Ken:
 Thanks, Rene!

 Someone might want to update the documentation to make this clearer.
 The following document seems to indicate otherwise:

 http://struts.apache.org/2.x/docs/writing-interceptors.html

 Thread Safety
  Interceptors must be thread-safe!

 A Struts 2 Action instance is created for every request and do not 
 need to be thread-safe. Conversely, Interceptors are shared between 
 requests and must be thread-safe.

 -Original Message-
 From: Rene Gielen [mailto:[EMAIL PROTECTED]
 Sent: Sunday, July 08, 2007 7:00 AM
 To: Struts Users Mailing List
 Subject: Re: [S2] Interceptor Question (Thread Safety)

 Ken,

 there is no problem at all since s2 interceptor instances, as well as

 action instances, are created per ActionInvokation, which means they 
 are always operated in a single thread.

 Regards,
 Rene

 Hoying, Ken schrieb:
 From what I understand from reading the documentation, interceptors 
 are suppose to be thread safe.  However, I have noticed that some of

 the interceptors do  contain instance variables and I have seen some

 examples where these variables are set or modified from with in the 
 action configurations.

 For example, the File Upload interceptor allows you to set the 
 maximumSize and allowedTypes.  Is this going to work if I have 2 
 different actions each allowing different maximumSize and
 allowedTypes?
 This does not seem thread safe to me.  Is there only one instance of

 the interceptors or does maybe each action mapping have its own 
 instance of the interceptors?

 Thanks in advance,
 Ken



 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of 
 this message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, 
 you are hereby notified that any dissemination, distribution or 
 copying of this communication is strictly prohibited. If you have 
 received this communication in error, please notify the Sender 
 immediately by replying to the message and deleting it from your
computer. Thank you.
 Premier Inc.



--
Rene Gielen  | http://it-neering.net/
Aachen   | PGP-ID: BECB785A
Germany  | gielen at it-neering.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Servlet-Config Interceptor Bug?

2007-07-10 Thread Hoying, Ken
That is great news!  I am always a little apprehensive with newer
frameworks.  Well, with frameworks in general as I get nervous when I do
not know what is going on under the covers :-)

Thank you! 

-Original Message-
From: cilquirm [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 09, 2007 6:03 PM
To: user@struts.apache.org
Subject: RE: [S2] Servlet-Config Interceptor Bug?


The session object is wrapped by a SessionMap, so every time you do a
put or remove, the appropriate underlying method on the session is
called.

So, in a nutshell, no, nothing to worry about.
Like most of struts2, it just works :-)

-a




Hoying, Ken-2 wrote:
 
 I am currently utilizing the Servlet-Config Interceptor in order to 
 manage HTTPSession attributes as advised in the following document:
   
 http://struts.apache.org/2.x/docs/how-do-we-get-access-to-the-session.
 ht
 ml
 
 The document states that this is preferred and that:
   Any changes made to the session Map are reflected in the actual

 HttpSessionRequest. You may insert and remove session attributes as 
 needed.
 
 This appears to be working.  However if I look at the source code for 
 the interceptor, I do not see where it is explicitly calling the
 setAttribute() and removeAttribute() methods.  My question is don't 
 these methods not need to be called in order for the Session Binding 
 to work and for any container management of sessions to work?  Is 
 STRUTS2 maybe manageing the map it returns to ensure that this is 
 happening or is this a bug that I need to be aware of and code for?
 
 Thanks,
 Ken
 
 
 
 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution or copying of

 this communication is strictly prohibited. If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer. Thank you.

 Premier Inc.
 

--
View this message in context:
http://www.nabble.com/RE%3A--S2--Servlet-Config-Interceptor-Bug--tf40513
19.html#a11511404
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] How to Validate Indexed Lists?

2007-07-10 Thread Hoying, Ken

I am using the Type Conversion functionality
(http://struts.apache.org/2.x/docs/type-conversion.html) for handling
indexed lists.  BTW.. Very cool stuff and worked great right off.  

My question is that I would now like to take it one step further and use
the XML validation definitions to validate my fields where my fields
will look something like the following:

contracts(1).sharingLevel
contracts(2).sharingLevel
contracts(3).sharingLevel
...
...
contracts(N).sharingLevel


However, I am just not sure how to do this syntactically or if it is
even possible.  I did see one other similar question in the mail list
archive.  However, it did not have any responses.  

Does anyone know if this is possible and if so the correct syntax?

Thanks in advance!



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] Interceptor Question (Thread Safety)

2007-07-09 Thread Hoying, Ken
Thanks, Rene!

Someone might want to update the documentation to make this clearer.
The following document seems to indicate otherwise:

http://struts.apache.org/2.x/docs/writing-interceptors.html

Thread Safety
Interceptors must be thread-safe!

A Struts 2 Action instance is created for every request and do not need
to be thread-safe. Conversely, Interceptors are shared between requests
and must be thread-safe.  

-Original Message-
From: Rene Gielen [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 08, 2007 7:00 AM
To: Struts Users Mailing List
Subject: Re: [S2] Interceptor Question (Thread Safety)

Ken,

there is no problem at all since s2 interceptor instances, as well as
action instances, are created per ActionInvokation, which means they are
always operated in a single thread.

Regards,
Rene

Hoying, Ken schrieb:
 From what I understand from reading the documentation, interceptors 
 are suppose to be thread safe.  However, I have noticed that some of 
 the interceptors do  contain instance variables and I have seen some 
 examples where these variables are set or modified from with in the 
 action configurations.
 
 For example, the File Upload interceptor allows you to set the 
 maximumSize and allowedTypes.  Is this going to work if I have 2 
 different actions each allowing different maximumSize and
allowedTypes?
 This does not seem thread safe to me.  Is there only one instance of 
 the interceptors or does maybe each action mapping have its own 
 instance of the interceptors?
 
 Thanks in advance,
 Ken
 
 
 
 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution or copying of

 this communication is strictly prohibited. If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer. Thank you.

 Premier Inc.


--
Rene Gielen  | http://it-neering.net/
Aachen   | PGP-ID: BECB785A
Germany  | gielen at it-neering.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Interceptor Question (Thread Safety)

2007-07-09 Thread Hoying, Ken
Can someone provide a definitive answer on this then?  It is obviously a
key infrastructure and implementation issue.

Thank you!

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 09, 2007 11:30 AM
To: Struts Users Mailing List
Subject: Re: [S2] Interceptor Question (Thread Safety)

If that's right then I've been wrong for a long time :). I think that
interceptor instances are reused between requests. On
DefaultActionProxy:prepare:

config =
configuration.getRuntimeConfiguration().getActionConfig(namespace,
actionName);

that configuration is not instantiated on each request.

musachy

On 7/9/07, Hoying, Ken [EMAIL PROTECTED] wrote:

 Thanks, Rene!

 Someone might want to update the documentation to make this clearer.
 The following document seems to indicate otherwise:

 http://struts.apache.org/2.x/docs/writing-interceptors.html

 Thread Safety
 Interceptors must be thread-safe!

 A Struts 2 Action instance is created for every request and do not 
 need to be thread-safe. Conversely, Interceptors are shared between 
 requests and must be thread-safe.

 -Original Message-
 From: Rene Gielen [mailto:[EMAIL PROTECTED]
 Sent: Sunday, July 08, 2007 7:00 AM
 To: Struts Users Mailing List
 Subject: Re: [S2] Interceptor Question (Thread Safety)

 Ken,

 there is no problem at all since s2 interceptor instances, as well as 
 action instances, are created per ActionInvokation, which means they 
 are always operated in a single thread.

 Regards,
 Rene

 Hoying, Ken schrieb:
  From what I understand from reading the documentation, interceptors 
  are suppose to be thread safe.  However, I have noticed that some of

  the interceptors do  contain instance variables and I have seen some

  examples where these variables are set or modified from with in the 
  action configurations.
 
  For example, the File Upload interceptor allows you to set the 
  maximumSize and allowedTypes.  Is this going to work if I have 2 
  different actions each allowing different maximumSize and
 allowedTypes?
  This does not seem thread safe to me.  Is there only one instance of

  the interceptors or does maybe each action mapping have its own 
  instance of the interceptors?
 
  Thanks in advance,
  Ken
 
 
 
  -
  ***Note:The information contained in this message may be privileged 
  and confidential and protected from disclosure. If the reader of 
  this message is not the intended recipient, or an employee or agent 
  responsible for delivering this message to the intended recipient, 
  you

  are hereby notified that any dissemination, distribution or copying 
  of

  this communication is strictly prohibited. If you have received this

  communication in error, please notify the Sender immediately by 
  replying to the message and deleting it from your computer. Thank
you.

  Premier Inc.


 --
 Rene Gielen  | http://it-neering.net/
 Aachen   | PGP-ID: BECB785A
 Germany  | gielen at it-neering.net

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Servlet-Config Interceptor Bug?

2007-07-09 Thread Hoying, Ken
I am currently utilizing the Servlet-Config Interceptor in order to
manage HTTPSession attributes as advised in the following document:

http://struts.apache.org/2.x/docs/how-do-we-get-access-to-the-session.ht
ml

The document states that this is preferred and that:
Any changes made to the session Map are reflected in the actual
HttpSessionRequest. You may insert and remove session attributes as
needed.

This appears to be working.  However if I look at the source code for
the interceptor, I do not see where it is explicitly calling the
setAttribute() and removeAttribute() methods.  My question is don't
these methods not need to be called in order for the Session Binding to
work and for any container management of sessions to work?  Is STRUTS2
maybe manageing the map it returns to ensure that this is happening or
is this a bug that I need to be aware of and code for?

Thanks,
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

[S2] Interceptor Question (Thread Safety)

2007-07-06 Thread Hoying, Ken
From what I understand from reading the documentation, interceptors are
suppose to be thread safe.  However, I have noticed that some of the
interceptors do  contain instance variables and I have seen some
examples where these variables are set or modified from with in the
action configurations.  

For example, the File Upload interceptor allows you to set the
maximumSize and allowedTypes.  Is this going to work if I have 2
different actions each allowing different maximumSize and allowedTypes?
This does not seem thread safe to me.  Is there only one instance of the
interceptors or does maybe each action mapping have its own instance of
the interceptors?

Thanks in advance,
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: disable submit button

2007-07-05 Thread Hoying, Ken
I believe this was a bug that was fixed in Struts 2.0.8.  If you are
using a version prior to that, then I do not believe that the attribute
is working properly. 

-Original Message-
From: banurekha [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 05, 2007 12:56 PM
To: user@struts.apache.org
Subject: disable submit button


I would like to know how to disable submit button when using AJAX theme.
below is the code I am using

s:submit type=submit 
disabled = true
 theme=ajax 
 value=Save 
 title=Save all changes.
 cssClass=mediumBtn
 href=%{saveLink}
 notifyTopics=/saveTopic
 formId=techdifficultyForm
 indicator=saveIndicator/

But it does not seems to work... Could anyone help me on this
--
View this message in context:
http://www.nabble.com/disable-submit-button-tf4030977.html#a11450471
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Validating s:file

2007-06-22 Thread Hoying, Ken
I am trying to create a validation for the s:file tag to ensure that a
file name was provided.

My tag looks like this:

s:file name=xls size=30/

I tried using the validation:

field name=xls
field-validator type=requiredstring
message key=err.msg.requiredstring/
/field-validator
/field

However, the validation always fails whether the file name is empty or
not.

I then saw in the example showcase apps that they used the following
validation:

field name=xls
field-validator type=fieldexpression
param name=expression![CDATA[xls.length() 
0]]/param
message key=err.msg.requiredstring/
/field-validator
/field

However, when I attempt to do this I always get a NPE:

WARN - OgnlValueStack.logLookupFailure(269) | Caught an exception while
evaluating expression 'xls.length()  0' against value stack
java.lang.NullPointerException: target is null for method length
WARN - FieldExpressionValidator.validate(80) | Got result of null when
trying to get Boolean.

Does anyone know the correct syntax for this?

Thanks in Advance!



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] Weblogic struts.multipart.parser

2007-06-18 Thread Hoying, Ken
Good idea.  I had done that in the past but had not thought about it
here. Unfortunately, it does not seem to fix the problem.

Thanks. 

-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 16, 2007 12:23 PM
To: Struts Users Mailing List
Subject: RE: [S2] Weblogic  struts.multipart.parser

The usual workaround for avoiding conflicts between WebLogic's jar files
and the application jar files is to use prefer-web-inf-classes in the
weblogic.xml file.  This would work for simple UI components like Struts
and Beehive, but it might not work for lower-level components like the
XML parser.

 -Original Message-
 From: Hoying, Ken [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 15, 2007 12:59 PM
 To: Struts Users Mailing List
 Subject: RE: [S2] Weblogic  struts.multipart.parser
 
 There does appear to be a error in the log that I overlooked.  
 
 ERROR org.apache.beehive.netui.pageflow.internal.AdapterManager :
 ServletContainerAdapter manager not initialized correctly.
 
 It appears that this error only occurs when the application is 
 installed on the admin server.  Our application is not utilizing 
 Beehive.  It appears though that the Weblogic Console is.  I believe 
 that the two are conflicting.  When running our application on a 
 managed server without the console app, we do not get the error.
 
 This is okay since our production and test environments are set up 
 this way anyhow.  However, our developers working locally by 
 installing the app in the admin server rather than running an admin 
 server and a managed server.
 
 Anyone seen this or know of a work around?
 
 Thanks. 
 
 -Original Message-
 From: Hoying, Ken [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 13, 2007 2:37 PM
 To: user@struts.apache.org
 Subject: [S2] Weblogic  struts.multipart.parser
 
 The MultiPart parser that I am specifying in struts.properties does 
 not appear to be called under Weblogic.  This worked fine though under

 Tomcat.  I do nto see any errors in the log.
 
 Any ideas why?
 
 Thanks in Advance!
 
 
 
 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution or copying of

 this communication is strictly prohibited. If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer. Thank you.

 Premier Inc.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Parameter Interceptor Error

2007-06-15 Thread Hoying, Ken
 For others that might run into this, I solved it by making the
following conig changes to the deafultStack since our app does not use
image maps anyhow:

interceptors
   interceptor-stack name=npcStack
interceptor-ref name=defaultStack
param
name=params.excludeParamsx,y,dojo\..*/param
/interceptor-ref
   /interceptor-stack
/interceptors 

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 14, 2007 2:20 PM
To: Struts Users Mailing List
Subject: RE: [S2] Parameter Interceptor Error

I see... Now.. Using s:submit type=image/  

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 14, 2007 2:18 PM
To: Struts Users Mailing List
Subject: RE: [S2] Parameter Interceptor Error

You appear to be correct.  Care to clue me in? 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 14, 2007 2:12 PM
To: Struts Users Mailing List
Subject: RE: [S2] Parameter Interceptor Error

--- Hoying, Ken [EMAIL PROTECTED] wrote:
 I added setters for x and y in my action class. 
 They are set to different integer values each time. 

 I have no idea where this is coming from.  Is this some strange bug in

 Struts 2?

I'll bet if you move your mouse to the right x gets bigger.

d.



   

Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
***Note:The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify the Sender immediately by replying
to the message and deleting it from your computer. Thank you. Premier
Inc.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Weblogic struts.multipart.parser

2007-06-15 Thread Hoying, Ken
There does appear to be a error in the log that I overlooked.  

ERROR org.apache.beehive.netui.pageflow.internal.AdapterManager :
ServletContainerAdapter manager not initialized correctly.

It appears that this error only occurs when the application is installed
on the admin server.  Our application is not utilizing Beehive.  It
appears though that the Weblogic Console is.  I believe that the two are
conflicting.  When running our application on a managed server without
the console app, we do not get the error.  

This is okay since our production and test environments are set up this
way anyhow.  However, our developers working locally by installing the
app in the admin server rather than running an admin server and a
managed server.  

Anyone seen this or know of a work around?

Thanks. 

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 13, 2007 2:37 PM
To: user@struts.apache.org
Subject: [S2] Weblogic  struts.multipart.parser

The MultiPart parser that I am specifying in struts.properties does not
appear to be called under Weblogic.  This worked fine though under
Tomcat.  I do nto see any errors in the log.  

Any ideas why?

Thanks in Advance!



-
***Note:The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify the Sender immediately by replying
to the message and deleting it from your computer. Thank you. Premier
Inc.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Parameter Interceptor Error

2007-06-14 Thread Hoying, Ken
I am getting the following errors and I am not sure where they are
coming from.  I do not have any fields on my form named x or y.  Any
ideas?

ERROR - ParametersInterceptor.setParameters(198) | ParametersInterceptor
- [setParameters]: Unexpected Exception catched: Error setting
expression 'x' with value '[Ljava.lang.String;@19455f1'

ERROR - ParametersInterceptor.setParameters(198) | ParametersInterceptor
- [setParameters]: Unexpected Exception catched: Error setting
expression 'y' with value '[Ljava.lang.String;@af8eaa'


Thank you!



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] Parameter Interceptor Error

2007-06-14 Thread Hoying, Ken
I added setters for x and y in my action class.  They are set to
different integer values each time.  I have no idea where this is coming
from.  Is this some strange bug in Struts 2? 

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 14, 2007 1:48 PM
To: user@struts.apache.org
Subject: [S2] Parameter Interceptor Error

I am getting the following errors and I am not sure where they are
coming from.  I do not have any fields on my form named x or y.  Any
ideas?

ERROR - ParametersInterceptor.setParameters(198) | ParametersInterceptor
- [setParameters]: Unexpected Exception catched: Error setting
expression 'x' with value '[Ljava.lang.String;@19455f1'

ERROR - ParametersInterceptor.setParameters(198) | ParametersInterceptor
- [setParameters]: Unexpected Exception catched: Error setting
expression 'y' with value '[Ljava.lang.String;@af8eaa'


Thank you!



-
***Note:The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify the Sender immediately by replying
to the message and deleting it from your computer. Thank you. Premier
Inc.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Parameter Interceptor Error

2007-06-14 Thread Hoying, Ken
You appear to be correct.  Care to clue me in? 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 14, 2007 2:12 PM
To: Struts Users Mailing List
Subject: RE: [S2] Parameter Interceptor Error

--- Hoying, Ken [EMAIL PROTECTED] wrote:
 I added setters for x and y in my action class. 
 They are set to different integer values each time. 

 I have no idea where this is coming from.  Is this some strange bug in

 Struts 2?

I'll bet if you move your mouse to the right x gets bigger.

d.



   

Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Parameter Interceptor Error

2007-06-14 Thread Hoying, Ken
I see... Now.. Using s:submit type=image/  

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 14, 2007 2:18 PM
To: Struts Users Mailing List
Subject: RE: [S2] Parameter Interceptor Error

You appear to be correct.  Care to clue me in? 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 14, 2007 2:12 PM
To: Struts Users Mailing List
Subject: RE: [S2] Parameter Interceptor Error

--- Hoying, Ken [EMAIL PROTECTED] wrote:
 I added setters for x and y in my action class. 
 They are set to different integer values each time. 

 I have no idea where this is coming from.  Is this some strange bug in

 Struts 2?

I'll bet if you move your mouse to the right x gets bigger.

d.



   

Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
***Note:The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify the Sender immediately by replying
to the message and deleting it from your computer. Thank you. Premier
Inc.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Validation

2007-06-14 Thread Hoying, Ken
I am trying to perform validation using an xml file that follows the
format Action-method-validation.xml.  However, it does not appear that
the validation is being executed.  I am not sure how to debug this to
determine why.  Anyone have a good set of steps on how to debug this
issue?

Thank you.



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] Validation

2007-06-14 Thread Hoying, Ken
Thanks for the pointer on the plugin.

My Validation XML file (UploadFile-uploadXls-validation.xml) is as
follows:

!DOCTYPE validators PUBLIC 
-//OpenSymphony Group//XWork Validator 1.0.2//EN 
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;

validators
!-- @TODO this validation is not being done --
field name=memberId
field-validator type=requiredstring
message key=err.msg.requiredstring/
/field-validator
/field

field name=xls
field-validator type=fieldexpression
param name=expression![CDATA[xls.length() 
0]]/param
message key=err.msg.requiredstring/
/field-validator
/field

/validators

The Action Mapping is as follows:

action name=uploadXls method=upload
class=actnUpload
interceptor-ref name=basicStack/
interceptor-ref name=fileUpload
param name=allowedTypes
 
application/vnd.ms-excel,application/x-msexcel,application/ms-excel
/param
param name=maximumSize
1073741824
/param
/interceptor-ref
result/uploadComplete.jsp/result
result name=input/uploadFile.jsp/result
result name=error/uploadFile.jsp/result
/action
 

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 14, 2007 3:32 PM
To: Struts Users Mailing List
Subject: Re: [S2] Validation

One way to know if the validation is detected by struts is using the
config browser plugin
(http://struts.apache.org/2.x/docs/config-browser-plugin.html),
is the validation interceptor being applied to your action? In any
case, posting the action mapping and the class would help.

musachy

On 6/14/07, Hoying, Ken [EMAIL PROTECTED] wrote:

 I am trying to perform validation using an xml file that follows the 
 format Action-method-validation.xml.  However, it does not appear that

 the validation is being executed.  I am not sure how to debug this to 
 determine why.  Anyone have a good set of steps on how to debug this 
 issue?

 Thank you.



 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution or copying of

 this communication is strictly prohibited. If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer. Thank you.

 Premier Inc.




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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Does Struts2 work with WebLogic 9??

2007-06-13 Thread Hoying, Ken
I have an app that I developed under Tomcat and had everythign working
fine.  I then moved it to WebLogic and I am running into issues.  The
following senario illustrates the problem I am having...

I have a JSP page with the following:

s:set name=maxLength scope=page
value=%{getText('auto.memberName.size')}/

However, anywhere that I attempt to refernece maxLength using the
syntax: ${maxLength}, the value it returns is null.  

I am not sure why this worked in Tomcat but not in Weblogic 9.  

Is this not supported under Weblogic 9?

Thanks in Advance,
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

RE: [S2] Does Struts2 work with WebLogic 9??

2007-06-13 Thread Hoying, Ken
I was able to fix my own problem.  The web.xml was different between the
Tomcat and Weblogic apps.  Tomcat was using 2.4 and Weblogic 2.3.  Once
I updated web.xml in Weblogic app to use 2.4, all was well.

Thank you! 

-Original Message-
From: Hoying, Ken [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 13, 2007 10:31 AM
To: user@struts.apache.org
Subject: [S2] Does Struts2 work with WebLogic 9??

I have an app that I developed under Tomcat and had everythign working
fine.  I then moved it to WebLogic and I am running into issues.  The
following senario illustrates the problem I am having...

I have a JSP page with the following:

s:set name=maxLength scope=page
value=%{getText('auto.memberName.size')}/

However, anywhere that I attempt to refernece maxLength using the
syntax: ${maxLength}, the value it returns is null.  

I am not sure why this worked in Tomcat but not in Weblogic 9.  

Is this not supported under Weblogic 9?

Thanks in Advance,
Ken



-
***Note:The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify the Sender immediately by replying
to the message and deleting it from your computer. Thank you. Premier
Inc.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Weblogic struts.multipart.parser

2007-06-13 Thread Hoying, Ken
The MultiPart parser that I am specifying in struts.properties does not
appear to be called under Weblogic.  This worked fine though under
Tomcat.  I do nto see any errors in the log.  

Any ideas why?

Thanks in Advance!



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

[S2] Accessing Parameters In the Properties File

2007-06-08 Thread Hoying, Ken
I really like how I can access the field name and use it in forming the
error message for validations.  Such as:

err.msg.requiredstring =$\{getText('label.' + fieldName)} is required.

Where the validation framework passes a variable called fieldName.

I would like to use this same appraoch for other messages that generated
using parameters that were passed in.  I am betting there is a way to do
this, I just do not know how to reference them.  For example, I would
like to do something like:

myProperty=$\{getText('label.' + {0})} is required.

Does anyone know how this would be accomplished or how to reference the
values that are passed in?

Thanks in Advance!



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

[S2] Possible Bug in FileUploadInterceptor

2007-06-08 Thread Hoying, Ken
There appears to me to be an annoying bug or what I believe to be a bug
in the FileUploadInterceptor.  On line 311, if the file does not pass
the file validation the error message is retrieved as such:

String errMsg =
getTextMessage(struts.messages.error.file.too.large, new
Object[]{inputName, file.getName(),  + file.length()}, locale);

The issue that I have with this is that file.length has been converted
to a String.  This now makes it impossible to format it as a number in
your message.  

struts.messages.error.file.too.large=You attempted to upload a
{2,number} byte file.

A rather insignificant issue, but one that would be nice to see fixed in
the future.

Thanks!



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

[S2] File Upload Errors

2007-06-07 Thread Hoying, Ken
I am confused in regards to how one would customize the errors for file
upload.

The documentation on the page File Upload Interceptor
(http://struts.apache.org/2.x/docs/file-upload-interceptor.html)
indicates that the error messages are currently set to defaults in the
struts-messages.properties file.  However, when I look at the file the
messages I am getting are different than those specified.  The page goes
on to indicate that these properties can be overridden by setting them
in your properties file for the following keys:

- struts.messages.error.uploading - a general error that occurs when the
file could not be uploaded
- struts.messages.error.file.too.large - occurs when the uploaded file
is too large
- struts.messages.error.content.type.not.allowed - occurs when the
uploaded file does not match the expected content types specified

However, doing this does not seem to work either.  For example for a
fille too large error I am getting the errors message:

the request was rejected because its size (3769264) exceeds the
configured maximum (2097152)

Can someone please point me in the correct direction to allow me to
customize the messages?

Thanks in advance!




-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.  

[S2] File Upload Question

2007-06-04 Thread Hoying, Ken
As I am reading up and looking into the file upload support in S2, it
appears that files are uploaded to a temporary area and then deleted
when control is returned from the action.  It would seem then that if I
wanted to keep the file, that I then need to copy it again to somewhere
else.  Is this understanding correct?  This seems a bit inefficient to
me, especially for larger files. 

Thanks in advance.

-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[s2] If Test Conditions

2007-05-30 Thread Hoying, Ken
I am having a devil of a time getting a simple if test condition to work
properly.  

Here is the jist of what I am trying to do:

display:table id=idContract name=contracts class=results
display:column titleKey=label.select
s:if test=${idContract.status}=='NEW'
s:checkbox name=selectedContracts
fieldValue=${idContract.id}/
/s:if
s:else
nbsp;${idContract.status}nbsp;
/s:else
/display:column
display:column property=number
titleKey=label.contractNumber /
display:column property=status
titleKey=label.contractStatus /
display:column property=numAuthFacilities
titleKey=label.authFacilities /
/display:table

I have tried the following and do not seem to be able to get any of them
to work:
${idContract.status}=='NEW'
'${idContract.status}==NEW'
%{idContract.status}=='NEW'
${idContract.status=='NEW'}
%{idContract.status=='NEW'}
idContract.status=='NEW'
#idContract.status=='NEW'

And a host of others that I cannot recall.

Does anyone happen to know the correct syntax?  I am getting tired of
guessing and cannot seem to make rhyme or reason out of the syntax rules
:-)

Thanks in advance!

-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [s2] If Test Conditions

2007-05-30 Thread Hoying, Ken
I will give that a try.  I am sure it will work.  Thank you so much for
your clear and detailed response.  I now not only know what to do, but
more importantly why it needs to be done that way. Thank you!

 

-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 30, 2007 10:10 AM
To: Struts Users Mailing List
Subject: Re: [s2] If Test Conditions

The problem is that displaytag places the current row in the pageContext
but none of your expressions are addressing it.

I tend to just use JSTL within displaytag tables as its much easier to
access the current row.
I also tend to add getters to my bean to simplify the expressions
instead of hardcoding it in the JSP. eg. isNew()

Anyway, this is a struts2 way to access it:

display:table id=idContract name=contracts class=results
   s:set name=rowIdContact value=#attr.idContract/
  display:column titleKey=label.select
s:if test=#rowIdContact.equals('NEW')
s:checkbox name=selectedContracts

etc. 
The main point of that is that the idContact row is accessed via #attr

But this is my preferred way:

display:table id=idContract name=contracts class=results
   display:column titleKey=label.select
  c:if test=idContract.new
s:checkbox name=selectedContracts

where isNew() is property of the row class.

Hoying, Ken wrote:
 I am having a devil of a time getting a simple if test condition to 
 work properly.

 Here is the jist of what I am trying to do:

 display:table id=idContract name=contracts class=results
   display:column titleKey=label.select
   s:if test=${idContract.status}=='NEW'
   s:checkbox name=selectedContracts
 fieldValue=${idContract.id}/
   /s:if
   s:else
   nbsp;${idContract.status}nbsp;
   /s:else
   /display:column
   display:column property=number
 titleKey=label.contractNumber /
   display:column property=status
 titleKey=label.contractStatus /
   display:column property=numAuthFacilities
 titleKey=label.authFacilities /
 /display:table

 I have tried the following and do not seem to be able to get any of 
 them to work:
 ${idContract.status}=='NEW'
 '${idContract.status}==NEW'
 %{idContract.status}=='NEW'
 ${idContract.status=='NEW'}
 %{idContract.status=='NEW'}
 idContract.status=='NEW'
 #idContract.status=='NEW'

 And a host of others that I cannot recall.

 Does anyone happen to know the correct syntax?  I am getting tired of 
 guessing and cannot seem to make rhyme or reason out of the syntax 
 rules
 :-)

 Thanks in advance!

 -
 ***Note:The information contained in this message may be privileged 
 and confidential and protected from disclosure. If the reader of this 
 message is not the intended recipient, or an employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution or copying of

 this communication is strictly prohibited. If you have received this 
 communication in error, please notify the Sender immediately by 
 replying to the message and deleting it from your computer. Thank you.

 Premier Inc.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] Accessing Properties

2007-05-29 Thread Hoying, Ken
 
I am new to Struts2 and have a question in regards to accessing
properties from Java classes outside of the Action.  If I would like to
utilize the concept of package.properties property files.  Is there
already classes available that I can easily utilize to access these
properties?

Thanks in advance,
Ken

-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Accessing Properties

2007-05-25 Thread Hoying, Ken
I am new to Struts2 and have a question in regards to accessing
properties from Java classes outside of the Action.  If I would like to
utilize the concept of package.properties property files.  Is there
already classes available that I can easily utilize to access these
properties?

Thanks in advance,
Ken



-
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.