Vote for Java runtime for Google App Engine

2008-04-16 Thread Van Riper
If you have not heard about the recent launch of Google App Engine, I
blogged about it here with links to more information and video
recorded at the official launch event on April 7th:

http://weblogs.java.net/blog/van_riper/archive/2008/04/google_app_engi_1.html

It is a free (up to a fair amount of page views and bandwidth per
month) scalable web application hosting environment. It sounds like a
really nice setup except for one thing. The only supported runtime is
Python initially. If you would like to voice your support for adding
Java runtime support to GAE, you can do so by starring this issue:

http://tinyurl.com/5svpmh

Important Note: Please do *not* add a "+1" comment to this issue like
many others have already done. All that is necessary is to star the
issue. Comments are intended to provide more information about an
issue and everyone that stars an issue sees these comments. So, it
ends up generating essentially spam email for everyone that has
starred the issue.

I fully realize that more factors than simply the number of stars an
issue receives will go into the decision process with respect to a
major feature addition like this. Still, the Java runtime issue is the
top vote getter so far and I would like to keep it that way. The Ruby
runtime issue is not that far behind us. :-)

Cheers, Van

-- 
| Michael "Van" Riper
| http://weblogs.java.net/blog/van_riper/
| http://www.linkedin.com/in/vanriper

| Silicon Valley Web Developer JUG
| mailto:[EMAIL PROTECTED]
| https://sv-web-jug.dev.java.net

| Silicon Valley Google Technology User Group
| mailto:[EMAIL PROTECTED]
| http://sv-gtug.org

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



Re: Overriding subset of interceptor params

2008-04-16 Thread Jon Wilmoth
Thanks for the response.  The issue I'm seeing isn't with overriding parameters 
all parameters available, but rather just one or two out of all the interceptor 
params

Doesn't work:

  
  actionSpecificValue
 


Works:

  
 
 defaultValueA
 
 defaultValueB
 actionSpecificValue
 


The exception interceptor may not be a good example as it doesn't initialize 
any of the 3 parameters in the stack definition in struts-default.xml.  Any 
way, I've opened https://issues.apache.org/struts/browse/WW-2595 to capture the 
issue (or maybe enhancement).

- Original Message 
From: Gabriel Belingueres <[EMAIL PROTECTED]>
To: Struts Users Mailing List ; Jon Wilmoth <[EMAIL 
PROTECTED]>
Sent: Wednesday, April 16, 2008 4:55:25 PM
Subject: Re: Overriding subset of interceptor params

Seems OK to me (according to the current documentation.)

I've only overriden interceptor parameters in the declaration of a new
stack, and it is working OK:

  


  true
  ERROR
  my.package.here

  

Try to create a new stack for your action (for testing pourposes only)
to see if the results are the same. If they are, post your struts.xml
file here.

2008/4/16, Jon Wilmoth <[EMAIL PROTECTED]>:
> I'm trying to override one of three interceptor parameters in an action 
> specific config using method #2 described in
> http://struts.apache.org/2.0.11.1/docs/interceptors.html#Interceptors-InterceptorParameterOverriding.
>   Unfortunately the other two parameters that I'm not overriding are not 
> being taken from the default stack definition and are ending up as null on 
> the interceptor.  Before I open a Jira bug (or enhancement request), I 
> thought I'd make sure a) this isn't user error b) the expected behavior is 
> "my" expected behavior (i.e. bug vs. enhancement).  Below is a sample action 
> config showing what I'm attempting...
>
> 
>
>
>
>
>
>defaultValueA
>defaultValueB
>defaultValueC
>
>
> 
>
> With the following action config, the "myInterceptor" interceptor's  paramA & 
> paramB are null and not "defaultValueA" and "defaultValueB" as 
> expected/desired.
>
> 
>
>
>actionSpecificValue
>
>
> 
>
> Thanks,
> Jon

datetimepicker doesn't show up

2008-04-16 Thread tristan_colson

I am trying to use s:datetimepicker.
I have the  in my  section.
I have  like this:
to 

The html renders like this:


// Dojo configuration
djConfig = {
baseRelativePath: "/struts/dojo",
isDebug: false,
bindEncoding: "UTF-8",
debugAtAllCosts: true // not needed, but allows the Venkman debugger
to work with the includes
};






.

 script type="text/javascript">
dojo.require("dojo.widget.DatePicker");



Note that the above div tag is empty. Seems like there should be something
in it.
The datetimepicker doesn't show up on the page.

Am I using the tag wrong? Or might my environment be missing something?
Many thanks for any help!

-- 
View this message in context: 
http://www.nabble.com/datetimepicker-doesn%27t-show-up-tp16737339p16737339.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]



Re: Is it possible to make a pop up window using Struts?

2008-04-16 Thread ryan webb
Dear Randy,

Thank you very much for your kind reply..your method is very good. I will
note your reply. =)
Is it possible to transfer query string using this method? although i am not
quite sure yet that this will work.

I will get parameter in my action class using *
request.getParameter("orderNumber");* then store it to a form bean
variable(String data type)then on popup window I will use *
* accessing form bean variable (form bean property).

Again, I would like to thank you for your answer.

-Ryan Webb


On Thu, Apr 17, 2008 at 3:56 AM, Randy Burgess <[EMAIL PROTECTED]> wrote:

> You can pass a query string to the popup window. Here is an example.
>
> 
> href="javascript:popup('printOrder.do?orderNumber=${order.workOrderNumber}',
> 600, 600, true);">
>
> And then in the popup window to get the orderNumber param passed in above:
>
> 
> Reference Number: ${param.orderNumber}
> 
>
> You might want to change the href to # and put the window.open code in the
> onclick event but other than that this will work fine. In this case order
> Is a request attribute for this action.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: ryan webb <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List 
> > Date: Wed, 16 Apr 2008 16:40:25 +0800
> > To: Struts Users Mailing List 
> > Subject: Re: Is it possible to make a pop up window using Struts?
> >
> > Antonio,
> >
> >> 1) What Struts? Struts 1.2.9 (Netbeans bundle)
> >> 2) You can still do it in Javascript. I see.. I just want to know if
> you do
> > it with struts.
> >
> > I am having trouble with it..I created a pop up window using javascript
> and
> > i cant pass query string on new window.
> > when i clicked a  I pass a paramId and paramProperty and I
> cant
> > make it appear to new window.
> >
> > I have an action class that has *request.setAttribute("username",
> > request.getParameter("username"));*
> > on the new window I have *<%=
> out.println(request.getAttribute("username"))
> > %>* but this only displays the word NULL
> >
> > I am new to struts..
> >
> > Ryan
> >
> > On Wed, Apr 16, 2008 at 4:22 PM, Antonio Petrelli <
> > [EMAIL PROTECTED]> wrote:
> >
> >> 2008/4/16, ryan webb <[EMAIL PROTECTED]>:
> >>>  Is it possible to make a window pop up using struts?
> >>>  usually this can be done in Javascript..
> >>
> >> 1) What Struts?
> >> 2) You can still do it in Javascript
> >>
> >> Antonio
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
>
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information.  If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email.  Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information.  If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email.  Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>


Re: Overriding subset of interceptor params

2008-04-16 Thread Gabriel Belingueres
Seems OK to me (according to the current documentation.)

I've only overriden interceptor parameters in the declaration of a new
stack, and it is working OK:

  


  true
  ERROR
  my.package.here

  

Try to create a new stack for your action (for testing pourposes only)
to see if the results are the same. If they are, post your struts.xml
file here.

2008/4/16, Jon Wilmoth <[EMAIL PROTECTED]>:
> I'm trying to override one of three interceptor parameters in an action 
> specific config using method #2 described in
> http://struts.apache.org/2.0.11.1/docs/interceptors.html#Interceptors-InterceptorParameterOverriding.
>   Unfortunately the other two parameters that I'm not overriding are not 
> being taken from the default stack definition and are ending up as null on 
> the interceptor.  Before I open a Jira bug (or enhancement request), I 
> thought I'd make sure a) this isn't user error b) the expected behavior is 
> "my" expected behavior (i.e. bug vs. enhancement).  Below is a sample action 
> config showing what I'm attempting...
>
> 
>
>
>
>
>
>defaultValueA
>defaultValueB
>defaultValueC
>
>
> 
>
> With the following action config, the "myInterceptor" interceptor's  paramA & 
> paramB are null and not "defaultValueA" and "defaultValueB" as 
> expected/desired.
>
> 
>
>
>actionSpecificValue
>
>
> 
>
> Thanks,
> Jon

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



Ajax components inside a tabbed panel

2008-04-16 Thread Márcio Gurgel
I'm having lots of problems with components inside tabbedPanels...

For example:
This example from show case works outside a tabbed panel:

  2. Attach to "onmouseover", and "onclick" event on Area below and update
content of Div1, highlight targets with green color


Mouse Over or Click Here!


When its inside a div from tabbedpanel just doesn't work.

Does anyone can help me?
I this a issue?

