Re: S2: validation notation on DATE (object that has a Date field)

2008-06-23 Thread Lukasz Lenart
Hi,

> This also works on my end *BUT* the Date in part of an Object (not a field)

Could you show your configuration?


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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



Re: validation and action names with slashes

2008-06-23 Thread Jeromy Evans

Roberto Nunnari wrote:

Jeromy Evans wrote:

Roberto Nunnari wrote:

This is what I intend to do.  At the moment the CodeBehind/Convention 
plugin estimates the name of view candidates (eg. 
package-action-result.jsp)
This change would just need to extend that to check if a tile exists 
with that name.


This change will mean that @Result's are only required for the 
exceptional cases (those results that need to break the Tiles naming 
convention).




Yes! That would be great!
Are you going to do the coding yourself?


Yes, it's on my todo list.

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



Simple Theme - Internationalization problem

2008-06-23 Thread Narayana S
Hi,

i am applying simple theme for my struts 2 page, when the theme is
default it could read values from resource bundle, after i changed theme to
simple, it couldn't read the values from the resource bundle.



---


This is how i am creating the form. am i missing any thing? please help me.


Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Laurie Harper
I did what I should have done in the first place and looked it up: 
Form.submit() is specified to *not* call the onsubmit handler, so this 
is the correct behaviour (and should be consistent across all browsers).


When in doubt, check the documentation :-)

L.

cacodemon79 wrote:

Bingo!
Now it works!
Thanks a lot.
However i can't understand why the onsubmit handler is not triggered by the
submit() function!


Laurie Harper wrote:
Did you confirm whether calling the form's submit() method triggers its 
onsubmit handler? It may be that calling submit() bypasses it, in which 
case an explicit guard in your submit function might do the trick:


function submitRegistrazioneUtenteForm(nomeForm){
   var form = ...;
   if (validateRegistrazioneUtenteForm(form)) {
 form.submit();
   }
   return false;
}

L.

cacodemon79 wrote:

No suggestions? :(

I also tried to use
document.registrazioneUtenteForm.submit()")
instead of
eval("document."+nomeForm+".submit()")
but the result is the same. The form is submitted but I can't see any
javascript alerts.

I can't understand where is the problem.

I hope you can help me.

Thanks.



cacodemon79 wrote:

Hi, I'm using Struts Validator Framework (Struts 1.3).
Server-side validation works well.
The problem is in client-side validation.

The form name I have to validate is: RegistrazioneUtenteForm.

In my jsp page I have 2 buttons:
1) 
2) 
and the following form declaration:

Moreover I have enabled javascript validation:


The javascript function submitRegistrazioneUtenteForm is the following:
function submitRegistrazioneUtenteForm(nomeForm){
eval("document."+nomeForm+".submit()");
}

If I click on the second button (html:submit), all works well (I get
javascript alerts).
If I click on the first button (html:link), the form is submitted but I
can't see any javascript alerts.

I can't understand where is the problem.

Can you help me?

Thanks in advance.



-
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: validation notation on DATE (object that has a Date field)

2008-06-23 Thread xianwinwin

This also works on my end *BUT* the Date in part of an Object (not a field) 

so I have Employee empl; 
with Date dob,

thank you




Lukasz Lenart wrote:
> 
>> I did, and it doesn't work, when I click submit, I immediately get a red
>> message next to the required fields...but not next to the date.
> 
> That strange, I made a test and it works, I've annotated at setter level
> 
> @RequiredFieldValidator(message = "Date is required")
> public Date getToday() {
> return today;
> }
> 
> public void setToday(Date today) {
> this.today = today;
> }
> 
> 
> 
> 
> 
> Regards
> -- 
> Lukasz
> http://www.lenart.org.pl/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/S2%3A-validation-notation-on-DATE-%28object-that-has-a-Date-field%29-tp17995565p18080445.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: Struts2 Jar on JBoss

2008-06-23 Thread Musachy Barroso
Yes, that's what I meant, but not what I said, that happens when there
is too much multitasking going on :)

musachy

On Mon, Jun 23, 2008 at 5:47 PM, Hernandez, David
<[EMAIL PROTECTED]> wrote:
> That's not the case. If the jar isn't present then the deployment fails upon 
> reading struts.xml because the FilterDispatcher cannot be found. The classes 
> are being loaded from the jar however it's not looking in the jar for the TLD.
> Regards,
> --Original Message--
> From: Musachy Barroso
> To: Struts Users Mailing List
> ReplyTo: Struts Users Mailing List
> Sent: Jun 23, 2008 5:32 PM
> Subject: Re: Struts2 Jar on JBoss
>
> The taglib is in core, so somehow it is not finding struts-core jar.
>
> musachy
>
> On Mon, Jun 23, 2008 at 5:15 PM, Hernandez, David
> <[EMAIL PROTECTED]> wrote:
>> Hey Guys,
>>
>> I'm trying to deploy several apps built with Struts2 that share a common
>> lib directory. I'm running on JBoss. If I put all the jar's in the
>> server lib directory everything compiles and deploys fine. If I go to an
>> action it is executed, but when it attempts to read the jsp it fails to
>> find the struts tld. See an excerpt from my log below:
>>
>> 
>> 2008-06-23 17:12:49,085 DEBUG
>> [com.opensymphony.xwork2.util.InstantiatingNullHandler] Entering
>> nullPropertyValue
>> [EMAIL PROTECTED]
>> 99d, [EMAIL PROTECTED], property=org]
>> 2008-06-23 17:12:49,280 DEBUG
>> [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
>> file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jsf-libs/jsf-i
>> mpl.jar
>> 2008-06-23 17:12:49,420 DEBUG
>> [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
>> file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jstl.jar
>> 2008-06-23 17:12:49,513 ERROR
>> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CO2/Da
>> ilyCheckout].[jsp]] Servlet.service() for servlet jsp threw exception
>> org.apache.jasper.JasperException: File "/struts-tags" not found
>>at
>> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
>
> --Original Message Truncated--
>
> David Hernandez
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> - - - - -
>
> This message is intended only for the personal and confidential use of the 
> designated recipient(s) named above.  If you are not the intended recipient 
> of this message you are hereby notified that any review, dissemination, 
> distribution or copying of this message is strictly prohibited.  This 
> communication is for information purposes only and should not be regarded as 
> an offer to sell or as a solicitation of an offer to buy any financial 
> product, an official confirmation of any transaction, or as an official 
> statement of Lehman Brothers.  Email transmission cannot be guaranteed to be 
> secure or error-free.  Therefore, we do not represent that this information 
> is complete or accurate and it should not be relied upon as such.  All 
> information is subject to change without notice.
>
>
> 
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within 
> this communication (including any attachments) is not intended or written to 
> be used and cannot be used for the purpose of (i) avoiding U.S. tax related 
> penalties or (ii) promoting, marketing or recommending to another party any 
> transaction or matter addressed herein.
>



-- 
"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: Struts2 Jar on JBoss

2008-06-23 Thread Hernandez, David
That's not the case. If the jar isn't present then the deployment fails upon 
reading struts.xml because the FilterDispatcher cannot be found. The classes 
are being loaded from the jar however it's not looking in the jar for the TLD. 
Regards,
--Original Message--
From: Musachy Barroso
To: Struts Users Mailing List
ReplyTo: Struts Users Mailing List
Sent: Jun 23, 2008 5:32 PM
Subject: Re: Struts2 Jar on JBoss

The taglib is in core, so somehow it is not finding struts-core jar.

musachy

On Mon, Jun 23, 2008 at 5:15 PM, Hernandez, David
<[EMAIL PROTECTED]> wrote:
> Hey Guys,
>
> I'm trying to deploy several apps built with Struts2 that share a common
> lib directory. I'm running on JBoss. If I put all the jar's in the
> server lib directory everything compiles and deploys fine. If I go to an
> action it is executed, but when it attempts to read the jsp it fails to
> find the struts tld. See an excerpt from my log below:
>
> 
> 2008-06-23 17:12:49,085 DEBUG
> [com.opensymphony.xwork2.util.InstantiatingNullHandler] Entering
> nullPropertyValue
> [EMAIL PROTECTED]
> 99d, [EMAIL PROTECTED], property=org]
> 2008-06-23 17:12:49,280 DEBUG
> [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
> file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jsf-libs/jsf-i
> mpl.jar
> 2008-06-23 17:12:49,420 DEBUG
> [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
> file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jstl.jar
> 2008-06-23 17:12:49,513 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CO2/Da
> ilyCheckout].[jsp]] Servlet.service() for servlet jsp threw exception
> org.apache.jasper.JasperException: File "/struts-tags" not found
>at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand

--Original Message Truncated--

David Hernandez

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.



IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this 
communication (including any attachments) is not intended or written to be used 
and cannot be used for the purpose of (i) avoiding U.S. tax related penalties 
or (ii) promoting, marketing or recommending to another party any transaction 
or matter addressed herein.


Re: Struts2 Jar on JBoss

2008-06-23 Thread Musachy Barroso
The taglib is in core, so somehow it is not finding struts-core jar.

musachy

On Mon, Jun 23, 2008 at 5:15 PM, Hernandez, David
<[EMAIL PROTECTED]> wrote:
> Hey Guys,
>
> I'm trying to deploy several apps built with Struts2 that share a common
> lib directory. I'm running on JBoss. If I put all the jar's in the
> server lib directory everything compiles and deploys fine. If I go to an
> action it is executed, but when it attempts to read the jsp it fails to
> find the struts tld. See an excerpt from my log below:
>
> 
> 2008-06-23 17:12:49,085 DEBUG
> [com.opensymphony.xwork2.util.InstantiatingNullHandler] Entering
> nullPropertyValue
> [EMAIL PROTECTED]
> 99d, [EMAIL PROTECTED], property=org]
> 2008-06-23 17:12:49,280 DEBUG
> [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
> file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jsf-libs/jsf-i
> mpl.jar
> 2008-06-23 17:12:49,420 DEBUG
> [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
> file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jstl.jar
> 2008-06-23 17:12:49,513 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CO2/Da
> ilyCheckout].[jsp]] Servlet.service() for servlet jsp threw exception
> org.apache.jasper.JasperException: File "/struts-tags" not found
>at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
> ler.java:51)
> 
>
> Any Help/Advice would be appreciated.
>
> Thanks,
> David Hernandez
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> - - - - -
>
> This message is intended only for the personal and confidential use of the 
> designated recipient(s) named above.  If you are not the intended recipient 
> of this message you are hereby notified that any review, dissemination, 
> distribution or copying of this message is strictly prohibited.  This 
> communication is for information purposes only and should not be regarded as 
> an offer to sell or as a solicitation of an offer to buy any financial 
> product, an official confirmation of any transaction, or as an official 
> statement of Lehman Brothers.  Email transmission cannot be guaranteed to be 
> secure or error-free.  Therefore, we do not represent that this information 
> is complete or accurate and it should not be relied upon as such.  All 
> information is subject to change without notice.
>
> 
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within 
> this communication (including any attachments) is not intended or written to 
> be used and cannot be used for the purpose of (i) avoiding U.S. tax related 
> penalties or (ii) promoting, marketing or recommending to another party any 
> transaction or matter addressed herein.
>
> -
> 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]



Struts2 Jar on JBoss

2008-06-23 Thread Hernandez, David
Hey Guys,

I'm trying to deploy several apps built with Struts2 that share a common
lib directory. I'm running on JBoss. If I put all the jar's in the
server lib directory everything compiles and deploys fine. If I go to an
action it is executed, but when it attempts to read the jsp it fails to
find the struts tld. See an excerpt from my log below:


2008-06-23 17:12:49,085 DEBUG
[com.opensymphony.xwork2.util.InstantiatingNullHandler] Entering
nullPropertyValue
[EMAIL PROTECTED]
99d, [EMAIL PROTECTED], property=org]
2008-06-23 17:12:49,280 DEBUG
[org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jsf-libs/jsf-i
mpl.jar
2008-06-23 17:12:49,420 DEBUG
[org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jstl.jar
2008-06-23 17:12:49,513 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CO2/Da
ilyCheckout].[jsp]] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: File "/struts-tags" not found
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:51)


Any Help/Advice would be appreciated.

Thanks,
David Hernandez

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.


IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this 
communication (including any attachments) is not intended or written to be used 
and cannot be used for the purpose of (i) avoiding U.S. tax related penalties 
or (ii) promoting, marketing or recommending to another party any transaction 
or matter addressed herein.

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



Re: validation and action names with slashes

2008-06-23 Thread Roberto Nunnari

Jeromy Evans wrote:

Roberto Nunnari wrote:



Maybe the convention plugin should look into the tiles.xml
file, or check to see if the tiles plugin or tiles listener
are in the game..
Most probably, the definition names in tiles.xml should
follow the conventions, so that


This is what I intend to do.  At the moment the CodeBehind/Convention 
plugin estimates the name of view candidates (eg. 
package-action-result.jsp)
This change would just need to extend that to check if a tile exists 
with that name.


This change will mean that @Result's are only required for the 
exceptional cases (those results that need to break the Tiles naming 
convention).




Yes! That would be great!
Are you going to do the coding yourself?


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



Grabbing the "current" Result

2008-06-23 Thread Asleson, Ryan
 
Hello,
 
Is there a way to grab the current Result object after an Action method
has been executed?  
 
I want to write an PreResultListener that checks the current Result and
performs actions based on the Result.  I see that the ActionInvocation
that's passed into the beforeResult method has a getResult() method, but
when I tried this, the result of the getResult() method is null.
 
Is there any way to get a reference to the current Result that is about
to be executed?
 
Thank you!!
 
-Ryan
 
 

This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Lukasz Lenart
Hi,

2008/6/23 cacodemon79 <[EMAIL PROTECTED]>:
>
> Bingo!
> Now it works!
> Thanks a lot.
> However i can't understand why the onsubmit handler is not triggered by the
> submit() function!
>

Maybe it depends on Web Browser, did you try with others?


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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



Re: [S2] attempts to access www.opensymphony.com on Struts startup???

2008-06-23 Thread Pierre Thibaudeau
Thank you, Dave!
I had no problem checking out the source.  Now whether I'll have time to
delve into its depths to unlock this mysterious online-connect-on-startup is
another matter...

2008/6/23 Dave Newton <[EMAIL PROTECTED]>:

> --- On Mon, 6/23/08, Dave Newton <[EMAIL PROTECTED]> wrote:
> > http://opensymphony.com/xwork/
> >
> > See the "source repository" link.
>
> (Having said that, of course, I'm not able to check out the source from
> there. I was on Saturday, IIRC.)
>


Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread cacodemon79

Bingo!
Now it works!
Thanks a lot.
However i can't understand why the onsubmit handler is not triggered by the
submit() function!


Laurie Harper wrote:
> 
> Did you confirm whether calling the form's submit() method triggers its 
> onsubmit handler? It may be that calling submit() bypasses it, in which 
> case an explicit guard in your submit function might do the trick:
> 
> function submitRegistrazioneUtenteForm(nomeForm){
>var form = ...;
>if (validateRegistrazioneUtenteForm(form)) {
>  form.submit();
>}
>return false;
> }
> 
> L.
> 
> cacodemon79 wrote:
>> No suggestions? :(
>> 
>> I also tried to use
>> document.registrazioneUtenteForm.submit()")
>> instead of
>> eval("document."+nomeForm+".submit()")
>> but the result is the same. The form is submitted but I can't see any
>> javascript alerts.
>> 
>> I can't understand where is the problem.
>> 
>> I hope you can help me.
>> 
>> Thanks.
>> 
>> 
>> 
>> cacodemon79 wrote:
>>> Hi, I'm using Struts Validator Framework (Struts 1.3).
>>> Server-side validation works well.
>>> The problem is in client-side validation.
>>>
>>> The form name I have to validate is: RegistrazioneUtenteForm.
>>>
>>> In my jsp page I have 2 buttons:
>>> 1) >> href="javascript:submitRegistrazioneUtenteForm('registrazioneUtenteForm')">>> key='form.submit'/>
>>> 2) 
>>> and the following form declaration:
>>> >> onsubmit="return validateRegistrazioneUtenteForm(this)">
>>> Moreover I have enabled javascript validation:
>>> 
>>>
>>> The javascript function submitRegistrazioneUtenteForm is the following:
>>> function submitRegistrazioneUtenteForm(nomeForm){
>>> eval("document."+nomeForm+".submit()");
>>> }
>>>
>>> If I click on the second button (html:submit), all works well (I get
>>> javascript alerts).
>>> If I click on the first button (html:link), the form is submitted but I
>>> can't see any javascript alerts.
>>>
>>> I can't understand where is the problem.
>>>
>>> Can you help me?
>>>
>>> Thanks in advance.
>>>
>> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-Validator-Framework%3A-client-side-validation-problem-with-submitting-buttons-tp18042962p18075348.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: Struts Themes Problem - help