Regards,

Márcio Gurgel


Re: ParameterAware Arrays

2008-04-16 Thread Gabriel Belingueres
You can of course set up instance variables in your action class with
identical names as the parameters you intend to use.

2008/4/16, Dustin S. <[EMAIL PROTECTED]>:
> I noticed the the map for setParameters is . If I
> intend to always only use [0], is there any easy way to accomplish
> this without having to do [0] everytime I get() a parameter from the
> map? I noticed there is SingleValueMap in webwork for this purpose.
> Does something exist like this in Struts 2 or possibly is there any
> easier way to get params from a url (page?parm1=value1¶m2=value2)
> that I am not seeing?
>
> -
> 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: Struts2 Portlet with custom interceptors

2008-04-16 Thread Parker Grimes
Thanks for your help I had an "ah ha" moment. I know I read that the stack
gets passed through twice, once down the stack and then back up but I had
forgotten that. That was my problem. The exception was being thrown on the
way back up the stack and being caught by the default
ExceptionMappingInterceptor since it was lower in the stack.

I did as you suggested and defined my own default stack, replacing the
exception interceptor with mine. Works great now.

Thanks again for the help.

Parker


On Wed, Apr 16, 2008 at 3:59 PM, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]>
wrote:

> The default ExceptionMappingInterceptor is "closer" to the error (as
> it is configured by default), so it will intercept it first (on the
> way out... [1]). If you already have configured exception mappings for
> that interceptor, it will never reach your interceptor. It might be
> better for you to replace the the interceptor in the stack, as you
> have already tried. You can set up your own default stack in your
> application struts.xml file. It's a bit of duplication, but there's no
> need to edit the framework supplied configuration files.
>
> [1] -
> http://struts.apache.org/2.x/docs/interceptors.html#Interceptors-OrderofInterceptorExecution
>
> Nils-H
>
> On Wed, Apr 16, 2008 at 9:46 PM, Parker Grimes <[EMAIL PROTECTED]> wrote:
> > My interceptor is being called, but it appears that
> >  com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor is
> still
> >  being called before my interceptor, despite having my interceptor
> declared
> >  first in the stack. As you can tell my interceptor is handed the
> "error"
> >  result rather than catching the exception.
> >
> >  The only way I was able to get it to work is by changing the
> 'exception'
> >  interceptor definition in struts-default.xml to point to my class. As a
> side
> >  note, is there a way to override struts-default.xml? I tried setting
> the
> >  property
> >
>  struts.configuration.files=my-struts-default.xml,struts-plugin.xml,struts.xml
> >  and overriding the 'exception' interceptor in my-struts-default.xml,
> but the
> >  struts-default.xml was still being loaded. So I ended up checking out
> the
> >  struts2 source, editing struts-default.xml and packaging it myself,
> which is
> >  kind of a pain.
> >
> >  I have have tried both Struts 2.0.11 and 2.1.1 , also
> tried
> >  it as a regular app and a portlet app and I get the same behavior.
> >
> >  Thanks,
> >  Parker
> >
> >  On Wed, Apr 16, 2008 at 11:12 AM, Nils-Helge Garli Hegvik <
> [EMAIL PROTECTED]>
> >  wrote:
> >
> >
> >
> >  > I did some testing locally, and it looks to me like exceptions should
> >  > be propagated properly. Are you sure that the exception is not
> handled
> >  > somewhere else? From your logs, it appears that "error" is returned
> >  > somewhere along the chain.
> >  >
> >  > Nils-H
> >  >
> >  > On Wed, Apr 16, 2008 at 12:46 AM, Parker Grimes <[EMAIL PROTECTED]>
> wrote:
> >  > > I am trying to implement a custom exception mapping interceptor to
> be
> >  > used
> >  > >  in my struts2 portlet. I implemented my own
> ExceptionMappingInterceptor
> >  > >  class that is similar to
> >  > >  com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor,
> the
> >  > only
> >  > >  difference is that I send an email with the exception report to
> the
> >  > >  application administrators. I have used this same interceptor
> >  > successfully
> >  > >  in a regular struts2 application.
> >  > >
> >  > >  The problem I am having is that it appears that the action is
> being
> >  > called
> >  > >  and the exception caught by some other class before it gets to my
> >  > >  interceptor even though my interceptor is declared first in my
> stack.
> >  > Since
> >  > >  my custom interceptor is first in my stack shouldn't it be the
> first
> >  > thing
> >  > >  to catch an exception begin thrown from my action?
> >  > >
> >  > >  *My interceptor looks like this in struts.xml:*
> >  > >  
> >  > >  >  > >  class="edu.suu.struts2.interceptor.ExceptionMappingInterceptor"/>
> >  > > 
> >  > > 
> >  > > 
> >  > > 
> >  > >  
> >  > >  
> >  > >
> >  > >  *
> >  > >  Here is my debug logging:*
> >  > >  DEBUG [com.opensymphony.xwork2.DefaultActionInvocation] -
> Executing
> >  > action
> >  > >  method = optIn
> >  > >  DEBUG [edu.suu.googleapps.portlet.OptInAction] - optIn()
> >  > >  ---exception is thrown here---
> >  > >  DEBUG [org.apache.struts2.portlet.result.PortletResult] -
> Executing
> >  > result
> >  > >  in Event phase
> >  > >  DEBUG [org.apache.struts2.portlet.result.PortletResult] - Setting
> event
> >  > >  render parameter: /WEB-INF/jsp/error.jsp
> >  > >  DEBUG [edu.suu.struts2.interceptor.ExceptionMappingInterceptor] -
> >  > result =
> >  > >  error
> >  > >  DEBUG [edu.suu.struts2.interceptor.ExceptionMappingInterceptor] -
> No
> >  > >  exceptions caught
> >  > >  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispat

Re: Struts2 Portlet with custom interceptors

2008-04-16 Thread Nils-Helge Garli Hegvik
The default ExceptionMappingInterceptor is "closer" to the error (as
it is configured by default), so it will intercept it first (on the
way out... [1]). If you already have configured exception mappings for
that interceptor, it will never reach your interceptor. It might be
better for you to replace the the interceptor in the stack, as you
have already tried. You can set up your own default stack in your
application struts.xml file. It's a bit of duplication, but there's no
need to edit the framework supplied configuration files.

[1] - 
http://struts.apache.org/2.x/docs/interceptors.html#Interceptors-OrderofInterceptorExecution

Nils-H

On Wed, Apr 16, 2008 at 9:46 PM, Parker Grimes <[EMAIL PROTECTED]> wrote:
> My interceptor is being called, but it appears that
>  com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor is still
>  being called before my interceptor, despite having my interceptor declared
>  first in the stack. As you can tell my interceptor is handed the "error"
>  result rather than catching the exception.
>
>  The only way I was able to get it to work is by changing the 'exception'
>  interceptor definition in struts-default.xml to point to my class. As a side
>  note, is there a way to override struts-default.xml? I tried setting the
>  property
>  struts.configuration.files=my-struts-default.xml,struts-plugin.xml,struts.xml
>  and overriding the 'exception' interceptor in my-struts-default.xml, but the
>  struts-default.xml was still being loaded. So I ended up checking out the
>  struts2 source, editing struts-default.xml and packaging it myself, which is
>  kind of a pain.
>
>  I have have tried both Struts 2.0.11 and 2.1.1 , also tried
>  it as a regular app and a portlet app and I get the same behavior.
>
>  Thanks,
>  Parker
>
>  On Wed, Apr 16, 2008 at 11:12 AM, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]>
>  wrote:
>
>
>
>  > I did some testing locally, and it looks to me like exceptions should
>  > be propagated properly. Are you sure that the exception is not handled
>  > somewhere else? From your logs, it appears that "error" is returned
>  > somewhere along the chain.
>  >
>  > Nils-H
>  >
>  > On Wed, Apr 16, 2008 at 12:46 AM, Parker Grimes <[EMAIL PROTECTED]> wrote:
>  > > I am trying to implement a custom exception mapping interceptor to be
>  > used
>  > >  in my struts2 portlet. I implemented my own ExceptionMappingInterceptor
>  > >  class that is similar to
>  > >  com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor, the
>  > only
>  > >  difference is that I send an email with the exception report to the
>  > >  application administrators. I have used this same interceptor
>  > successfully
>  > >  in a regular struts2 application.
>  > >
>  > >  The problem I am having is that it appears that the action is being
>  > called
>  > >  and the exception caught by some other class before it gets to my
>  > >  interceptor even though my interceptor is declared first in my stack.
>  > Since
>  > >  my custom interceptor is first in my stack shouldn't it be the first
>  > thing
>  > >  to catch an exception begin thrown from my action?
>  > >
>  > >  *My interceptor looks like this in struts.xml:*
>  > >  
>  > >   > >  class="edu.suu.struts2.interceptor.ExceptionMappingInterceptor"/>
>  > > 
>  > > 
>  > > 
>  > > 
>  > >  
>  > >  
>  > >
>  > >  *
>  > >  Here is my debug logging:*
>  > >  DEBUG [com.opensymphony.xwork2.DefaultActionInvocation] - Executing
>  > action
>  > >  method = optIn
>  > >  DEBUG [edu.suu.googleapps.portlet.OptInAction] - optIn()
>  > >  ---exception is thrown here---
>  > >  DEBUG [org.apache.struts2.portlet.result.PortletResult] - Executing
>  > result
>  > >  in Event phase
>  > >  DEBUG [org.apache.struts2.portlet.result.PortletResult] - Setting event
>  > >  render parameter: /WEB-INF/jsp/error.jsp
>  > >  DEBUG [edu.suu.struts2.interceptor.ExceptionMappingInterceptor] -
>  > result =
>  > >  error
>  > >  DEBUG [edu.suu.struts2.interceptor.ExceptionMappingInterceptor] - No
>  > >  exceptions caught
>  > >  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] -
>  > Leaving
>  > >  processAction
>  > >  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] -
>  > Entering
>  > >  render
>  > >  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] -
>  > >  serviceAction
>  > >  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] -
>  > Creating
>  > >  action proxy for name = renderDirect, namespace =
>  > >  DEBUG [com.opensymphony.xwork2.DefaultActionProxy] - Creating an
>  > >  DefaultActionProxy for namespace  and action name renderDirect
>  > >  DEBUG [org.apache.struts2.portlet.interceptor.PortletStateInterceptor]
>  > -
>  > >  Restoring value stack from event phase
>  > >  DEBUG [org.apache.struts2.portlet.interceptor.PortletStateInterceptor]
>  > -
>  > >  Restored stack
>  > >  DEBUG [com.opensymphony.xwork2.interceptor.I18nInt

Re: Is it possible to make a pop up window using Struts?

2008-04-16 Thread Randy Burgess
You can pass a query string to the popup window. Here is an example.



And then in the popup window to get the orderNumber param passed in above:


Reference Number: ${param.orderNumber}


You might want to change the href to # and put the window.open code in the
onclick event but other than that this will work fine. In this case order
Is a request attribute for this action.
 
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: ryan webb <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List 
> Date: Wed, 16 Apr 2008 16:40:25 +0800
> To: Struts Users Mailing List 
> Subject: Re: Is it possible to make a pop up window using Struts?
> 
> Antonio,
> 
>> 1) What Struts? Struts 1.2.9 (Netbeans bundle)
>> 2) You can still do it in Javascript. I see.. I just want to know if you do
> it with struts.
> 
> I am having trouble with it..I created a pop up window using javascript and
> i cant pass query string on new window.
> when i clicked a  I pass a paramId and paramProperty and I cant
> make it appear to new window.
> 
> I have an action class that has *request.setAttribute("username",
> request.getParameter("username"));*
> on the new window I have *<%= out.println(request.getAttribute("username"))
> %>* but this only displays the word NULL
> 
> I am new to struts..
> 
> Ryan
> 
> On Wed, Apr 16, 2008 at 4:22 PM, Antonio Petrelli <
> [EMAIL PROTECTED]> wrote:
> 
>> 2008/4/16, ryan webb <[EMAIL PROTECTED]>:
>>>  Is it possible to make a window pop up using struts?
>>>  usually this can be done in Javascript..
>> 
>> 1) What Struts?
>> 2) You can still do it in Javascript
>> 
>> Antonio
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.


This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.


Re: Struts2 Portlet with custom interceptors

2008-04-16 Thread Parker Grimes
My interceptor is being called, but it appears that
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor is still
being called before my interceptor, despite having my interceptor declared
first in the stack. As you can tell my interceptor is handed the "error"
result rather than catching the exception.

The only way I was able to get it to work is by changing the 'exception'
interceptor definition in struts-default.xml to point to my class. As a side
note, is there a way to override struts-default.xml? I tried setting the
property
struts.configuration.files=my-struts-default.xml,struts-plugin.xml,struts.xml
and overriding the 'exception' interceptor in my-struts-default.xml, but the
struts-default.xml was still being loaded. So I ended up checking out the
struts2 source, editing struts-default.xml and packaging it myself, which is
kind of a pain.

I have have tried both Struts 2.0.11 and 2.1.1 , also tried
it as a regular app and a portlet app and I get the same behavior.

Thanks,
Parker

On Wed, Apr 16, 2008 at 11:12 AM, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]>
wrote:

> I did some testing locally, and it looks to me like exceptions should
> be propagated properly. Are you sure that the exception is not handled
> somewhere else? From your logs, it appears that "error" is returned
> somewhere along the chain.
>
> Nils-H
>
> On Wed, Apr 16, 2008 at 12:46 AM, Parker Grimes <[EMAIL PROTECTED]> wrote:
> > I am trying to implement a custom exception mapping interceptor to be
> used
> >  in my struts2 portlet. I implemented my own ExceptionMappingInterceptor
> >  class that is similar to
> >  com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor, the
> only
> >  difference is that I send an email with the exception report to the
> >  application administrators. I have used this same interceptor
> successfully
> >  in a regular struts2 application.
> >
> >  The problem I am having is that it appears that the action is being
> called
> >  and the exception caught by some other class before it gets to my
> >  interceptor even though my interceptor is declared first in my stack.
> Since
> >  my custom interceptor is first in my stack shouldn't it be the first
> thing
> >  to catch an exception begin thrown from my action?
> >
> >  *My interceptor looks like this in struts.xml:*
> >  
> >  >  class="edu.suu.struts2.interceptor.ExceptionMappingInterceptor"/>
> > 
> > 
> > 
> > 
> >  
> >  
> >
> >  *
> >  Here is my debug logging:*
> >  DEBUG [com.opensymphony.xwork2.DefaultActionInvocation] - Executing
> action
> >  method = optIn
> >  DEBUG [edu.suu.googleapps.portlet.OptInAction] - optIn()
> >  ---exception is thrown here---
> >  DEBUG [org.apache.struts2.portlet.result.PortletResult] - Executing
> result
> >  in Event phase
> >  DEBUG [org.apache.struts2.portlet.result.PortletResult] - Setting event
> >  render parameter: /WEB-INF/jsp/error.jsp
> >  DEBUG [edu.suu.struts2.interceptor.ExceptionMappingInterceptor] -
> result =
> >  error
> >  DEBUG [edu.suu.struts2.interceptor.ExceptionMappingInterceptor] - No
> >  exceptions caught
> >  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] -
> Leaving
> >  processAction
> >  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] -
> Entering
> >  render
> >  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] -
> >  serviceAction
> >  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] -
> Creating
> >  action proxy for name = renderDirect, namespace =
> >  DEBUG [com.opensymphony.xwork2.DefaultActionProxy] - Creating an
> >  DefaultActionProxy for namespace  and action name renderDirect
> >  DEBUG [org.apache.struts2.portlet.interceptor.PortletStateInterceptor]
> -
> >  Restoring value stack from event phase
> >  DEBUG [org.apache.struts2.portlet.interceptor.PortletStateInterceptor]
> -
> >  Restored stack
> >  DEBUG [com.opensymphony.xwork2.interceptor.I18nInterceptor] - intercept
> >  '/renderDirect' {
> >  DEBUG [com.opensymphony.xwork2.interceptor.I18nInterceptor] -
> >  requested_locale=null
> >  *
> >  The interceptor looks like this:*
> >  public String intercept(ActionInvocation invocation) throws Exception {
> > HttpServletRequest request = ServletActionContext.getRequest();
> > String result = null;
> > try {
> > logger.debug("Invoking action, looking for exceptions.");
> > result = invocation.invoke();
> > logger.debug("result = " + result);
> > logger.debug("No exceptions caught");
> > } catch (Exception ex) {
> > logger.debug("Exceptions caught");
> > ex.printStackTrace();
> > ..
> > }
> > return result;
> >  }
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Overriding subset of interceptor params

2008-04-16 Thread Jon Wilmoth
I'm trying to override one of three interceptor parameters in an action 
specific config using method #2 described in 
http://struts.apache.org/2.0.11.1/docs/interceptors.html#Interceptors-InterceptorParameterOverriding.
  Unfortunately the other two parameters that I'm not overriding are not being 
taken from the default stack definition and are ending up as null on the 
interceptor.  Before I open a Jira bug (or enhancement request), I thought I'd 
make sure a) this isn't user error b) the expected behavior is "my" expected 
behavior (i.e. bug vs. enhancement).  Below is a sample action config showing 
what I'm attempting...
 






defaultValueA
defaultValueB
defaultValueC



 
With the following action config, the "myInterceptor" interceptor's  paramA & 
paramB are null and not "defaultValueA" and "defaultValueB" as expected/desired.
 



actionSpecificValue



 
Thanks,
Jon

Re: Text formatting