2008-06-23 Thread Laurie Harper

Narayana S wrote:

Hi Dave,

 thanks for your reply, but when i use simple theme, my application is
not getting any values from resource bundle..


How is it failing? Note that the 'simple' theme generates a lot less 
markup, and doesn't generate everything the other themes do. Are I18N 
resources failing to get resolved, or is the theme just not generating 
the things you were expecting to see?



will this problem be solved by extending theme ?

can you provide any best link to extend a theme if it is the solution... ?


See the Themes and Templates documentation:

http://struts.apache.org/2.0.11.1/docs/themes-and-templates.html

L.


On Sun, Jun 22, 2008 at 8:25 PM, Dave Newton <[EMAIL PROTECTED]> wrote:


--- On Sun, 6/22/08, Narayana S <[EMAIL PROTECTED]> wrote:

The problem is here struts 2 is applying it's own styles to
my page, i want to give my own styles instead of using struts
default styles,

The easiest answer is to just supply your own CSS styles. You can also
extend an existing, or create your own, theme.

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: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Laurie Harper
Did you confirm whether calling the form's submit() method triggers its 
onsubmit handler? It may be that calling submit() bypasses it, in which 
case an explicit guard in your submit function might do the trick:


function submitRegistrazioneUtenteForm(nomeForm){
  var form = ...;
  if (validateRegistrazioneUtenteForm(form)) {
form.submit();
  }
  return false;
}

L.

cacodemon79 wrote:

No suggestions? :(

I also tried to use
document.registrazioneUtenteForm.submit()")
instead of
eval("document."+nomeForm+".submit()")
but the result is the same. The form is submitted but I can't see any
javascript alerts.

I can't understand where is the problem.

I hope you can help me.

Thanks.



cacodemon79 wrote:

Hi, I'm using Struts Validator Framework (Struts 1.3).
Server-side validation works well.
The problem is in client-side validation.

The form name I have to validate is: RegistrazioneUtenteForm.

In my jsp page I have 2 buttons:
1) 
2) 
and the following form declaration:

Moreover I have enabled javascript validation:


The javascript function submitRegistrazioneUtenteForm is the following:
function submitRegistrazioneUtenteForm(nomeForm){
eval("document."+nomeForm+".submit()");
}

If I click on the second button (html:submit), all works well (I get
javascript alerts).
If I click on the first button (html:link), the form is submitted but I
can't see any javascript alerts.

I can't understand where is the problem.

Can you help me?

Thanks in advance.






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



Re: Closing tag for html:hidden

2008-06-23 Thread Antonio Petrelli
2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
> A tile definition. I've tried a few combinations, but none is working. For
> example if I use
>
>  path="/home"
>   type="be.fedict.etendering.web.actions.common.HomeAction">
>   
>   
>
> I get no exception but a blank page is returned.

I suppose that Tiles has not been configured correctly then.
See:
http://wiki.apache.org/struts/StrutsUpgradeNotes12to13

In particular, in the Tiles part:

  Add a chainConfig init-param in the web.xml pointing to the
location of the chain-config.xml

 
 chainConfig
 org/apache/struts/tiles/chain-config.xml
 

HTH
Antonio

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



RE: Struts 2: Providing Tiles Controller-like Functionality

2008-06-23 Thread Asleson, Ryan

Thank you for your thoughts!

Our model is to use one Action per JSP.  So, for example, if a JSP has
Add and Remove buttons, the Action has corresponding add() and remove()
methods.  We use this model because it cuts down on the proliferation of
Action classes. 

Yes, Preparable is nice because it gets called even when validation
errors occur, which is functionality we need.

I've thought about writing a PreResultListener that checks the Result
for the desired destination.  If the destination (say, myFavorite.jsp)
matches the Action (MyFavoriteAction.class) then run the prepare method.
However, I can't find a way to get the current Result.  I've tried
ActionInvocation.getResult(), but it only returns null.  Is there a way
to get the current Result object before it is actually executed?  This
would help greatly.

Any other thoughts are greatly appreciated.

-Ryan

 

-Original Message-
From: Brad A Cupit [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2008 10:19 AM
To: Struts Users Mailing List
Subject: RE: Struts 2: Providing Tiles Controller-like Functionality

Asleson, Ryan wrote:
> I'm familiar with the Struts 2 Preparable interface, but I don't like 
> this because prepare() is always called -- even on form posts

Do you have one Action with two public methods that are called by Struts
2? For example view() and submit() methods? If that's the case, I can
understand why you wouldn't want prepare() called when submit() is
called.

To solve that, just rename your prepare method to prepareView(), and it
will only run when view() is called.

If you are not using multiple public methods in one Action, and each
Action just implements the execute() method, I'd assume you have
separate Actions for viewing and submitting, let's call them ViewAction
and SubmitAction.

In this situation, make your ViewAction implement Preparable, but don't
have SubmitAction implement it.

Am I way off base here?

I personally like Preparable since the method gets called even when
there is a validation error. So you have a place to put code that you
want run both on initial display and on after a POST with validation
errors.

Brad Cupit
Louisiana State University - UIS


-Original Message-
From: Asleson, Ryan [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2008 8:36 AM
To: Struts Users Mailing List
Subject: Struts 2: Providing Tiles Controller-like Functionality

 
Hello,
 
We're moving from a Struts 1.x with Tiles development model to Struts 2
and Sitemesh.
 
One thing we miss with from Tiles is the ability to back a JSP with a
Controller.  The Controller guaranteed that whenever a JSP was rendered,
certain behavior was executed to prepare data for the JSP.  For example,
the loading of data for drop-down select boxes was often placed in the
Controller.
 
Now that we're not using Tiles we can no longer use Controllers, so I'm
wondering if Struts 2 has any sort of equivalent functionality.  I'm
familiar with the Struts 2 Preparable interface, but I don't like this
because prepare() is always called -- even on form posts, which in my
case, is at best an unnecessary database hit (or hits), and at worst can
cause confusion with what was actually posted from the page vs. what was
retrieved from prepare().
 
If it helps any, we have a 1:1 mapping between an Action and a JSP,
including a naming convention:  MyFavoriteAction maps to myFavorite.jsp.
 
Any thoughts or comments?
 
Thank you!!
 
-Ryan
 
 
 

This e-mail message is being sent solely for use by the intended
recipient(s) and may contain confidential information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by phone or reply by
e-mail, delete the original message and destroy all copies. Thank you.

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


This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

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



Re: [struts] Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Lukasz Lenart
> A beta version of firebug does work with 3.0 :
> http://getfirebug.com/releases/index.html

Thanks!

-- 
Lukasz
http://www.lenart.org.pl/

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



Re: [struts] Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Dale Newfield

Lukasz Lenart wrote:

Maybe you should install Firebug for Firefox (not working with 3.0)
and debug the JavaScript?


A beta version of firebug does work with 3.0 : 
http://getfirebug.com/releases/index.html


-Dale

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



Setting Dynamic Session Param in struts.xml

2008-06-23 Thread John Smith
Hello,

Is it possible to do something like the below in struts.xml to access
session object that have previously been set?


true
${myId}
output.jsp


thanks,
j

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



Re: struts2: render JSP from action class

2008-06-23 Thread Esteve Camps Chust
He, it worked Jeromy. Thanks you very much for this solution.

Esteve

2008/6/23 Jeromy Evans <[EMAIL PROTECTED]>:

> Esteve Camps Chust wrote:
>
>> The problem is "renderJSP" method, so it constructs a customized JSP with
>> username data. For example, "renderJSP" should return something like:
>>
>> 
>>  
>> Welcome [EMAIL PROTECTED]
>> this is a welcome email.
>>  
>> 
>>
>>
>>
> Do this:
> http://freemarker.sourceforge.net/docs/pgui_quickstart_all.html
> inside your action.
>
> (where test.ftl contains the html above)
>
> then pass the result to your emailer.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Lukasz Lenart
Hi,

Maybe you should install Firebug for Firefox (not working with 3.0)
and debug the JavaScript?


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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



Re: S2: validation notation on DATE (object that has a Date field)

2008-06-23 Thread Lukasz Lenart
> I did, and it doesn't work, when I click submit, I immediately get a red
> message next to the required fields...but not next to the date.

That strange, I made a test and it works, I've annotated at setter level

@RequiredFieldValidator(message = "Date is required")
public Date getToday() {
return today;
}

public void setToday(Date today) {
this.today = today;
}





Regards
-- 
Lukasz
http://www.lenart.org.pl/

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



Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread cacodemon79

No suggestions? :(

I also tried to use
document.registrazioneUtenteForm.submit()")
instead of
eval("document."+nomeForm+".submit()")
but the result is the same. The form is submitted but I can't see any
javascript alerts.

I can't understand where is the problem.

I hope you can help me.

Thanks.



cacodemon79 wrote:
> 
> Hi, I'm using Struts Validator Framework (Struts 1.3).
> Server-side validation works well.
> The problem is in client-side validation.
> 
> The form name I have to validate is: RegistrazioneUtenteForm.
> 
> In my jsp page I have 2 buttons:
> 1)  href="javascript:submitRegistrazioneUtenteForm('registrazioneUtenteForm')"> key='form.submit'/>
> 2) 
> and the following form declaration:
>  onsubmit="return validateRegistrazioneUtenteForm(this)">
> Moreover I have enabled javascript validation:
> 
> 
> The javascript function submitRegistrazioneUtenteForm is the following:
> function submitRegistrazioneUtenteForm(nomeForm){
>   eval("document."+nomeForm+".submit()");
> }
> 
> If I click on the second button (html:submit), all works well (I get
> javascript alerts).
> If I click on the first button (html:link), the form is submitted but I
> can't see any javascript alerts.
> 
> I can't understand where is the problem.
> 
> Can you help me?
> 
> Thanks in advance.
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-Validator-Framework%3A-client-side-validation-problem-with-submitting-buttons-tp18042962p18072574.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: Closing tag for html:hidden

2008-06-23 Thread Dimitris Mouchritsas

Antonio Petrelli wrote:

2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
  

  



What exactly is this "home"?

Antonio

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

  
A tile definition. I've tried a few combinations, but none is working. 
For example if I use


   
   
   

I get no exception but a blank page is returned.

Dimitris

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



Aw: Re: minimal app server for embedded Struts1 or 2 solution

2008-06-23 Thread kindlerm
Scott,

this is a little internal application which imports data from several systems 
into our CMS. We support a lot of these "importers". These run typically on 
dedicated machines and should be rapidly installable. If I would choose to make 
it a web application deployable on an application server this would mean a big 
maintenance overhead. I am simply looking for a better solution for an 
administrative interface than just hitting the command line.

Martin


- Original Nachricht 
Von: [EMAIL PROTECTED]
An:  Struts Users Mailing List 
Datum:   23.06.2008 16:38
Betreff: Re: minimal app server for embedded Struts1 or 2 solution

> This sounds a little suspicious!  When you say " I cannot assume a Servlet
> container to be installed on machines my app will run on" what do you mean?
> I would hope you are planning to host this from a server someplace, right?
> Not sure about your environment, but you could always use an ISP to host
> your Struts application.  I use DailyRazor and have full control over the
> server and none of the headaches of babysitting the machinery.
> 
> Scott
> 
> On Mon, Jun 23, 2008 at 7:08 AM, <[EMAIL PROTECTED]> wrote:
> 
> > Hi,
> >
> > I am currently working on a little application which needs a user
> interface
> > for administration. I think an embedded app server with a Struts based
> > application might be a good choice. But one big obstacle is in the way, I
> > fear: the size of such a solution.
> > What do you think is the minimal solution giving the comfort of a Struts
> > based approach and not dominating the workhorse app with tons of jars
> only
> > needed for the small admin part?
> > Jetty as an App server? Or Tomcat? Or some other, really small? Struts 1
> or
> > 2 (I would think Struts1 is the smaller solution)? Or shouldn't I attempt
> > this approach and write a simple servlet? What do you do?
> > I cannot assume a Servlet container to be installed on machines my app
> will
> > run on. There might be multiple instances of my app running on the same
> > machine. The UI should work over the network although a console based
> > approach might be possible, too.
> >
> > Thanks in advance
> >
> > Martin
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> Scott
> [EMAIL PROTECTED]
> 

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



Struts 2 links and Internet explorer problem

2008-06-23 Thread Milan Milanovic

Hi,

I have one simple and stupid problem, but this problem is serious because
users could be confused.
For example, I defined following link in my jsp:

http://www.nabble.com/Struts-2-links-and-Internet-explorer-problem-tp18071984p18071984.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: Closing tag for html:hidden

2008-06-23 Thread Antonio Petrelli
2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
>  path="/home"
>   forward="home" />

What exactly is this "home"?

Antonio

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



Re: minimal app server for embedded Struts1 or 2 solution

2008-06-23 Thread Al Sutton

Scott,

Most customers don't want to know about or get involved in installing an 
appserver. The app my company produces has been sold for over 4 years, 
is purely web based, and started live as a JSP/.Servlet combo, and I 
beleive that less than 20% of sales have gone to companies who know what 
an appserver is let alone have the technical experience to install one.


The customers do run the app on a server, but from our point of view 
(and theirs) having a small installable download makes the product more 
attractive than including a bloatware piece of software which includes 
an entire app server.


Al.

P.S. At the moment we ship the product with a minimal version of Jetty 
5, precompile the JSPs, and it seems to work well.


[EMAIL PROTECTED] wrote:

This sounds a little suspicious!  When you say " I cannot assume a Servlet
container to be installed on machines my app will run on" what do you mean?
I would hope you are planning to host this from a server someplace, right?
Not sure about your environment, but you could always use an ISP to host
your Struts application.  I use DailyRazor and have full control over the
server and none of the headaches of babysitting the machinery.

Scott

On Mon, Jun 23, 2008 at 7:08 AM, <[EMAIL PROTECTED]> wrote:

  

Hi,

I am currently working on a little application which needs a user interface
for administration. I think an embedded app server with a Struts based
application might be a good choice. But one big obstacle is in the way, I
fear: the size of such a solution.
What do you think is the minimal solution giving the comfort of a Struts
based approach and not dominating the workhorse app with tons of jars only
needed for the small admin part?
Jetty as an App server? Or Tomcat? Or some other, really small? Struts 1 or
2 (I would think Struts1 is the smaller solution)? Or shouldn't I attempt
this approach and write a simple servlet? What do you do?
I cannot assume a Servlet container to be installed on machines my app will
run on. There might be multiple instances of my app running on the same
machine. The UI should work over the network although a console based
approach might be possible, too.

Thanks in advance

Martin

-
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: Closing tag for html:hidden

2008-06-23 Thread Dimitris Mouchritsas

Dimitris Mouchritsas wrote:

Antonio Petrelli wrote:

2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
 

One thing to note though is we're
using xdoclet 1.2.3 to
create struts-config.xml for us. As I understand this version of 
xdoclet

supports up to struts 1.2.x.
Could this be the culprit?



Probably. According to the source file:
http://svn.apache.org/repos/asf/struts/struts1/tags/STRUTS_1_3_8/core/src/main/java/org/apache/struts/chain/commands/servlet/PerformForward.java 


it seems that a request dispatcher is not found, that is *really*
strange, and, IMHO, can only happen when a webapp did not start
correctly. Do you see an error at startup?

Antonio

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

  
No, everything seems to start smoothly. I'll try to create a 
struts-config.xml file by hand just for the home action  and see what 
happens.


Dimitris

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


I'm not sure it's the struts-config.xml file anymore. I'm using this:


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







   
 

  
   






   
  
   






   
  
   
   name="welcome"
   path="/Welcome.do"/>
   





   

   
   path="/Welcome"
   forward="/pages/Welcome.jsp"/>

   

   
   





   






 


 
   
 
 
   value="/WEB-INF/tiles-defs.xml" />

 



which is from another 1.3.8 sample app and I just added the action 
definition for /home. Still I get the same exception.

Could it be that it's not finding a proper jar or something?

Dimitris






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



RE: Struts 2: Providing Tiles Controller-like Functionality

2008-06-23 Thread Brad A Cupit
Asleson, Ryan wrote:
> I'm familiar with the Struts 2 Preparable interface, but I don't
> like this because prepare() is always called -- even on form posts

Do you have one Action with two public methods that are called by Struts
2? For example view() and submit() methods? If that's the case, I can
understand why you wouldn't want prepare() called when submit() is
called.

To solve that, just rename your prepare method to prepareView(), and it
will only run when view() is called.

If you are not using multiple public methods in one Action, and each
Action just implements the execute() method, I'd assume you have
separate Actions for viewing and submitting, let's call them ViewAction
and SubmitAction.

In this situation, make your ViewAction implement Preparable, but don't
have SubmitAction implement it.

Am I way off base here?

I personally like Preparable since the method gets called even when
there is a validation error. So you have a place to put code that you
want run both on initial display and on after a POST with validation
errors.

Brad Cupit
Louisiana State University - UIS


-Original Message-
From: Asleson, Ryan [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2008 8:36 AM
To: Struts Users Mailing List
Subject: Struts 2: Providing Tiles Controller-like Functionality

 
Hello,
 
We're moving from a Struts 1.x with Tiles development model to Struts 2
and Sitemesh.
 
One thing we miss with from Tiles is the ability to back a JSP with a
Controller.  The Controller guaranteed that whenever a JSP was rendered,
certain behavior was executed to prepare data for the JSP.  For example,
the loading of data for drop-down select boxes was often placed in the
Controller.
 
Now that we're not using Tiles we can no longer use Controllers, so I'm
wondering if Struts 2 has any sort of equivalent functionality.  I'm
familiar with the Struts 2 Preparable interface, but I don't like this
because prepare() is always called -- even on form posts, which in my
case, is at best an unnecessary database hit (or hits), and at worst can
cause confusion with what was actually posted from the page vs. what was
retrieved from prepare().
 
If it helps any, we have a 1:1 mapping between an Action and a JSP,
including a naming convention:  MyFavoriteAction maps to myFavorite.jsp.
 
Any thoughts or comments?
 
Thank you!!
 
-Ryan
 
 
 

This e-mail message is being sent solely for use by the intended
recipient(s) and may contain confidential information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by phone or reply by
e-mail, delete the original message and destroy all copies. Thank you.

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



[s2] error nesting custom components

2008-06-23 Thread mdiazf

I'm getting a NullPointerException when I pass a custom component as a
parameter to another custom component.

The files are:

test_fail.jsp (throws NPE):
<%@ page contentType="text/html; charset=ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

  

  



test_work.jsp (works ok):
<%@ page contentType="text/html; charset=ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>



myComponent.jsp:
<%@ page contentType="text/html; charset=ISO-8859-1" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
http://www.w3.org/TR/html4/strict.dtd";>


  




myComponent_nested.jsp:
<%@ page contentType="text/html; charset=ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
Some text...




As you can see I'm passing the component myComponent_nested.jsp as a
parameter to the component myComponent.jsp. That fails if any struts2 tag is
used in myComponent_nested.jsp (if I don't use any struts2 tag it works).
The component myComponent.jsp works ok if I pass a string instead of a
myComponent_nested.jsp.

The stack trace follows:

2008-06-23 16:49:24,703 [ERROR]
org.apache.struts2.components.template.JspTemplateEngine - Could not render
JSP template /template/xhtml/myComponent.jsp
2008-06-23 16:49:24,703 [ERROR] org.apache.struts2.components.UIBean - error
when rendering
java.lang.NullPointerException
at org.apache.struts2.components.Include.include(Include.java:241)
at
org.apache.struts2.components.template.JspTemplateEngine.renderTemplate(JspTemplateEngine.java:55)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530)
at org.apache.struts2.components.UIBean.end(UIBean.java:484)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
at
org.apache.jsp.paginas.test_fail_jsp._jspx_meth_s_005fcomponent_005f0(test_fail_jsp.java:118)
at 
org.apache.jsp.paginas.test_fail_jsp._jspService(test_fail_jsp.java:68)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)



Is this a bug or I'm doing something wrong?

Many thanks
-- 
View this message in context: 
http://www.nabble.com/-s2--error-nesting-custom-components-tp18071125p18071125.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: Closing tag for html:hidden

2008-06-23 Thread Dimitris Mouchritsas

Antonio Petrelli wrote:

2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
  

One thing to note though is we're
using xdoclet 1.2.3 to
create struts-config.xml for us. As I understand this version of xdoclet
supports up to struts 1.2.x.
Could this be the culprit?



Probably. According to the source file:
http://svn.apache.org/repos/asf/struts/struts1/tags/STRUTS_1_3_8/core/src/main/java/org/apache/struts/chain/commands/servlet/PerformForward.java
it seems that a request dispatcher is not found, that is *really*
strange, and, IMHO, can only happen when a webapp did not start
correctly. Do you see an error at startup?

Antonio

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

  
No, everything seems to start smoothly. I'll try to create a 
struts-config.xml file by hand just for the home action  and see what 
happens.


Dimitris

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



Re: Closing tag for html:hidden

2008-06-23 Thread Antonio Petrelli
2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
> One thing to note though is we're
> using xdoclet 1.2.3 to
> create struts-config.xml for us. As I understand this version of xdoclet
> supports up to struts 1.2.x.
> Could this be the culprit?

Probably. According to the source file:
http://svn.apache.org/repos/asf/struts/struts1/tags/STRUTS_1_3_8/core/src/main/java/org/apache/struts/chain/commands/servlet/PerformForward.java
it seems that a request dispatcher is not found, that is *really*
strange, and, IMHO, can only happen when a webapp did not start
correctly. Do you see an error at startup?

Antonio

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



Re: Closing tag for html:hidden

2008-06-23 Thread Dimitris Mouchritsas

Antonio Petrelli wrote:

2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
  

Caused by: java.lang.NullPointerException
  at
org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)