2008-04-16 Thread Dave Newton
--- Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Adam Gordon <[EMAIL PROTECTED]> wrote:
> > I'm sure this was totally unintentional and you did it to simply get the 
> > email address of the mailing list, but thread hijacking is generally 
> > frowned upon in support mailing lists.
> 
> He started the thread, and it's about formatting (via the  tag).

Just realized I viewed this in a non-threaded view and I didn't check the
headers, so it might have been hijacked; sorry.

Dave


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



Re: Text formatting

2008-04-16 Thread Dave Newton
--- Adam Gordon <[EMAIL PROTECTED]> wrote:
> I'm sure this was totally unintentional and you did it to simply get the 
> email address of the mailing list, but thread hijacking is generally 
> frowned upon in support mailing lists.

He started the thread, and it's about formatting (via the  tag).

Dave

> Hartrich, James CTR USTRANSCOM J6 wrote:
> > Struts2.0.9
> > Has anyone successfully formatted a number 555 into 555-.
> >
> >
> > MyAction.properties:  format.telephone={0,number,###-}
> > 
> > My.jsp: 
> > 
> > 
> > 
> >
> > The only output rendered to the jsp page after numerous attempts is the
> > string "format.telephone".
> >
> > Thanks
> > James
> >   
> 
> -
> 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]



Eclipse plugins to verify xml/jsp at compile time?

2008-04-16 Thread Michael Gagnon
Is there any plugin support for eclipse that can help validate struts2
configuration? 

So if I have a struts.xml mapping like:

...

Then some build-time plugin might check and see the
userAccounts.action.LoginUserAction class does not exist

Or perhaps a struts tag in a JSP might look like:

...

And some build-time check might notice that "RegisterUser" has no mapping in
the "userAccounts" package of the struts.xml


Currently my only method of finding these errors (which are CAPABLE of being
detected at compile time) is to start Tomcat. If it starts up successfully
then my struts.xml is okay. Then the only way to verify jsp
s:form,s:action,s:url,etc. tags is to browse the page and look for Tocmat
output. This makes it easy to successfully compile a project, pass all unit
tests, but check in broken code to source control.



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



Re: Text formatting

2008-04-16 Thread Adam Gordon

James-

I'm sure this was totally unintentional and you did it to simply get the 
email address of the mailing list, but thread hijacking is generally 
frowned upon in support mailing lists.


--adam

Hartrich, James CTR USTRANSCOM J6 wrote:

Struts2.0.9
Has anyone successfully formatted a number 555 into 555-.