Mmm... Just a shot in the dark, did you put the commons-chain.jar in
your classpath?

Antonio

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

  
Yep, right from the struts lib directory. One thing to note though is 
we're using xdoclet 1.2.3 to
create struts-config.xml for us. As I understand this version of xdoclet 
supports up to struts 1.2.x.
Could this be the culprit? That it doesn't produce a proper 
struts-config.xml? Because from what I
saw web.xml is very similar to 1.3.8's web.xml from the blank web app 
example.


Dimitris

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



Re: minimal app server for embedded Struts1 or 2 solution

2008-06-23 Thread stanlick
This sounds a little suspicious!  When you say " I cannot assume a Servlet
container to be installed on machines my app will run on" what do you mean?
I would hope you are planning to host this from a server someplace, right?
Not sure about your environment, but you could always use an ISP to host
your Struts application.  I use DailyRazor and have full control over the
server and none of the headaches of babysitting the machinery.

Scott

On Mon, Jun 23, 2008 at 7:08 AM, <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I am currently working on a little application which needs a user interface
> for administration. I think an embedded app server with a Struts based
> application might be a good choice. But one big obstacle is in the way, I
> fear: the size of such a solution.
> What do you think is the minimal solution giving the comfort of a Struts
> based approach and not dominating the workhorse app with tons of jars only
> needed for the small admin part?
> Jetty as an App server? Or Tomcat? Or some other, really small? Struts 1 or
> 2 (I would think Struts1 is the smaller solution)? Or shouldn't I attempt
> this approach and write a simple servlet? What do you do?
> I cannot assume a Servlet container to be installed on machines my app will
> run on. There might be multiple instances of my app running on the same
> machine. The UI should work over the network although a console based
> approach might be possible, too.
>
> Thanks in advance
>
> Martin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Scott
[EMAIL PROTECTED]


Re: Closing tag for html:hidden

2008-06-23 Thread Antonio Petrelli
2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
> Caused by: java.lang.NullPointerException
>   at
> org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)

Mmm... Just a shot in the dark, did you put the commons-chain.jar in
your classpath?

Antonio

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



Re: Closing tag for html:hidden

2008-06-23 Thread Dimitris Mouchritsas

Antonio Petrelli wrote:

2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
  

Thanks for the info for the form tag. The problem is we use tiles, so
html:xhtml is not really an option.



Why?  does not produce any markup code, only tells
Struts tags to render in XHTML.

Antonio

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

  

Ahh, ok, confused it with 
which produces the  tag.

Anyway, I'm trying to upgrade to struts 1.3.8 but I get an exception
when trying to view the first page:

null
java.lang.NullPointerException
   at 
org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)
   at 
org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)
   at 
org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
   at 
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)

   at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
   at 
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)

   at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
   at 
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)

   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)

   at oracle.security.jazn.oc4j.JAZNFilter$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
   at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
   at 
com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
   at 
com.ed.ecomm.edcore.web.filters.SecurityFilter.doFilter(SecurityFilter.java:196)
   at 
com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
   at 
com.ed.ecomm.edcore.web.filters.MonitoringFilter.doFilter(MonitoringFilter.java:138)
   at 
com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
   at 
com.ed.ecomm.edcore.web.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)
   at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
   at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
   at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
   at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)

   at java.lang.Thread.run(Thread.java:534)
-

etendering > 17:15:56.265 DEBUG TilesAccessProxyAction- forwarding 
to tile definition: error.page

etendering > 17:15:56.265 DEBUG ErrorHandlerServlet   - doGet
etendering > 17:15:56.265 DEBUG ErrorHandlerServlet   - doPost()
etendering > 17:15:56.265 ERROR ErrorHandlerServlet   - 
RepException  id:b5c7ee5ac0a8010101a8cf03a8763d4f

etendering > 17:15:56.265 ERROR ErrorHandlerServlet   - EXCEPTION:
-
id b5c7ee5ac0a8010101a8cf03a8763d4f, error.generic
be.fedict.etendering.exception.EtenderingException: error.generic
   at 
be.fedict.etendering.web.servlet.ErrorHandlerServlet.logErrors(ErrorHandlerServlet.java:92)
   at 
be.fedict.etendering.web.servlet.ErrorHandlerServlet.doPost(ErrorHandlerServlet.java:53)
   at 
be.fedict.etendering.web.servlet.ErrorHandlerServlet.doGet(ErrorHandlerServlet.java:68)

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)

   at oracle.security.jazn.oc4j.JAZNFilter$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
   at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
   at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
   at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
   at 
com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:222)
   at 
com.evermind.server.http.EvermindHttpServletResponse.handleException(EvermindHttpServletResponse.java:1685)
   at 
com.e

Re: Closing tag for html:hidden

2008-06-23 Thread Antonio Petrelli
2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
> Thanks for the info for the form tag. The problem is we use tiles, so
> html:xhtml is not really an option.

Why?  does not produce any markup code, only tells
Struts tags to render in XHTML.

Antonio

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



Re: minimal app server for embedded Struts1 or 2 solution

2008-06-23 Thread Nils-Helge Garli Hegvik
I know of several projects using Jetty to embed and distribute their
web applications. Jetty is easy to configureand embed (with xml or
programatically). Take a look at
http://docs.codehaus.org/display/JETTY/Embedding+Jetty to get started.

Nils-H

On Mon, Jun 23, 2008 at 2:08 PM,  <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am currently working on a little application which needs a user interface 
> for administration. I think an embedded app server with a Struts based 
> application might be a good choice. But one big obstacle is in the way, I 
> fear: the size of such a solution.
> What do you think is the minimal solution giving the comfort of a Struts 
> based approach and not dominating the workhorse app with tons of jars only 
> needed for the small admin part?
> Jetty as an App server? Or Tomcat? Or some other, really small? Struts 1 or 2 
> (I would think Struts1 is the smaller solution)? Or shouldn't I attempt this 
> approach and write a simple servlet? What do you do?
> I cannot assume a Servlet container to be installed on machines my app will 
> run on. There might be multiple instances of my app running on the same 
> machine. The UI should work over the network although a console based 
> approach might be possible, too.
>
> Thanks in advance
>
> Martin
>
> -
> 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: Closing tag for html:hidden

2008-06-23 Thread Dimitris Mouchritsas

Antonio Petrelli wrote:

2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
  

Notice that it doesn't close the tag properly like /> as required by xhtml.
Is there a way to tell struts to close properly for xhtml or we have to
upgrade?



Use  before the first  tag of every JSP page.
BTW I suggest to upgrade to Struts 1.2.9 (at least) because
 in Struts 1.2.4 does not produce XHTML-strict compliant
code (in particular it creates the "name" attribute).

Antonio

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

  
Thanks for the info for the form tag. The problem is we use tiles, so 
html:xhtml is not really an option.
A colleague will try to do a controller trick in web.xml, but from what 
I feel we'll have to upgrade.

Dimitris

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



Re: Struts 2: Providing Tiles Controller-like Functionality

2008-06-23 Thread Antonio Petrelli
2008/6/23 Asleson, Ryan <[EMAIL PROTECTED]>:
> One thing we miss with from Tiles is the ability to back a JSP with a
> Controller.  The Controller guaranteed that whenever a JSP was rendered,
> certain behavior was executed to prepare data for the JSP.  For example,
> the loading of data for drop-down select boxes was often placed in the
> Controller.
>
> Now that we're not using Tiles we can no longer use Controllers

Well, Tiles 1 "controllers" were renamed to "view preparers" in Tiles 2. See:
http://tiles.apache.org/tutorial/advanced/preparer.html

Ciao
Antonio

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



EJB3 dependancy injection on for WAS 6.1

2008-06-23 Thread Struts Two
I have modified the EJB3 plugin(interceptor) to inject Local EJB3 beans into 
you action classes for Websphere V6.1 and it is working great. If anyone is 
interested in the code, let me know and I would send him/her the code. I was 
planning to send it to mailing list but my email is being rejected as spam.


  __
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now at
http://ca.toolbar.yahoo.com.

Struts 2: Providing Tiles Controller-like Functionality

2008-06-23 Thread Asleson, Ryan
 
Hello,
 
We're moving from a Struts 1.x with Tiles development model to Struts 2
and Sitemesh.
 
One thing we miss with from Tiles is the ability to back a JSP with a
Controller.  The Controller guaranteed that whenever a JSP was rendered,
certain behavior was executed to prepare data for the JSP.  For example,
the loading of data for drop-down select boxes was often placed in the
Controller.
 
Now that we're not using Tiles we can no longer use Controllers, so I'm
wondering if Struts 2 has any sort of equivalent functionality.  I'm
familiar with the Struts 2 Preparable interface, but I don't like this
because prepare() is always called -- even on form posts, which in my
case, is at best an unnecessary database hit (or hits), and at worst can
cause confusion with what was actually posted from the page vs. what was
retrieved from prepare().
 
If it helps any, we have a 1:1 mapping between an Action and a JSP,
including a naming convention:  MyFavoriteAction maps to myFavorite.jsp.
 
Any thoughts or comments?
 
Thank you!!
 
-Ryan
 
 
 

This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

Re: Validation

2008-06-23 Thread Struts Two
Make sure your validation xml is named as  "ActionClass-alias-validation.xml", 
if you want to apply it only to one method in ur action class 
Naming it as "Actionclass-validation.xml" would apply your validation to all 
methods in your action.


  __
Ask a question on any topic and get answers from real people. Go to Yahoo! 
Answers and share what you know at http://ca.answers.yahoo.com

Re: struts2: render JSP from action class

2008-06-23 Thread Jeromy Evans

Esteve Camps Chust wrote:

The problem is "renderJSP" method, so it constructs a customized JSP with
username data. For example, "renderJSP" should return something like:


  
 Welcome [EMAIL PROTECTED]
 this is a welcome email.
  


  