MyAction.properties:  format.telephone={0,number,###-}

My.jsp: 




The only output rendered to the jsp page after numerous attempts is the
string "format.telephone".

Thanks
James
  


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



Re: Validation of Struts XML files

2008-04-16 Thread Adam Gordon
Well, the DTD files are identical, only the URLs are different so I 
don't expect the outcome to be any different


And it turns out it's not.  Changing the URL does not prevent Tomcat 
from going out and trying to retrieve the DTD even though I've added it 
to the JAR file.


Any other ideas?

--adam

Dave Newton wrote:

Does it work if you use the DTD it says to use?

http://struts.apache.org/dtds/struts-config_1_3.dtd";>

Dave

--- Adam Gordon <[EMAIL PROTECTED]> wrote:

  
Last night, our company had a maintenance window whereby Internet access 
was shut off from our office to the outside world.  During that time I 
was doing development and attempted to start up our web app in a 
development environment.


I've not seen this error in almost 2 years but it's apparently back:

[org.apache.struts.action.ActionServlet] [handleConfigException] Parsing 
error processing resource path /WEB-INF/struts-optout.xml

java.net.UnknownHostException: jakarta.apache.org
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
...*snip*...

I remember this well.  The problem is that struts-optout.xml has the 
DOCTYPE of:


http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd";>

But, the struts-config_1_3.dtd is not in the struts.jar file (we're 
using Struts 1.2.9) so, apparently in order to validate that the XML 
file is well-formed at webapp start up time, Tomcat feels the need to go 
out and retrieve this DTD - only it can't because Internet access was 
down.  The problem is greatly exacerbated by the fact that Tomcat stops 
processing the loading of struts modules when this one fails essentially 
rendering the web app useless.


I seem to recall playing with turning validation of XML files off, but 
that not being a sufficient solution so I tried adding the DTD into the 
struts JAR file in the same location as the other DTDs:  
org/apache/struts/resources/struts-config_1_x.dtd (where x=0,1,2) but 
that didn't work.


We need to be able to find a solution to where we can host the DTDs 
locally and do not have to rely on a 3rd party server being up in order 
to deploy our web application.  I seem to recall this being an issue 
with the W3C (especally w.r.t. [X]HTML validation in that it results in 
a ton of unnecessary network calls to retrieve DTDs for validation 
rather than web servers hosting the DTDs locally.


I'm sure I'm not the only one to have seen this so any help to resolve 
this would be greatly appreciated.  Thanks.


-- adam

-
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]



ParameterAware Arrays

2008-04-16 Thread Dustin S.
I noticed the the map for setParameters is . If I
intend to always only use [0], is there any easy way to accomplish
this without having to do [0] everytime I get() a parameter from the
map? I noticed there is SingleValueMap in webwork for this purpose.
Does something exist like this in Struts 2 or possibly is there any
easier way to get params from a url (page?parm1=value1¶m2=value2)
that I am not seeing?

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



Re: datetimepicker on 2.1.1-SNAPSHOT

2008-04-16 Thread Dave Newton
--- D�cio Heinzelmann Luckow <[EMAIL PROTECTED]> wrote:
> The ajax tags was moved to another package or plugin?

Plugin.

> Is there an release notes to 2.1.1?

http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
http://struts.apache.org/2.0.11.1/docs/version-notes-210.html
http://struts.apache.org/2.0.11.1/docs/version-notes-211.html

Dave


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



Re: Struts2 Portlet with custom interceptors

2008-04-16 Thread Nils-Helge Garli Hegvik
I did some testing locally, and it looks to me like exceptions should
be propagated properly. Are you sure that the exception is not handled
somewhere else? From your logs, it appears that "error" is returned
somewhere along the chain.

Nils-H

On Wed, Apr 16, 2008 at 12:46 AM, Parker Grimes <[EMAIL PROTECTED]> wrote:
> I am trying to implement a custom exception mapping interceptor to be used
>  in my struts2 portlet. I implemented my own ExceptionMappingInterceptor
>  class that is similar to
>  com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor, the only
>  difference is that I send an email with the exception report to the
>  application administrators. I have used this same interceptor successfully
>  in a regular struts2 application.
>
>  The problem I am having is that it appears that the action is being called
>  and the exception caught by some other class before it gets to my
>  interceptor even though my interceptor is declared first in my stack. Since
>  my custom interceptor is first in my stack shouldn't it be the first thing
>  to catch an exception begin thrown from my action?
>
>  *My interceptor looks like this in struts.xml:*
>  
>   class="edu.suu.struts2.interceptor.ExceptionMappingInterceptor"/>
> 
> 
> 
> 
>  
>  
>
>  *
>  Here is my debug logging:*
>  DEBUG [com.opensymphony.xwork2.DefaultActionInvocation] - Executing action
>  method = optIn
>  DEBUG [edu.suu.googleapps.portlet.OptInAction] - optIn()
>  ---exception is thrown here---
>  DEBUG [org.apache.struts2.portlet.result.PortletResult] - Executing result
>  in Event phase
>  DEBUG [org.apache.struts2.portlet.result.PortletResult] - Setting event
>  render parameter: /WEB-INF/jsp/error.jsp
>  DEBUG [edu.suu.struts2.interceptor.ExceptionMappingInterceptor] - result =
>  error
>  DEBUG [edu.suu.struts2.interceptor.ExceptionMappingInterceptor] - No
>  exceptions caught
>  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] - Leaving
>  processAction
>  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] - Entering
>  render
>  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] -
>  serviceAction
>  DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] - Creating
>  action proxy for name = renderDirect, namespace =
>  DEBUG [com.opensymphony.xwork2.DefaultActionProxy] - Creating an
>  DefaultActionProxy for namespace  and action name renderDirect
>  DEBUG [org.apache.struts2.portlet.interceptor.PortletStateInterceptor] -
>  Restoring value stack from event phase
>  DEBUG [org.apache.struts2.portlet.interceptor.PortletStateInterceptor] -
>  Restored stack
>  DEBUG [com.opensymphony.xwork2.interceptor.I18nInterceptor] - intercept
>  '/renderDirect' {
>  DEBUG [com.opensymphony.xwork2.interceptor.I18nInterceptor] -
>  requested_locale=null
>  *
>  The interceptor looks like this:*
>  public String intercept(ActionInvocation invocation) throws Exception {
> HttpServletRequest request = ServletActionContext.getRequest();
> String result = null;
> try {
> logger.debug("Invoking action, looking for exceptions.");
> result = invocation.invoke();
> logger.debug("result = " + result);
> logger.debug("No exceptions caught");
> } catch (Exception ex) {
> logger.debug("Exceptions caught");
> ex.printStackTrace();
> ..
> }
> return result;
>  }
>

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



Re: Text formatting

2008-04-16 Thread Dave Newton
--- "Hartrich, James CTR USTRANSCOM J6" wrote:
> Has anyone successfully formatted a number 555 into 555-.
> 
> MyAction.properties:  format.telephone={0,number,###-}
>   
> My.jsp:   
>   
>   
>   
> 
> The only output rendered to the jsp page after numerous attempts is the
> string "format.telephone".

I'm not aware that you can format numbers like that. AFAIK the number
formatting follows the decimal formatting Java rules [1] where things like
the "-" character refer to the default negative number prefix.

Phone numbers aren't numbers (add two together?!), they're strings. Or should
be; if they're not you may want to reconsider.

Dave

[1] http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html


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



Re: Validation of Struts XML files

2008-04-16 Thread Dave Newton
Does it work if you use the DTD it says to use?

http://struts.apache.org/dtds/struts-config_1_3.dtd";>

Dave

--- Adam Gordon <[EMAIL PROTECTED]> wrote:

> Last night, our company had a maintenance window whereby Internet access 
> was shut off from our office to the outside world.  During that time I 
> was doing development and attempted to start up our web app in a 
> development environment.
> 
> I've not seen this error in almost 2 years but it's apparently back:
> 
> [org.apache.struts.action.ActionServlet] [handleConfigException] Parsing 
> error processing resource path /WEB-INF/struts-optout.xml
> java.net.UnknownHostException: jakarta.apache.org
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
> at java.net.Socket.connect(Socket.java:520)
> at java.net.Socket.connect(Socket.java:470)
> at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
> ...*snip*...
> 
> I remember this well.  The problem is that struts-optout.xml has the 
> DOCTYPE of:
> 
>"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd";>
> 
> But, the struts-config_1_3.dtd is not in the struts.jar file (we're 
> using Struts 1.2.9) so, apparently in order to validate that the XML 
> file is well-formed at webapp start up time, Tomcat feels the need to go 
> out and retrieve this DTD - only it can't because Internet access was 
> down.  The problem is greatly exacerbated by the fact that Tomcat stops 
> processing the loading of struts modules when this one fails essentially 
> rendering the web app useless.
> 
> I seem to recall playing with turning validation of XML files off, but 
> that not being a sufficient solution so I tried adding the DTD into the 
> struts JAR file in the same location as the other DTDs:  
> org/apache/struts/resources/struts-config_1_x.dtd (where x=0,1,2) but 
> that didn't work.
> 
> We need to be able to find a solution to where we can host the DTDs 
> locally and do not have to rely on a 3rd party server being up in order 
> to deploy our web application.  I seem to recall this being an issue 
> with the W3C (especally w.r.t. [X]HTML validation in that it results in 
> a ton of unnecessary network calls to retrieve DTDs for validation 
> rather than web servers hosting the DTDs locally.
> 
> I'm sure I'm not the only one to have seen this so any help to resolve 
> this would be greatly appreciated.  Thanks.
> 
> -- adam
> 
> -
> 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]



datetimepicker on 2.1.1-SNAPSHOT

2008-04-16 Thread Décio Heinzelmann Luckow
Hi all,

I was testing an master-detail screen with 

When I update the struts version to 2.1.1 a give this message:

java.lang.NoClassDefFoundError:
org/apache/struts2/views/jsp/ui/DateTimePickerTag
at org.apache.jsp.cre_jsp._jspx_meth_s_005fdatetimepicker_005f0(*
cre_jsp.java:466*)
at org.apache.jsp.cre_jsp._jspx_meth_s_005fiterator_005f0(*cre_jsp.java:329*
)
at org.apache.jsp.cre_jsp._jspx_meth_s_005fform_005f0(*cre_jsp.java:206*)
at org.apache.jsp.cre_jsp._jspService(*cre_jsp.java:105*)
at org.apache.jasper.runtime.HttpJspBase.service(*HttpJspBase.java:70*)

I search this class tag at package struts2-core and don´t find it.

The ajax tags was moved to another package or plugin?
Is there an release notes to 2.1.1?


Text formatting

2008-04-16 Thread Hartrich, James CTR USTRANSCOM J6
Struts2.0.9
Has anyone successfully formatted a number 555 into 555-.


MyAction.properties:  format.telephone={0,number,###-}

My.jsp: 




The only output rendered to the jsp page after numerous attempts is the
string "format.telephone".

Thanks
James


smime.p7s
Description: S/MIME cryptographic signature


Validation of Struts XML files

2008-04-16 Thread Adam Gordon
Last night, our company had a maintenance window whereby Internet access 
was shut off from our office to the outside world.  During that time I 
was doing development and attempted to start up our web app in a 
development environment.


I've not seen this error in almost 2 years but it's apparently back:

[org.apache.struts.action.ActionServlet] [handleConfigException] Parsing 
error processing resource path /WEB-INF/struts-optout.xml

java.net.UnknownHostException: jakarta.apache.org
   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
   at java.net.Socket.connect(Socket.java:520)
   at java.net.Socket.connect(Socket.java:470)
   at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
   ...*snip*...

I remember this well.  The problem is that struts-optout.xml has the 
DOCTYPE of:


http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd";>

But, the struts-config_1_3.dtd is not in the struts.jar file (we're 
using Struts 1.2.9) so, apparently in order to validate that the XML 
file is well-formed at webapp start up time, Tomcat feels the need to go 
out and retrieve this DTD - only it can't because Internet access was 
down.  The problem is greatly exacerbated by the fact that Tomcat stops 
processing the loading of struts modules when this one fails essentially 
rendering the web app useless.


I seem to recall playing with turning validation of XML files off, but 
that not being a sufficient solution so I tried adding the DTD into the 
struts JAR file in the same location as the other DTDs:  
org/apache/struts/resources/struts-config_1_x.dtd (where x=0,1,2) but 
that didn't work.


We need to be able to find a solution to where we can host the DTDs 
locally and do not have to rely on a 3rd party server being up in order 
to deploy our web application.  I seem to recall this being an issue 
with the W3C (especally w.r.t. [X]HTML validation in that it results in 
a ton of unnecessary network calls to retrieve DTDs for validation 
rather than web servers hosting the DTDs locally.


I'm sure I'm not the only one to have seen this so any help to resolve 
this would be greatly appreciated.  Thanks.


-- adam

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



Re: dinamically parameters

2008-04-16 Thread Antonio Petrelli
Please write in English. This is an English speaking mailing list.

Antonio

2008/4/16, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> Sto facendo un motore di ricerca di news.
> Inizialmente ho una pagina html che mostra le news piu aggiornate e fino
> qui nessun problema.
> Il fatto è che per ogni news mostrata ho un link del tipo "altre n news
> simili" dove si accede alle notizie simili per quella particolare news.
>
> Visto che io ho già calcolato allo scatenarsi della action di "accesso"
> tali cluster per ogni news vorrei che una volta che venga cliccato il link
> si scateni un azione a cui passo il giusto oggetto di tipo lista.
> Naturalmente non posso definire azioni con parametri in struts.xml perchè
> i parametri li conosco solo a run time quindi vorrei un passaggio di
> paramtri dinamico.
>
> Io ho provato a definire il link come segue:
>
> 
> 
> 
> Altre: 
> News simili
>
> dove similarNews risulta essere una lista di news sia per il bean
> sottostante alla news di accesso sia per la classe relativa alla action che
> dovrà mostrare le news simili.
>
> Grazie mille
>
>
> Daniele
>
>
>
> -- Initial Header ---
>
> From  : "Antonio Petrelli" [EMAIL PROTECTED]
>
> To  : "Struts Users Mailing List" user@struts.apache.org
> Cc  :
> Date  : Wed, 16 Apr 2008 16:43:40 +0200
> Subject : Re: dinamically parameters
>
>
>
>
>
>
>
>
> > 2008/4/16, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > > I have an Object List of objects News and when a user click on a link
> of the interfece i have to pass this parameter to the correspondent action.
> > >  But this parameter is setted only at run time, so i have to pass it
> dinamically.
> > >
> > >  Can I pass an Object list to an other action???
> > >  How I can do It???
> >
> > How is this list rendered?
> >
> > Antonio
> >
>
> > -
> > 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: dinamically parameters

2008-04-16 Thread [EMAIL PROTECTED]
Sto facendo un motore di ricerca di news.
Inizialmente ho una pagina html che mostra le news piu aggiornate e fino qui 
nessun problema.
Il fatto è che per ogni news mostrata ho un link del tipo "altre n news simili" 
dove si accede alle notizie simili per quella particolare news.

Visto che io ho già calcolato allo scatenarsi della action di "accesso" tali 
cluster per ogni news vorrei che una volta che venga cliccato il link si 
scateni un azione a cui passo il giusto oggetto di tipo lista.
Naturalmente non posso definire azioni con parametri in struts.xml perchè i 
parametri li conosco solo a run time quindi vorrei un passaggio di paramtri 
dinamico.

Io ho provato a definire il link come segue:




Altre:  News 
simili

dove similarNews risulta essere una lista di news sia per il bean sottostante 
alla news di accesso sia per la classe relativa alla action che dovrà mostrare 
le news simili.

Grazie mille

Daniele



-- Initial Header ---

>From  : "Antonio Petrelli" [EMAIL PROTECTED]
To  : "Struts Users Mailing List" user@struts.apache.org
Cc  :
Date  : Wed, 16 Apr 2008 16:43:40 +0200
Subject : Re: dinamically parameters







> 2008/4/16, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > I have an Object List of objects News and when a user click on a link of 
> > the interfece i have to pass this parameter to the correspondent action.
> >  But this parameter is setted only at run time, so i have to pass it 
> > dinamically.
> >
> >  Can I pass an Object list to an other action???
> >  How I can do It???
>
> How is this list rendered?
>
> Antonio
>
> -
> 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: dinamically parameters

2008-04-16 Thread Antonio Petrelli
2008/4/16, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> I have an Object List of objects News and when a user click on a link of the 
> interfece i have to pass this parameter to the correspondent action.
>  But this parameter is setted only at run time, so i have to pass it 
> dinamically.
>
>  Can I pass an Object list to an other action???
>  How I can do It???

How is this list rendered?

Antonio

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



Re:

2008-04-16 Thread JRD

I can't use ${x} because I am not always looking for x.

The basics of what I am doing is building a tile that will print out any
property in my action/form.

So I have some JSP #1 that says







...

And for each definition it inserts JSP #2 that looks like...




I just can't figure out how to write that property tag.  I need it to show
the value of the property passed in.  As I said if I could use runtime
expressions I could just write 

So I can't use the:

Or use  with either the "bare" JSP
2.0+ notation or via .

It would work if I knew to write in 'x' for the currentProperty, but since I
have to evaluate property to get x it doesn't work.

Any other thoughts? Thanks,
Jonathan


newton.dave wrote:
> 
> --- JRD <[EMAIL PROTECTED]> wrote:
>>  I have a .JSP where I want to write out the values of them dynamically.
>>  
>> 
>> 
>> 
>> How do I write a  using currentProperty that would
>> result it showing my actions value (1).
>> 
>> If I were using runtime expressions I would write it like
>> 
>> but that is verboten by the tld.
> 
> Why wouldn't you just use ${x} (in a JSP 2.0+ container) or  value="x"/>?
> 
> If you're dead-set on using the "currentProperty" thing use
> ${currentProperty} or . 
> 
> Or use  with either the "bare"
> JSP
> 2.0+ notation or via .
> 
> Dave
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%3Cs%3Aproperty-with-dynamic-values-tp16711862p16722511.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]



Re: Problem with Select tag

2008-04-16 Thread Milan Milanovic
Yes, I understand. But if you read my post, EVERYTHING works fine, but when I 
add namespace to package
in struts.xml (and in 





/pages/administration/list.jsp
/pages/administration/list.jsp



...


UserAction.java:
--
public class UserAction extends ActionSupport implements Preparable {
 /**
  *
  */
 private static final long serialVersionUID = 7654885094460681178L;
 private UserService service;
 private List users;
 private User user;
 private String username;
 private String [] allRoles;
 public UserAction(UserService service) {
  this.service = service;
 }
  public String execute() {
   users = service.findAllUsers();
   allRoles = service.getAllRoles(); <- this method works fine, it return an 
array of roles
 
 user = new User();
 return Action.SUCCESS;
 }
 
 public String save() {
  service.save(user);
 
  return execute();
 }
 
 public void prepare() throws Exception {
  if (username != null)
   if (!username.equals(""))
user = servis.findUserByUsername(username);
 }
 
 public void setAllRoles(String [] allRoles) {
  this.allRoles = allRoles;
 }
 
 public String [] getAllRoles() {
  return allRoles;
 }
 
 // Other getters/setters
}

users.jsp:
--

...

 
 
 
 

...


--
Thx in advance, Milan Milanovic

- Original Message 
From: Michael Gagnon <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Wednesday, April 16, 2008 3:38:38 PM
Subject: RE: Problem with Select tag

Can you show your struts xml, calling java action, and resulting jsp code?
I've noticed error messages like that whenever ANYTHING was wrong on a page
with a select box -- completely independent of anything to do with the
select box. So I think whatever you changed MAY have broken something else
and the message may be misleading you.

-Original Message-
From: Milan Milanovic [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 16, 2008 9:28 AM
To: Struts Users Mailing List
Subject: Re: Problem with Select tag

Nobody has an answer to this simple question ? 

As I asked, there is with select's tag "list" attribute, when namespace is
added to the package and to the form tag. It doesn't recognize given array
from the action class anymore. Do I miss something or this is a serious
error in Struts 2 ?

--
Thanks, Milan Milanovic



- Original Message 
From: Milan Milanovic <[EMAIL PROTECTED]>
To: user@struts.apache.org
Sent: Tuesday, April 15, 2008 11:21:37 PM
Subject: Problem with Select tag

Hi,

I'm using Struts 2.0.11.1, and I have wierd problem with select UI tag. It
works perfectly, but
when I added namespace to the package in struts.xml, which is used in form
where this select tag
is located, I get an error:

"tag 'select', field 'list', id 'roles', name 'user.roles': The requested
list key 'allRoles' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unkown location]"

I should note that I've added this namespace to the form tag too, where
select tag is located. 

How can I solve this problem ? It seems when namespace is added to package,
select's list attribute doesn't recognize correct value stack anymore.

___
Thanks in advance, Milan Milanovic








Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ





Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



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


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

RE: ServletRedirectActionResult - is there a way to set parameters?

2008-04-16 Thread Brad A Cupit
>  I need to tag along a request paramter. So my annotation looks
>  like this:
>
>  @Result(name="enterNewContactInfo",value="enterNewContactInfo",
>  type=ServletActionRedirectResult.class,params={"country","AUT"})
>
>  I get a nasty NPE if I add the params. If I remove it everything
works fine.

It's a known issue which has been fixed in Struts 2.1:
https://issues.apache.org/struts/browse/WW-2170
As you mentioned, putting the results in struts.xml will fix it, or as a
workaround you can use
@Result(type=ServletRedirectResult.class,
value="/actionName.action?param1=value1")

> Another question is how do I set the parameter dynamically ? If I  
> recall correctly WW had a special syntax for it. Something like  
> params={"country","%{country}"}, but with no annotations for  
> course.Any way to do this in S2?

This can be done in xml or with annotations. For ServletRedirectResult,
using the above example:

@Result(type=ServletRedirectResult.class,
value="/actionName.action?param1=${value1}")

will evaluate 'value1' as an OGNL expression

and for ServletActionRedirectResult (once Struts 2.1 gets released or
WW-2170 is backported to 2.0.x), I believe the following would work.

@Result(type= ServletActionRedirectResult.class, value="actionName",
params={"param1","${value1}"})

The big advantage of ServletActionRedirectResult over
ServletRedirectResult is that it automatically URL-encodes the
parameters.

> I am having way too many problems with this zero config/codebehind.
> Technically the codebehind plugin is listed as 'experimental' on the
wiki.
> The convention plugin (only for Struts 2.1) look incredible.

Having said all of that, I've been able to get the zero
config/codebehind working and (in Spring 2.5) component scanned Spring
beans so that newly written Actions and DAOs require few annotations and
no xml configuration. What other kind of problems have you had?

Brad Cupit
Louisiana State University - UIS


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



dinamically parameters

2008-04-16 Thread [EMAIL PROTECTED]
I have an Object List of objects News and when a user click on a link of the 
interfece i have to pass this parameter to the correspondent action.
But this parameter is setted only at run time, so i have to pass it dinamically.

Can I pass an Object list to an other action???
How I can do It???

I'm not very expert in struts 2.0.11


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



Re: Advantage of prepare()?

2008-04-16 Thread Dave Newton
--- Michael Gagnon <[EMAIL PROTECTED]> wrote:
> I've been working with struts2 for about 2 months and so far I've been
> using the preparable interface to populate any data the resulting page 
> wants to display. I've used the execute method to do non-visible work 
> and determine a result (which controls flow).
> 
> I'm wondering if this is the intended pattern.

AFAIK, yes. Not sure what else it would be used for.

>  If so (and even if not), why?

It moves initialization code from the mainline code and provides a uniform,
deterministic way to run it across an application.

As a counter-example, consider a multi-developer project where each developer
initializes actions in a different way: some embed the code in an action's
execute() method, some call an initialization method in execute(), some use
an interceptor, ad nauseam. Preparable unifies the initialization mechanism.

> The only intended benefit I see to using prepare at all is if you somehow
> want to use one action in two different contexts - one which uses the
> preparable interceptor and one which doesn't.

Don't forget that Preparable isn't just the prepare() method, it's also
prepareXxxx() if you write actions with multiple methods. (Multiple methods
per action class is a cultural decision, and is debated from time to time.)

Consider also an action under unit test: it may not be desirable to call the
Preparable methods during testing, instead initializing the action manually
to allow testing of specific behaviors.

> I see prepare being used in the way I'm using it in many tutorials but I
> haven't found any articles explaining any particular reason why. I'm hoping
> maybe somebody can shed some light on this. should I bother using prepare
> at all? Why?

"Should" implies a level of obligation I'm not comfortable with.

I don't find the use of Preparable to be much of a productivity boost; the
"mainline" code savings are minimal, and it depends on framework knowledge to
understand why and how code using it works. I am ambivalent about its use,
but comfortable with either viewpoint.

Dave


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



Re: Advantage of prepare()?

2008-04-16 Thread Jukka Välimaa
With preparable, you can load the objects you need in prepare() method, and
do whatever specific you want in the actual called method. In CRUD actions,
it is very handy to use prepare and paramsPrepareParams to first load the
stuff you want, and after prepare all the parameters are inserted
automatically. You don't need to change or access the object states
explixitly at all in many cases -- the second params interceptor in the
stack does that for you.

On Wed, Apr 16, 2008 at 4:22 PM, Michael Gagnon <
[EMAIL PROTECTED]> wrote:

> I've been working with struts2 for about 2 months and so far I've been
> using
> the preparable interface to populate any data the resulting page wants to
> display. I've used the execute method to do non-visible work and determine
> a
> result (which controls flow).
>
>
>
> I'm wondering if this is the intended pattern. If so (and even if not),
> why?
> The only intended benefit I see to using prepare at all is if you somehow
> want to use one action in two different contexts - one which uses the
> preparable interceptor and one which doesn't. If this was ever the case,
> I'd
> argue two different actions should exist. If there's some common
> functionality needed it should be in a superclass and the subclasses
> should
> call into it in the execute method. So given the only appropriate scenario
> I
> can think of off the top of my head, its use looks like an anti-pattern to
> me.
>
>
>
>
>
> I see prepare being used in the way I'm using it in many tutorials but I
> haven't found any articles explaining any particular reason why. I'm
> hoping
> maybe somebody can shed some light on this. should I bother using prepare
> at
> all? Why?
>
>


RE: Problem with Select tag

2008-04-16 Thread Michael Gagnon
Can you show your struts xml, calling java action, and resulting jsp code?
I've noticed error messages like that whenever ANYTHING was wrong on a page
with a select box -- completely independent of anything to do with the
select box. So I think whatever you changed MAY have broken something else
and the message may be misleading you.

-Original Message-
From: Milan Milanovic [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 16, 2008 9:28 AM
To: Struts Users Mailing List
Subject: Re: Problem with Select tag

Nobody has an answer to this simple question ? 

As I asked, there is with select's tag "list" attribute, when namespace is
added to the package and to the form tag. It doesn't recognize given array
from the action class anymore. Do I miss something or this is a serious
error in Struts 2 ?

--
Thanks, Milan Milanovic



- Original Message 
From: Milan Milanovic <[EMAIL PROTECTED]>
To: user@struts.apache.org
Sent: Tuesday, April 15, 2008 11:21:37 PM
Subject: Problem with Select tag

Hi,

I'm using Struts 2.0.11.1, and I have wierd problem with select UI tag. It
works perfectly, but
when I added namespace to the package in struts.xml, which is used in form
where this select tag
is located, I get an error:

"tag 'select', field 'list', id 'roles', name 'user.roles': The requested
list key 'allRoles' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unkown location]"

I should note that I've added this namespace to the form tag too, where
select tag is located. 

How can I solve this problem ? It seems when namespace is added to package,
select's list attribute doesn't recognize correct value stack anymore.

___
Thanks in advance, Milan Milanovic





 


Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


 


Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



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



Re: Problem with Select tag

2008-04-16 Thread Milan Milanovic
Nobody has an answer to this simple question ? 

As I asked, there is with select's tag "list" attribute, when namespace is 
added to the package and to the form tag. It doesn't recognize given array from 
the action class anymore. Do I miss something or this is a serious error in 
Struts 2 ?

--
Thanks, Milan Milanovic



- Original Message 
From: Milan Milanovic <[EMAIL PROTECTED]>
To: user@struts.apache.org
Sent: Tuesday, April 15, 2008 11:21:37 PM
Subject: Problem with Select tag

Hi,

I'm using Struts 2.0.11.1, and I have wierd problem with select UI tag. It 
works perfectly, but
when I added namespace to the package in struts.xml, which is used in form 
where this select tag
is located, I get an error:

"tag 'select', field 'list', id 'roles', name 'user.roles': The requested list 
key 'allRoles' could not be resolved as a 
collection/array/map/enumeration/iterator type. Example: people or 
people.{name} - [unkown location]"

I should note that I've added this namespace to the form tag too, where select 
tag is located. 

How can I solve this problem ? It seems when namespace is added to package, 
select's list attribute doesn't recognize correct value stack anymore.

___
Thanks in advance, Milan Milanovic





  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Advantage of prepare()?

2008-04-16 Thread Michael Gagnon
I've been working with struts2 for about 2 months and so far I've been using
the preparable interface to populate any data the resulting page wants to
display. I've used the execute method to do non-visible work and determine a
result (which controls flow).

 

I'm wondering if this is the intended pattern. If so (and even if not), why?
The only intended benefit I see to using prepare at all is if you somehow
want to use one action in two different contexts - one which uses the
preparable interceptor and one which doesn't. If this was ever the case, I'd
argue two different actions should exist. If there's some common
functionality needed it should be in a superclass and the subclasses should
call into it in the execute method. So given the only appropriate scenario I
can think of off the top of my head, its use looks like an anti-pattern to
me.

 

 

I see prepare being used in the way I'm using it in many tutorials but I
haven't found any articles explaining any particular reason why. I'm hoping
maybe somebody can shed some light on this. should I bother using prepare at
all? Why?



Re: tiles problem

2008-04-16 Thread Antonio Petrelli
2008/4/16, Chris Pat <[EMAIL PROTECTED]>:
>
> In 5.0.28 it says the action is not available and the only difference is
> that it is not loading that Factory.  It must something subtle but
> deterministic.  Any ideas what could be different?  I have looked and they
> seem identical in server.xml and web.xml.  Could it be an extra
> library?  But obviously it is in the struts library and it is being loaded.



Mmm... It could be the XML parser... do you receive some exception at
startup of the web application?

Antonio


Re: tiles problem

2008-04-16 Thread Chris Pat
Hi Antonio
Thanks, however it is very consistent.  In 5.0.28 it says the action is not 
available and the only difference is that it is not loading that Factory.  It 
must something subtle but deterministic.  Any ideas what could be different?  I 
have looked and they seem identical in server.xml and web.xml.  Could it be an 
extra library?  But obviously it is in the struts library and it is being 
loaded.  tia

Antonio Petrelli <[EMAIL PROTECTED]> wrote: 2008/4/16, Chris Pat :
>
> I two different deployment of Tomcat with an app that work fine in 5.0.27
> but fails in 5.0.28.  Looking at the startup the only difference I can see
> this time is that the 5.0.27 loads this:
> org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
>
> and the 5.0.28 does not.  Is there a way of making the startup of 5.0.28
> equivalent to 5.0.27?



I think that there are no substantial differences between 5.0.27 and
5.0.28.So may I see how you configure Tiles in your environment?


Is it just copy over the web.xml?



In general it is just a copy of the complete WAR.

Antonio



Re: tiles problem

2008-04-16 Thread Antonio Petrelli
2008/4/16, Chris Pat <[EMAIL PROTECTED]>:
>
> I two different deployment of Tomcat with an app that work fine in 5.0.27
> but fails in 5.0.28.  Looking at the startup the only difference I can see
> this time is that the 5.0.27 loads this:
> org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
>
> and the 5.0.28 does not.  Is there a way of making the startup of 5.0.28
> equivalent to 5.0.27?



I think that there are no substantial differences between 5.0.27 and
5.0.28.So may I see how you configure Tiles in your environment?


Is it just copy over the web.xml?



In general it is just a copy of the complete WAR.

Antonio


tiles problem

2008-04-16 Thread Chris Pat
Hello
I two different deployment of Tomcat with an app that work fine in 5.0.27 but 
fails in 5.0.28.  Looking at the startup the only difference I can see this 
time is that the 5.0.27 loads this:
org.apache.struts.tiles.TilesPlugin initDefinitionsFactory

and the 5.0.28 does not.  Is there a way of making the startup of 5.0.28 
equivalent to 5.0.27?  Is it just copy over the web.xml?  Ideas? tia.


Re: action with dynamic parameter

2008-04-16 Thread Martin Gainty
implement ParameterAware and then call getParameters method to obtain the
map e.g.
Map parameters = this.getParameters();

http://struts.apache.org/2.0.11.1/docs/how-can-we-access-request-parameters-
passed-into-an-action.html
Martin- Original Message -
From: <[EMAIL PROTECTED]>
To: "struts mailing list" 
Sent: Wednesday, April 16, 2008 7:01 AM
Subject: action with dynamic parameter


Hi,

when a link i clicked I would pass a parameter to an Action.This parameter
is an object list, but i can't to define the action with tag 

action with dynamic parameter

2008-04-16 Thread [EMAIL PROTECTED]
Hi,

when a link i clicked I would pass a parameter to an Action.This parameter is 
an object list, but i can't to define the action with tag 

Re: [S2] Selecting value in radio elements

2008-04-16 Thread Lukasz Lenart
Hi,

After some experiments, I found the solution:


N


Just look into riadiomap.ftl template and everything will be clear
(especially for Freemarker developers ;-)


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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



Re: Is it possible to make a pop up window using Struts?

2008-04-16 Thread Antonio Petrelli
2008/4/16, ryan webb <[EMAIL PROTECTED]>:
>
> I am having trouble with it..I created a pop up window using javascript
> and
> i cant pass query string on new window.
> when i clicked a  I pass a paramId and paramProperty and I cant
> make it appear to new window.
>
> I have an action class that has *request.setAttribute("username",
> request.getParameter("username"));*
> on the new window I have *<%=
> out.println(request.getAttribute("username"))
> %>* but this only displays the word NULL



Mmmm I think that you need to start from a tutorial, won't you?
http://struts.apache.org/1.x/userGuide/index.html

With Struts 1 you don't need to read parameters, but use the corresponding
ActionForm.
Moreover you need to understand the lifecycle of a request: when a new
request is created (for example, when a popup page is shown) the request
attributes are cleared.

Antonio


[S2] Selecting value in radio elements

2008-04-16 Thread Ramanathan RV
Hello,



In this list, how do I preselect "No"?

-- 
Thanks
Ram


Re: Is it possible to make a pop up window using Struts?

2008-04-16 Thread ryan webb
Antonio,

>1) What Struts? Struts 1.2.9 (Netbeans bundle)
>2) You can still do it in Javascript. I see.. I just want to know if you do
it with struts.

I am having trouble with it..I created a pop up window using javascript and
i cant pass query string on new window.
when i clicked a  I pass a paramId and paramProperty and I cant
make it appear to new window.

I have an action class that has *request.setAttribute("username",
request.getParameter("username"));*
on the new window I have *<%= out.println(request.getAttribute("username"))
%>* but this only displays the word NULL

I am new to struts..

Ryan

On Wed, Apr 16, 2008 at 4:22 PM, Antonio Petrelli <
[EMAIL PROTECTED]> wrote:

> 2008/4/16, ryan webb <[EMAIL PROTECTED]>:
> >  Is it possible to make a window pop up using struts?
> >  usually this can be done in Javascript..
>
> 1) What Struts?
> 2) You can still do it in Javascript
>
> Antonio
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Is it possible to make a pop up window using Struts?

2008-04-16 Thread Antonio Petrelli
2008/4/16, ryan webb <[EMAIL PROTECTED]>:
>  Is it possible to make a window pop up using struts?
>  usually this can be done in Javascript..

1) What Struts?
2) You can still do it in Javascript

Antonio

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



Trouble executing scripts in returned ajax content

2008-04-16 Thread Jukka Välimaa
Hi everyone,

I'm using Struts 2.1's ajax tags to replace content in a section of my page.
I have this section enclosed in sx:div tags, like so:



..



I change the div content by editing its href with javascript and then
publishing the topic it's listening to:

function reloadContentSection(url){
if(!isAnUrl(url)) return false;

var contentSection = dojo.widget.byId("pageContentSection");
if(contentSection == null) return false;

var origHref = contentSection.href;

contentSection.href = url;

dojo.event.topic.publish('/reloadContentSection', '','');

contentSection.href =origHref;
}

It's working fine otherwise, but I have trouble executing scripts in
returned content. I've experimented with different values of executeScripts
and separateScripts to no effect. I've even tried to include scripts as a
reference to separate javascript library--no better luck there. Even though
scripts I write don't work, a datetimepicker in the same returned content,
done using ajax tags and of course relying on scripts, works perfectly.

When I set separateScripts as false, my scripts are included in generated
DOM source, after some scripts by Matt Cruse, which I assume are directly
related to struts ajax functionality. Of course, being included doesn't mean
that they work.