Do this:
http://freemarker.sourceforge.net/docs/pgui_quickstart_all.html
inside your action.

(where test.ftl contains the html above)

then pass the result to your emailer.


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



Re: Closing tag for html:hidden

2008-06-23 Thread Antonio Petrelli
2008/6/23 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
> Notice that it doesn't close the tag properly like /> as required by xhtml.
> Is there a way to tell struts to close properly for xhtml or we have to
> upgrade?

Use  before the first  tag of every JSP page.
BTW I suggest to upgrade to Struts 1.2.9 (at least) because
 in Struts 1.2.4 does not produce XHTML-strict compliant
code (in particular it creates the "name" attribute).

Antonio

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



Re: struts2: render JSP from action class

2008-06-23 Thread Esteve Camps Chust
Ok. The subject: render a JSP/Freemaker/Velocity file in a Struts Action, to
send an email. I mean, the "problem" is getting the HTML email body from an
Action. The action skeleton would be:

public void sendEmail extends ActionSupport {

 private String username;

 public String execute() {
 // Validate parameters;
 
 // Send email
 Email mail = new Email();
 email.setFrom("[EMAIL PROTECTED]");
 email.setTo("[EMAIL PROTECTED]");
 email.setSubject("welcome");
 email.setBody(*this.renderJSP()*);
 Mailer.send(email);

 // Response to user.
 return ActionSupport.SUCCESS;
 }
}

The problem is "renderJSP" method, so it constructs a customized JSP with
username data. For example, "renderJSP" should return something like:


  
 Welcome [EMAIL PROTECTED]
 this is a welcome email.
  


The object is render this email inside the user request. For me, it's not
important the template engine (JSP, FreeMaker, Velocity); the main thing is
getting it run from an Action.

Thanks again for your help and patience.

Esteve
2008/6/23 Dave Newton <[EMAIL PROTECTED]>:

> --- On Mon, 6/23/08, Esteve Camps Chust <[EMAIL PROTECTED]> wrote:
> > May you help me once again and guide me on the code? I've been
> > trying to do what you said me, but I cann't get it run.
>
> What specifically are you having issues with? If it's FreeMarker issues you
> might have better luck on a more appropriate FreeMarker list/forum. It's
> pretty straight-forward, though.
>
> Dave
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [OT] What slows you down?

2008-06-23 Thread Greg Lindholm

Sorry, I don't understand your response. Was this about one of my questions
or of list of "slows"?


mgainty wrote:
> 
> Greg-
> 
> RhinoScript only works with JS files (not ftl or jsp)
> 
> Your Best option is to configure in jspc task thru ant using the compiler 
> option
> http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html
> a must have for the build engineer who will want to assure clean jsp pages 
> before deploying
> 
> Anyone else?
> Martin
> - Original Message - 
> From: "Greg Lindholm" <[EMAIL PROTECTED]>
> To: 
> Sent: Saturday, June 21, 2008 11:01 PM
> Subject: Re: [OT] What slows you down?
> 
> 
>>
>> When I read this I was being slowed down by constant stopping
>> and starting of Tomcat from within Eclipse...
>>  - make a change in an action class
>>  - start tomcat
>>  - test it... not working
>>  - stop tomcat
>>  - make a java change
>>  - repeat
>>
>> In this case I was working on validation logic with annotations.
>> How else do you test validation logic? Can you unit test validation
>> logic? Is there a better way? [1]
>>
>> Part of this problem was I wasn't sure if my OGNL expression was correct.
>> How do you test/debug OGNL expressions when they will depend on
>> the ValueStack? [2]
>>
>> Another part of the problem is the doc for FieldExpressionValidator 
>> doesn't
>> bother to tell you which direction (true or false) the expression should
>> return to pass or fail the validation. [3]
>>
>> BTW: I really really like Struts 2.  Over the years I've went from Struts 
>> 1,
>> to JSF, and now Struts 2, and S2 is by far the best and easiest and
>> most enjoyable.
>>
>> The thing that slowed me down the most was the learning curve.  I started
>> with
>> the online tutorials, and the "Starting Struts 2"  pdf book, then I had
>> to
>> start
>> working on my application.  It was very rough going at first, I spent a 
>> lot
>> of time
>> in the debugger trying to figure out what the hell was going on.  Then I
>> read
>> "Struts 2 Design and Programming" and felt better, went back and fixed 
>> some
>> of the bad designs I started with but still was lacking much knowledge.
>> Finally
>> "Struts 2 in Action" was released and I got time to read it **.
>> I finally feel comfortable, and figure I understand how Struts 2 really
>> works.
>> Now I'm going back again and fixing more early bad designs. [4]
>>
>> One more, un-versioned online documentation.
>> Under the URL http://struts.apache.org/2.0.11.1/docs  (which anyone would
>> reasonably believe is documentation for Struts 2.0.11) is documentation 
>> that
>> only applies to release 2.1.x.  More then a couple of times I've had a
>> problem
>> searched for a solution found it in the 2.0.11.1 docs started
>> implementing
>> it
>> only to discover it was only for 2.1.x. (very frustrating.) [5]
>>
>> [1] Unit testing validation logic
>> [2] Debugging OGNL expressions
>> [3] Poor or incomplete documentation, lack or real-world examples and use
>> cases
>> [4] Learning curve
>> [5] Un-versioned docs.
>>
>> ** Struts 2 in Action is a really good book, highly recommend it.
>> However, 
>> I
>> don't think I would have got nearly as much out of it if I hadn't already
>> gone
>> through the other books and hand's on struggles before I read it.
>>
>>
>> Ted Husted wrote:
>>>
>>> Since it's friday, let me pose a question to the group ...
>>>
>>> Even with rock-solid frameworks like Apache Struts, it still seems
>>> like web application development takes longer than it should. Some
>>> frameworks, like Ruby on Rails, speak directly to "time to market"
>>> concerns and have been gathering many followers.
>>>
>>> But why does web application still seem so difficult or so
>>> time-consuming? Are there time bandits that still suck days or weeks
>>> out of your development schedule? Are there time gremlins that
>>> "nickel-and-dime" you every hour of every day? Is there anything more
>>> that frameworks like Apache Struts can do to help? Or are just there
>>> intractable problems with web development itself?
>>>
>>> Thoughts? :)
>>>
>>> -Ted.
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/-OT--What-slows-you-down--tp18027912p18050807.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-OT--What-slows-you-down--tp18027912p18067156.html
Sent from the Struts - User mailing list archive at Nabble.c

Closing tag for html:hidden

2008-06-23 Thread Dimitris Mouchritsas

Hi all,
We're using struts 1.2.4 in our project and we just noticed something; 
When rendering a  element the html produced is:




Notice that it doesn't close the tag properly like /> as required by xhtml. Is there a way to 
tell struts to close properly for xhtml or we have to upgrade?


Thanks 
Dimitris




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



Re: struts2: render JSP from action class

2008-06-23 Thread Dave Newton
--- On Mon, 6/23/08, Esteve Camps Chust <[EMAIL PROTECTED]> wrote:
> May you help me once again and guide me on the code? I've been 
> trying to do what you said me, but I cann't get it run.

What specifically are you having issues with? If it's FreeMarker issues you 
might have better luck on a more appropriate FreeMarker list/forum. It's pretty 
straight-forward, though.

Dave


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



Re: struts2: render JSP from action class

2008-06-23 Thread Esteve Camps Chust
Thanks Martin, I have found some tricks in mailerReader, but not what I'm
looking for.

Jeromy, thanks for your suggestion. May you help me once again and guide me
on the code? I've been trying to do what you said me, but I cann't get it
run.

Thanks again.

Esteve

2008/6/23 Jeromy Evans <[EMAIL PROTECTED]>:

> Esteve Camps Chust wrote:
>
>> hi all,
>>
>> this is my first email at struts list. I am a new user to struts2. I'm
>> trying to get working the next scenario: having a mailer class, I want the
>> message text be a rendered JSP. The action class calls a mailer class;
>> this
>> composes the mail from the rendering result of a jsp element (it would be
>> fantastic that this rendering process uses some action class
>> attributes/values). Finally, the action class informs the user about the
>> mailing result.
>>
>> Is there any way to get this working? I think I did it once on struts 1.3
>> :(
>>
>> Thanks in advance.
>>
>> Sincerely,
>>
>> Esteve
>>
>>
>>
>
> Yes it can be done, but my suggestion is to NOT use a JSP as the source of
> the message text.  Instead use a template engine like FreeMarker or Velocity
> and write the source of the message in HTML+templateLanguage.   That'll
> allow you to build and test the mailer outside the J2EE environment which is
> much more productive (and in the case of FTL, superior)
>
> With this approach, your action class will simply be responsible for
> creating a context for the template (eg. a Map), invoking the emailer and
> then returning a happy result (JSP) for the user.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


minimal app server for embedded Struts1 or 2 solution

2008-06-23 Thread kindlerm
Hi,

I am currently working on a little application which needs a user interface for 
administration. I think an embedded app server with a Struts based application 
might be a good choice. But one big obstacle is in the way, I fear: the size of 
such a solution.
What do you think is the minimal solution giving the comfort of a Struts based 
approach and not dominating the workhorse app with tons of jars only needed for 
the small admin part?
Jetty as an App server? Or Tomcat? Or some other, really small? Struts 1 or 2 
(I would think Struts1 is the smaller solution)? Or shouldn't I attempt this 
approach and write a simple servlet? What do you do?
I cannot assume a Servlet container to be installed on machines my app will run 
on. There might be multiple instances of my app running on the same machine. 
The UI should work over the network although a console based approach might be 
possible, too.

Thanks in advance

Martin

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



Re: s:submit name attribute problem

2008-06-23 Thread Lukasz Lenart
Hi,

> 

Just look for source of your page and you will see why. If you want to
use either method or action (not both), maybe it will be better to add
hidden field?


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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



Re: [S2] attempts to access www.opensymphony.com on Struts startup???

2008-06-23 Thread Dave Newton
--- On Mon, 6/23/08, Dave Newton <[EMAIL PROTECTED]> wrote:
> http://opensymphony.com/xwork/
> 
> See the "source repository" link.

(Having said that, of course, I'm not able to check out the source from there. 
I was on Saturday, IIRC.)

Dave


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



Re: [S2] attempts to access www.opensymphony.com on Struts startup???

2008-06-23 Thread Dave Newton
--- On Mon, 6/23/08, Pierre Thibaudeau <[EMAIL PROTECTED]> wrote:
> (Subsidiary question: where does one get hold of the source
> code for com.opensymphony.xwork2?  I briefly looked on opensymphony.com 
> and quickly got confused!)

http://opensymphony.com/xwork/

See the "source repository" link.

Dave


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



s:submit name attribute problem

2008-06-23 Thread mjw_85uk

hi,

i am having a problem with the name attribute of s:submit tag.  I may be
using it in the wrong context as i am farily new to Struts 2.  My problem is
that i want to set a property of a class with the value of the submit
button, which i assume would be "submit".  The problem is that the property
is not set and has a value of null when the submit button is pressed. My
code is below:

JSP Page:



Class:

private String action;

Can anyone assist me in my problem?


many thanks
mark

-- 
View this message in context: 
http://www.nabble.com/s%3Asubmit-name-attribute-problem-tp18065958p18065958.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: [S2] OGNL and enum

2008-06-23 Thread Pierre Thibaudeau
> You'll need to enable OGNL's access to static methods.
>
> struts.ognl.allowStaticMethodAccess=true
>

Ah, I didn't know that!


>
> I try  not to use this myself.  Instead I expose a property that provides
> the values so it can sort, lookup I81N text, and minimize dependencies on
> OGNL-specific syntax.
>

Thanks for the advice!


Re: [S2] Validator Framework

2008-06-23 Thread Lukasz Lenart
Hi,

Struts2 use XWork Validation Framework, so you can use it
http://www.opensymphony.com/xwork/wikidocs/Validation%20Framework.html


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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



Special Characters in s:text tag

2008-06-23 Thread sudipto.dey

Hi,

I am using the struts s:text tag to print a number of values from the stack.
It was working fine untill I got the '[' and ']' characters in the stack and
had to show these values. When we are trying to display the string it does
not show the page.

Please provide me some pointers so that I can find the solution.

Thanks,
Sudipto
-- 
View this message in context: 
http://www.nabble.com/Special-Characters-in-s%3Atext-tag-tp18064753p18064753.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: struts2: render JSP from action class

2008-06-23 Thread Jeromy Evans

Esteve Camps Chust wrote:

hi all,

this is my first email at struts list. I am a new user to struts2. I'm
trying to get working the next scenario: having a mailer class, I want the
message text be a rendered JSP. The action class calls a mailer class; this
composes the mail from the rendering result of a jsp element (it would be
fantastic that this rendering process uses some action class
attributes/values). Finally, the action class informs the user about the
mailing result.

Is there any way to get this working? I think I did it once on struts 1.3 :(

Thanks in advance.

Sincerely,

Esteve

  


Yes it can be done, but my suggestion is to NOT use a JSP as the source 
of the message text.  Instead use a template engine like FreeMarker or 
Velocity and write the source of the message in HTML+templateLanguage.   
That'll allow you to build and test the mailer outside the J2EE 
environment which is much more productive (and in the case of FTL, superior)


With this approach, your action class will simply be responsible for 
creating a context for the template (eg. a Map), invoking the emailer 
and then returning a happy result (JSP) for the user.



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



Re: my Own CSS

2008-06-23 Thread Jeromy Evans

Narayana S wrote:

Hi,

  i used struts 2 default theme to develop the pages. but recently i got
the CSS from the designer now i need to apply those styles to my project.
the problem is when i change theme to simple, it is not letting me to read
values from properties file(Resource bundle). how can i apply my own css
styles, and work properly with internationalization also...?


thanks in advance.
Help me plz.
~Narayana

  

As you've noticed, the simple theme doesn't include labels.

You have two options:
 - use css_xhtml and override the CSS supplied by struts with the 
styles supplied by your design. This will probably suck as there's 
likely to be selector mismatches; or
 - create a new theme, extending simple but duplicated from css_xhtml.  
This should use the CSS and structure provided by your designer while 
retaining the useful bits from css_xhtml (such as the labels loaded from 
resource bundles).  I always work like this.  It's much easier than it 
first seems.



Hope that helps,
Jeromy Evans

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



Re: [S2] OGNL and enum

2008-06-23 Thread Jeromy Evans

Pierre Thibaudeau wrote:

It is possible to refer to an enum value within OGNL:
[EMAIL PROTECTED]@MARS}

But how can I refer to the collection of all the values of an enum?  In
Java, that would be:  com.myapp.Planets.values()
With OGNL, I tried the following without success:
[EMAIL PROTECTED]@values()}
[EMAIL PROTECTED]@values}
[EMAIL PROTECTED]()}
  

You'll need to enable OGNL's access to static methods.

struts.ognl.allowStaticMethodAccess=true

Otherwise your approach is fine. 

I try  not to use this myself.  Instead I expose a property that 
provides the values so it can sort, lookup I81N text, and minimize 
dependencies on OGNL-specific syntax.



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



my Own CSS

2008-06-23 Thread Narayana S
Hi,

  i used struts 2 default theme to develop the pages. but recently i got
the CSS from the designer now i need to apply those styles to my project.
the problem is when i change theme to simple, it is not letting me to read
values from properties file(Resource bundle). how can i apply my own css
styles, and work properly with internationalization also...?


thanks in advance.
Help me plz.
~Narayana


[S2] OGNL and enum

2008-06-23 Thread Pierre Thibaudeau
It is possible to refer to an enum value within OGNL:
[EMAIL PROTECTED]@MARS}

But how can I refer to the collection of all the values of an enum?  In
Java, that would be:  com.myapp.Planets.values()
With OGNL, I tried the following without success:
[EMAIL PROTECTED]@values()}
[EMAIL PROTECTED]@values}
[EMAIL PROTECTED]()}

One option that would work:
[EMAIL PROTECTED]@MERCURY, @[EMAIL PROTECTED],
@[EMAIL PROTECTED], etc.}}

but that defeats the point, doesn't it?