Right now, I've worked around this problem by including the scripts I need
in the  page I'm calling ajax from, and not in returned content. I don't
think this is good design, and won't work if I need to generate scripts
dynamically.

Can any of you tell me what's wrong, or how to fix it?

Jukka


Is it possible to make a pop up window using Struts?

2008-04-16 Thread ryan webb
Hi,

Is it possible to make a window pop up using struts?
usually this can be done in Javascript..

God bless,
Ryan Webb


Re: ServletRedirectActionResult - is there a way to set parameters?

2008-04-16 Thread Alex Shneyderman
Hmm, it appears that disabling zero config and codebehind and
supplying the struts.xml of the equvalent config works just fine.
I am having way too many problems with this zero config/codebehind.
Nice idea crappy implementation :-(

Alex.

On Wed, Apr 16, 2008 at 8:33 AM, Alex Shneyderman
<[EMAIL PROTECTED]> wrote:
> I am using 2.0.11 it seems that I can not use action-redirect result
>  type. I need to tag along a request paramter. So my annotation looks
>  like this:
>
>  @Result 
> (name="enterNewContactInfo",value="enterNewContactInfo",type=ServletActionRedirectResult.class,params={"country","AUT"})
>
>  I get a nasty NPE if I add the params. If I remove it everything works fine.
>
>  Another question is how do I set the parameter dynamically ? If I
>  recall correctly WW had a special syntax for it. Something like
>  params={"country","%{country}"}, but with no annotations for
>  course.Any way to do this in S2?
>
>  Here is the stack trace:
>
>  HTTP ERROR: 500
>
>  INTERNAL_SERVER_ERROR
>
>  RequestURI=/**/displayContactInfo.do
>  Caused by:
>
>  java.lang.NullPointerException
> at 
> org.apache.struts2.dispatcher.mapper.DefaultActionMapper.getUriFromActionMapping(DefaultActionMapper.java:466)
> at 
> org.apache.struts2.dispatcher.ServletActionRedirectResult.execute(ServletActionRedirectResult.java:184)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
> at **
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
> at **
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
> at 
> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
> at 
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
> at 
> com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
> at 
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
> at 
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
> at 
> com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
> at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
> at 
> org.apache.struts2.interceptor.CheckboxInter

Re: [OT] Scheduled DB clean up service with Spring

2008-04-16 Thread Peter Theissen

Hi,

many thanks to you! I was really making things more complicated
then it was neccessary: Adding the quartz.jar to the runtime classpath
was enough to fix the problem.

Have a nice day
Peter



Hi Peter,

Please try adding the quartz.jar or spring-quartz.jar to your classpath. You 
can check out http://www.springframework.org for the dependencies of the spring 
version you're using.

Pls don't add anymore jars at the moment. Also, I would suggest reverting your 
original classpath settings prior to testing the above, to isolate issues.

Reginald Javier

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 16, 2008 4:10 AM
To: Struts Users Mailing List
Subject: Re: [OT] Scheduled DB clean up service with Spring

Hi all,

sorry to continue with that OT thread, but its starting to get
really mad out here. But first of all, thanks for the hint that
the runtime classpath (rcp) has to be configured independently.
Well, I tried that but it ended up in a mess!

Of course, first thing I did was adding spring.jar to rcp of the
Apache... and I was awating the startup of my Webapp
joyfully. The joy ended quite soon with the following message
below (***)

Then I added servlet-api.jar to the rcp and another exception.
For every exception I got, I added a new (corresponding) jar
file. This ended up in a NullPointerEx. I guess thats because
the order of the jar files is also important.
However, to add those jars to the rcp, I added them in the
Run Dialog under Classpath, first I tried that under "User
Entries" and then under "Bootstrap Entries" in different permutations
and so on and so on. Happy trial and error.
But after some hours I have to admint: that doesnt make sense
any longer.

Can it be so difficult to use load class of the Spring Lib at runttime
and create it as a bean?
 >>>

<<<
If I omit this line, I have no problem to start the app at all!
In that case, my webApp works perfectly with default config:
Bootstrap Entries: JRE System Lib  jre_1.6.0_5
User Entries: bootstrap.jar

How can I find out what the required jar files are to add to the rcp
except Spring.jar and in which order do I have to provide them.
Which of them have to be in "Bootstrap Entries" and which one in
"User Entries"?

Could anybody point me to the rigth direction, please?
I have lost the rigth path ;-)

Thanks and best regards
Peter

PS: sorry if my question is not formulated professional,
Im quite new to all that JavaWebFramework stuff.

 >>>  (***)
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1275)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3786)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException:
javax.servlet.ServletContextListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unk