Re: [U] Email Validation Issue

2009-08-31 Thread Norris Shelton
I wrote one that appears to work.  I copied the contents of TegexFieldValidator 
to get it to work.  Is there a need for more of the validators to support 
collections?   



 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: Dave Newton 
To: Struts Users Mailing List 
Sent: Friday, August 28, 2009 6:19:45 PM
Subject: Re: [U] Email Validation Issue

Ginn, Timothy D Mr CTR USA TRADOC USAAC wrote:
> I have run into a bump in the road.  I am trying to validate a list of
> Strings that contain email addresses.  I can't seem to get it to check
> the emails to be a valid email using the annotation validation. 
> Could someone please let me know if this is possible or if I am doing
> something wrong 
>    @Validations(
>        requiredStrings = {...@requiredstringvalidator(message = "At Least
> one email address is required.", trim = true)},
>        emails = {...@emailvalidator(message = "Please enter a valid email
> address.", type = ValidatorType.FIELD)}
>    )
>    public void setLdapAdmins(List ldapAdmins) {
>        this.ldapAdmins = ldapAdmins;
>    }
> 
> ldapAdmins is a list of Strings that contain email addresses. I need to
> validate that they are truly email addresses and that the fields are not
> "".

AFAIK the validations will validate only a single object; I believe you'd need 
custom validation either via a validate() method, custom validator, etc.

Dave


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


  package mil.army.usaac.certs.struts_api;


import com.opensymphony.xwork2.validator.*;
import com.opensymphony.xwork2.validator.validators.*;

import java.util.*;
import java.util.regex.*;


/**
 /**
 * 
 * EmailValidator checks that a given String field, if not empty,
 * is a valid email address.
 * 
 * 
 * The regular expression used to validate that the string is an email address
 * is:
 * 
 * 
 * 
\\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
 * 
 * 
 *
 *
 * 
 * 
 *  fieldName - The field name this validator is validating. 
Required if using Plain-Validator Syntax otherwise not required
 * 
 * 
 *
 *
 * 
 * 
 * <!-- Plain Validator Syntax -->
 * <validators>
 * <validator type="emailCollection">
 * <param name="fieldName">myEmail</param>
 * <message>Must provide a valid email</message>
 * </validator>
 * </validators>
 *
 * <!-- Field Validator Syntax -->
 * <field name="myEmail">
 *<field-validator type="emailCollection">
 *   <message>Must provide a valid email</message>
 *</field-validator>
 * </field>
 * 
 * 
 *
 * @author Norris Shelton
 * @version $Date: $ $Id: $ */
public class EmailCollectionValidator extends EmailValidator {
/**
 * The validation implementation must guarantee that setValidatorContext 
will be called with a non-null
 * ValidatorContext before validate is called.
 * @param object the object to be validated.
 * @throws ValidationException is thrown if there is validation error(s).
 */
@Override
public void validate(Object object) throws ValidationException {
Object fieldValue = getFieldValue(getFieldName(), object);
if (fieldValue instanceof Collection) {
for (Object value: (Collection) fieldValue) {
// if there is no value - don't do comparison
// if a value is required, a required validator should be added 
to the field
if (value == null || getExpression() == null) {
return;
}

// XW-375 - must be a string
if (!(value instanceof String)) {
return;
}

// string must not be empty
String str = ((String) value).trim();
if (str.length() == 0) {
return;
}

// match against expression
Pattern pattern;
if (isCaseSensitive()) {
pattern = Pattern.compile(getExpression());
} else {
pattern = Pattern.compile(getExpression(), 
Pattern.CASE_INSENSITIVE);
}

String compare = (String) value;

S2-portlet and spring integration

2009-07-21 Thread Norris Shelton
I have a Struts2-portlet application that works.  The correct action is 
executed, but I get a NPE when I try to access my spring-injected beans.  The 
logs do show that the spring beans were constructed correctly.  I do have the 
struts2-spring-plugin included.

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  

Re: Specify DevMode Dynamically at Runtime

2009-05-22 Thread Norris Shelton
Code, please.

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: laserjim 
To: user@struts.apache.org
Sent: Friday, May 22, 2009 8:42:42 AM
Subject: Re: Specify DevMode Dynamically at Runtime


SOLVED: When you're in debug mode, add a dispatch initialization listener to
the Struts Dispatch class; the dispatch listener can call
setDevMode("true");.  Tested, works, Struts 2.1.6



laserjim wrote:
> 
> Hello,
> 
> I have a struts application.  Sometimes, at runtime, I decide I want to
> enable dev mode.  Modifying struts.properties requires redeploying the
> webapp.  Is there a way to enable devmode dynamically?
> 
> Thanks!
> 

-- 
View this message in context: 
http://www.nabble.com/Specify-DevMode-Dynamically-at-Runtime-tp23668635p23669706.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


  

Re: [S2] Annotation Validation - string substitution in message

2009-05-14 Thread Norris Shelton
I need some clarification.

I should have the following in my globalMessages?
required.string.message=${get(fieldName)} is required


How would I specify field name?

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: Dave Newton 
To: Struts Users Mailing List 
Sent: Thursday, May 14, 2009 3:13:53 PM
Subject: Re: [S2] Annotation Validation - string substitution in message

Norris Shelton wrote:
> I am using the following annotation for validation:
> @RequiredStringValidator(key = "required.string.message")
> 
> I have the following in my globalMessages:
> required.string.message=${string.name} is required
> 
> Is there a way to substitute the name of the field or a string that I specify 
> take the place of ${string.name}?  For example, I would like to see "Team 
> Name is required".

${getText(fieldName)}

(more or less, and there should be a key of the field name defined.

Dave


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


  

[S2] Annotation Validation - string substitution in message

2009-05-14 Thread Norris Shelton
I am using the following annotation for validation:
@RequiredStringValidator(key = "required.string.message")

I have the following in my globalMessages:
required.string.message=${string.name} is required

Is there a way to substitute the name of the field or a string that I specify 
take the place of ${string.name}?  For example, I would like to see "Team Name 
is required".

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  

How do I get a request header

2009-05-12 Thread Norris Shelton
I looked in the interceptors and did not see one that pulled the heders.

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  

Re: Autowired and PostConstruct with Struts + Spring

2009-04-28 Thread Norris Shelton
Wow.  I really shouldn't try to help people when I am on a diet.  My brain does 
not work.


Get rid of the @PostExecute and change that method to execute.  You should be 
able to set a break-point within your execute method and see that myService has 
been initialized.


 My struts action contains :
 
 @Autowired
 private MyService myService
 
 public String execute() {
   // use here myService
 }
 

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: Norris Shelton 
To: Struts Users Mailing List ; e_sli...@yahoo.it
Sent: Monday, April 27, 2009 4:09:27 PM
Subject: Re: Autowired and PostConstruct with Struts + Spring

I have a question.  Why are you using PostConstruct anyway?  AFAIK, a new 
action is created for each request.  This is not going to work like a servlet 
where it is created, you perform some initialization.  I think the problem is 
caused by the mixing of APIs.

My guess is that whatever you are trying to do in the @PostConstruct annotated 
method should be in your annotate.


Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: "e_sli...@yahoo.it" 
To: user@struts.apache.org
Sent: Monday, April 27, 2009 3:29:38 PM
Subject: Re: Autowired and PostConstruct with Struts + Spring

Hi Norris and Dave!

Thank you for your answers.
Yes, I have get/set methods for myService.

If you means declaring:  
in my struts.xml for my object factory, yes. I don't have @Component for Spring 
injection, but I suppose Spring work well as far as the myService bean is 
available in my context for other beans in my app.

I'm just wondering about @Autowired and @PostConstruct behaviour when passing 
by Struts + Spring.
Probably @PostConstruct is executed just before the @Autowired?
Using pure Spring without Struts works well: running a JUnit test with my 
@PostConstruct annotated method show myService is not null, but when this is in 
a Struts action does not work...

Has anybody see this behaviour?

Thank you for your help!

Emanuele

Norris Shelton wrote:
> Did you set Spring to be your object factory in your struts.xml.  If you used 
> Spring annotations, did you annotate your bean to be injected with @Component 
> and designate a base package for Spring to scan for beans?
> 
>  
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Shelton Consulting, LLC
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
> 
> Is there a public myService setter?
> 
> (I hardly even use annotations; maybe that's not necessary?)
> 
> Dave
> 
> 
> 
> 
> From: "e_sli...@yahoo.it" 
> To: user@struts.apache.org
> Sent: Monday, April 27, 2009 12:41:01 PM
> Subject: Autowired and PostConstruct with Struts + Spring 
> 
> Hello everybody!
> 
> I'm trying to use my service into a Struts action but with no success.
> 
> My struts action contains :
> 
> @Autowired
> private MyService myService
> 
> @PostConstruct
> public void init() {
>   // use here myService
> }
> 
> Unfortunately myService is always null and I cannot use myService in the 
> init() method...
> 
> The bean myService should correctly declared in my application-context.xml:
> 
>   
>   ...
> 
> 
> and my struts.xml contains: 
> 
> 
> Where I'm wrong?
> Many Thanks!
> 
> Emanuele
> 
> 
>  


  

Re: Autowired and PostConstruct with Struts + Spring

2009-04-27 Thread Norris Shelton
I have a question.  Why are you using PostConstruct anyway?  AFAIK, a new 
action is created for each request.  This is not going to work like a servlet 
where it is created, you perform some initialization.  I think the problem is 
caused by the mixing of APIs.

My guess is that whatever you are trying to do in the @PostConstruct annotated 
method should be in your annotate.

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: "e_sli...@yahoo.it" 
To: user@struts.apache.org
Sent: Monday, April 27, 2009 3:29:38 PM
Subject: Re: Autowired and PostConstruct with Struts + Spring

Hi Norris and Dave!

Thank you for your answers.
Yes, I have get/set methods for myService.

If you means declaring:  
in my struts.xml for my object factory, yes. I don't have @Component for Spring 
injection, but I suppose Spring work well as far as the myService bean is 
available in my context for other beans in my app.

I'm just wondering about @Autowired and @PostConstruct behaviour when passing 
by Struts + Spring.
Probably @PostConstruct is executed just before the @Autowired?
Using pure Spring without Struts works well: running a JUnit test with my 
@PostConstruct annotated method show myService is not null, but when this is in 
a Struts action does not work...

Has anybody see this behaviour?

Thank you for your help!

Emanuele

Norris Shelton wrote:
> Did you set Spring to be your object factory in your struts.xml.  If you used 
> Spring annotations, did you annotate your bean to be injected with @Component 
> and designate a base package for Spring to scan for beans?
> 
>  
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Shelton Consulting, LLC
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
> 
> Is there a public myService setter?
> 
> (I hardly even use annotations; maybe that's not necessary?)
> 
> Dave
> 
> 
> 
> 
> From: "e_sli...@yahoo.it" 
> To: user@struts.apache.org
> Sent: Monday, April 27, 2009 12:41:01 PM
> Subject: Autowired and PostConstruct with Struts + Spring 
> 
> Hello everybody!
> 
> I'm trying to use my service into a Struts action but with no success.
> 
> My struts action contains :
> 
> @Autowired
> private MyService myService
> 
> @PostConstruct
> public void init() {
>   // use here myService
> }
> 
> Unfortunately myService is always null and I cannot use myService in the 
> init() method...
> 
> The bean myService should correctly declared in my application-context.xml:
> 
>   
>   ...
> 
> 
> and my struts.xml contains: 
> 
> 
> Where I'm wrong?
> Many Thanks!
> 
> Emanuele
> 
> 
>   


  

Re: Autowired and PostConstruct with Struts + Spring

2009-04-27 Thread Norris Shelton
Did you set Spring to be your object factory in your struts.xml.  If you used 
Spring annotations, did you annotate your bean to be injected with @Component 
and designate a base package for Spring to scan for beans?

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: "e_sli...@yahoo.it" 
To: user@struts.apache.org
Sent: Monday, April 27, 2009 12:41:01 PM
Subject: Autowired and PostConstruct with Struts + Spring 

Hello everybody!

I'm trying to use my service into a Struts action but with no success.

My struts action contains :

@Autowired
private MyService myService

@PostConstruct
public void init() {
  // use here myService
}

Unfortunately myService is always null and I cannot use myService in the init() 
method...

The bean myService should correctly declared in my application-context.xml:

  
  ...


and my struts.xml contains: 


Where I'm wrong?
Many Thanks!

Emanuele


  

Re: Struts 1.2.9 or Struts 2.0

2009-04-16 Thread Norris Shelton
2.1.6 with struts2-convention-plugin

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: abhishek reddy 
To: Struts Users Mailing List 
Sent: Thursday, April 16, 2009 4:51:37 AM
Subject: Struts 1.2.9 or Struts 2.0

hi every one,

Please let me know, whether i should go for Struts 1.2.9 or Struts
2.0..i do have some knowledge on struts 1.2.9

-- 
Abhishek



  

Re: Struts2 Standards, guidelines, recommendations

2009-03-16 Thread Norris Shelton
Just Struts2.  I will tackle the others later.

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: dusty 
To: user@struts.apache.org
Sent: Sunday, March 15, 2009 1:05:52 AM
Subject: Re: Struts2  Standards, guidelines, recommendations


Are you just looking for a Struts2 convention or the whole stack, presumably
Spring/Guice Hibernate/JDBC?




sheltonn wrote:
> 
> I was looking for something akin to the java code convention standard
> (http://java.sun.com/docs/codeconv/).  My guess is that there is nothing
> out there for that.  My guess that would boil down to things like naming
> conventions for Actions, execute methods, etc.
> 
> For recommendations (don't ask me why they want 2 separate documents), I
> was thinking more along the lines of use 2.1, use the
> struts2-convention-plugin and listing what that entails.
> 
>  
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Shelton Consulting, LLC
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
> 
> 
> 
> 
> 
> From: Dave Newton 
> To: Struts Users Mailing List 
> Sent: Wednesday, March 11, 2009 5:08:57 PM
> Subject: Re: Struts2  Standards, guidelines, recommendations
> 
> Norris Shelton wrote:
>> I am working to get Struts2 approved as a production technology.  Can you
>> point me
>> to any standards or guidelines or implementation recommendations?
> 
> What kind of standards? What kind of guidelines or implementation
> recommendations are you looking for?
> 
> Dave
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/Struts2--Standards%2C-guidelines%2C-recommendations-tp22461800p22519880.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


  

Re: Struts2 Standards, guidelines, recommendations

2009-03-12 Thread Norris Shelton
I was looking for something akin to the java code convention standard 
(http://java.sun.com/docs/codeconv/).  My guess is that there is nothing out 
there for that.  My guess that would boil down to things like naming 
conventions for Actions, execute methods, etc.

For recommendations (don't ask me why they want 2 separate documents), I was 
thinking more along the lines of use 2.1, use the struts2-convention-plugin and 
listing what that entails.

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: Dave Newton 
To: Struts Users Mailing List 
Sent: Wednesday, March 11, 2009 5:08:57 PM
Subject: Re: Struts2  Standards, guidelines, recommendations

Norris Shelton wrote:
> I am working to get Struts2 approved as a production technology.  Can you 
> point me
> to any standards or guidelines or implementation recommendations?

What kind of standards? What kind of guidelines or implementation 
recommendations are you looking for?

Dave


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


  

Struts2 Standards, guidelines, recommendations

2009-03-11 Thread Norris Shelton
I am working to get Struts2 approved as a production technology.  Can you point 
me to any standards or guidelines or implementation recommendations?



 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  

Re: Acegi with Struts 2.

2009-03-02 Thread Norris Shelton
Please post what you have if it is different than the example.  More examples 
are better than less.




From: Mohan Radhakrishnan 
To: user@struts.apache.org
Sent: Sunday, March 1, 2009 10:42:46 PM
Subject: Re: Acegi with Struts 2.


Hi,
I was able to fix the Spring Security/Struts 2 filter issue by
reordering the filter mappings. Now it works.

Thanks,
Mohan
-- 
View this message in context: 
http://www.nabble.com/Acegi-with-Struts-2.-tp22259802p22281615.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


  

Re: Struts 2.1 validation with annotations

2009-02-19 Thread Norris Shelton
It is null.  Can you point me in the direction of what I am missing?

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: Musachy Barroso 
To: Struts Users Mailing List 
Sent: Thursday, February 19, 2009 3:45:35 PM
Subject: Re: Struts 2.1 validation with annotations

It seems like the default message for that validator is null. Try
adding a break point to ValidatorSupport:getMessage and see if the
defaultMessage is null.

musachy

On Thu, Feb 19, 2009 at 3:31 PM, Norris Shelton  wrote:
> validateObject



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

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


  

Struts 2.1 validation with annotations

2009-02-19 Thread Norris Shelton
pers. To disable this mode, set: 
  struts.devMode=false
in your WEB-INF/classes/struts.properties file. 



Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  

Unable to specify cookie intercepter via annotation

2009-02-10 Thread Norris Shelton
tion.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:52)
at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:200)
at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 77 more
|#]

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  

Re: Cookie Intercepter configuration

2009-02-10 Thread Norris Shelton
Thanks!




From: Musachy Barroso 
To: Struts Users Mailing List 
Sent: Tuesday, February 10, 2009 10:35:01 AM
Subject: Re: Cookie Intercepter configuration

It is a bug. This interceptor was added in 2.0.7, and it was never
added to struts-default.xml in the 2.1 branch. Just add this to your
struts.xml:



for reference:

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

musachy

On Tue, Feb 10, 2009 at 10:27 AM, Musachy Barroso  wrote:
> Where is the cookie interceptor defined? it is not in struts-default.xml:
>
> http://struts.apache.org/2.x/docs/struts-defaultxml.html
>
> hum..this is weird.
>
> musachy
>
> On Tue, Feb 10, 2009 at 9:08 AM, Norris Shelton  
> wrote:
>> >"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>>"http://struts.apache.org/dtds/struts-2.1.dtd";>
>> 
>>
>>
>>
>>
>>
>>> value="mil.army.usaac.conap"/>
>>
>>
>>> class="mil.army.usaac.conap.soldier.ViewAction">
>>
>>*
>>*
>>
>>
>>
>> 
>>
>>
>>
>> 
>> From: Jack Qu 
>> To: Struts Users Mailing List 
>> Sent: Tuesday, February 10, 2009 8:55:11 AM
>> Subject: Re: Cookie Intercepter configuration
>>
>> what's the 
>> file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
>> show text!
>>
>> --
>> From: "Norris Shelton" 
>> Sent: Tuesday, February 10, 2009 9:47 PM
>> To: "Struts Users Mailing List" 
>> Subject: Re: Cookie Intercepter configuration
>>
>>> Is there a library that I should be including?
>>>
>>> [#|2009-02-10T08:19:42.441-0500|INFO|sun-appserver9.1|org.apache.struts2.spring.StrutsSpringObjectFactory|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;|...
>>>  initialized Struts-Spring integration successfully|#]
>>>
>>> [#|2009-02-10T08:19:44.300-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;_RequestID=e361233b-87b4-43e9-bc9e-8c91015caa2d;|WebModule[/conap]PWC1270:
>>>  Exception starting filter struts2
>>> Unable to load configuration. - interceptor-ref - 
>>> file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
>>>at 
>>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
>>>at 
>>> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
>>>at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
>>>at 
>>> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
>>>at 
>>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257)
>>>at 
>>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:369)
>>>at 
>>> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
>>>at 
>>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4389)
>>>at 
>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5189)
>>>at com.sun.enterprise.web.WebModule.start(WebModule.java:326)
>>>at 
>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973)
>>>at 
>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957)
>>>at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)
>>>at 
>>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1584)
>>>at 
>>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222)
>>>at 
>>> com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)
>>>at 
>>> com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)
>>>at 
>>> com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:974)
>>>at 
>>> com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961)

Re: Cookie Intercepter configuration

2009-02-10 Thread Norris Shelton
That is a very good question.  Is it supposed to be in the default?  I assumed 
it was there.





From: Musachy Barroso 
To: Struts Users Mailing List 
Sent: Tuesday, February 10, 2009 10:27:42 AM
Subject: Re: Cookie Intercepter configuration

Where is the cookie interceptor defined? it is not in struts-default.xml:

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

hum..this is weird.

musachy

On Tue, Feb 10, 2009 at 9:08 AM, Norris Shelton  wrote:
> "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>"http://struts.apache.org/dtds/struts-2.1.dtd";>
> 
>
>
>
>
>
> value="mil.army.usaac.conap"/>
>
>
> class="mil.army.usaac.conap.soldier.ViewAction">
>
>*
>*
>
>
>
> 
>
>
>
> 
> From: Jack Qu 
> To: Struts Users Mailing List 
> Sent: Tuesday, February 10, 2009 8:55:11 AM
> Subject: Re: Cookie Intercepter configuration
>
> what's the 
> file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
> show text!
>
> --
> From: "Norris Shelton" 
> Sent: Tuesday, February 10, 2009 9:47 PM
> To: "Struts Users Mailing List" 
> Subject: Re: Cookie Intercepter configuration
>
>> Is there a library that I should be including?
>>
>> [#|2009-02-10T08:19:42.441-0500|INFO|sun-appserver9.1|org.apache.struts2.spring.StrutsSpringObjectFactory|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;|...
>>  initialized Struts-Spring integration successfully|#]
>>
>> [#|2009-02-10T08:19:44.300-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;_RequestID=e361233b-87b4-43e9-bc9e-8c91015caa2d;|WebModule[/conap]PWC1270:
>>  Exception starting filter struts2
>> Unable to load configuration. - interceptor-ref - 
>> file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
>>at 
>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
>>at 
>> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
>>at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
>>at 
>> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
>>at 
>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257)
>>at 
>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:369)
>>at 
>> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
>>at 
>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4389)
>>at 
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5189)
>>at com.sun.enterprise.web.WebModule.start(WebModule.java:326)
>>at 
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973)
>>at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957)
>>at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)
>>at 
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1584)
>>at 
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222)
>>at 
>> com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)
>>at 
>> com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)
>>at 
>> com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:974)
>>at 
>> com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961)
>>at 
>> com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464)
>>at 
>> com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
>>at 
>> com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
>>at 
>> com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226)
>>at 
>> com.sun.enterprise.deployment.phasing.S

Re: Cookie Intercepter configuration

2009-02-10 Thread Norris Shelton
http://struts.apache.org/dtds/struts-2.1.dtd";>











*
*








From: Jack Qu 
To: Struts Users Mailing List 
Sent: Tuesday, February 10, 2009 8:55:11 AM
Subject: Re: Cookie Intercepter configuration

what's the 
file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
show text!

--
From: "Norris Shelton" 
Sent: Tuesday, February 10, 2009 9:47 PM
To: "Struts Users Mailing List" 
Subject: Re: Cookie Intercepter configuration

> Is there a library that I should be including?
> 
> [#|2009-02-10T08:19:42.441-0500|INFO|sun-appserver9.1|org.apache.struts2.spring.StrutsSpringObjectFactory|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;|...
>  initialized Struts-Spring integration successfully|#]
> 
> [#|2009-02-10T08:19:44.300-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;_RequestID=e361233b-87b4-43e9-bc9e-8c91015caa2d;|WebModule[/conap]PWC1270:
>  Exception starting filter struts2
> Unable to load configuration. - interceptor-ref - 
> file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
>at 
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
>at 
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
>at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
>at 
> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
>at 
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257)
>at 
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:369)
>at 
> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
>at 
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4389)
>at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:5189)
>at com.sun.enterprise.web.WebModule.start(WebModule.java:326)
>at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973)
>at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957)
>at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)
>at 
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1584)
>at 
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222)
>at 
> com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)
>at 
> com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)
>at 
> com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:974)
>at 
> com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961)
>at 
> com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464)
>at 
> com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
>at 
> com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
>at 
> com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226)
>at 
> com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
>at 
> com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
>at 
> com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
>at 
> com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
>at 
> com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591)
>at 
> com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635)
>at 
> com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 

Re: Cookie Intercepter configuration

2009-02-10 Thread Norris Shelton
Correct, that is the only action that needs cookie information.

Is there some way to configure this via annotations/Convention plugin?

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: Dave Newton 
To: Struts Users Mailing List 
Sent: Monday, February 9, 2009 9:27:02 PM
Subject: Re: Cookie Intercepter configuration

Norris Shelton wrote:
> Struts 2.1.6 on Glassfish 9.1_02
> 
> I am trying to configure the cookie intercepter, but it looks like I am 
> missing something.
> 
> I have the following in my struts.xml:
> 
>  class="mil.army.usaac.conap.soldier.ViewAction">
> 
> *
> *
> 
> 

Also be aware that you've configured *only* the "cookie" interceptor for that 
particular action--that may be what you intended.

Dave


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


  

Re: Cookie Intercepter configuration

2009-02-10 Thread Norris Shelton
 
com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
at 
com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
at 
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
at 
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at 
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at 
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at 
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at 
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at 
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at 
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at 
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at 
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at 
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at 
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at 
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at 
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at 
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at 
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
Caused by: Unable to find interceptor class referenced by ref-name cookie - 
interceptor-ref - 
file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
at 
com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:52)
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:1092)
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildInterceptorList(XmlConfigurationProvider.java:531)
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:369)
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:460)
at 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:265)
at 
org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:189)
at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 77 more
|#]

 





From: Musachy Barroso 
To: Struts Users Mailing List 
Sent: Monday, February 9, 2009 5:20:45 PM
Subject: Re: Cookie Intercepter configuration

There should be a more meaningful exception down there in the log, can
you post the whole stack trace?

musachy

On Mon, Feb 9, 2009 at 4:38 PM, Norris Shelton  wrote:
> Struts 2.1.6 on Glassfish 9.1_02
>
> I am trying to configure the cookie intercepter, but it looks like I am 
> missing something.
>
> I have the following in my struts.xml:
>
> class="mil.army.usaac.conap.soldier.ViewAction">
>
>*
>*
>
>
>
>
> M

Cookie Intercepter configuration

2009-02-09 Thread Norris Shelton
Struts 2.1.6 on Glassfish 9.1_02

I am trying to configure the cookie intercepter, but it looks like I am missing 
something.

I have the following in my struts.xml:



*
*




My server errors when I try to deploy the webapp.
[#|2009-02-09T15:42:34.727-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=17;_ThreadName=httpWorkerThread-4848-2;_RequestID=17f40931-feed-453a-902a-f45c6313df0d;|WebModule[/conap]PWC1270:
 Exception starting filter struts2
Unable to load configuration. - interceptor-ref - 
file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44
at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
 



Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  

Re: S2.1 - struts tags vs jstl expression language

2009-01-16 Thread Norris Shelton


That works.  Thanks.




From: Dave Newton 
To: Struts Users Mailing List 
Sent: Friday, January 16, 2009 3:09:31 PM
Subject: Re: S2.1 - struts tags vs jstl expression language

Norris Shelton wrote:
> I assumed that I had to use the struts tags.  I noticed that my 
> older ${} worked for my objects.  Is there a compelling reason
> to use the longer struts tags instead of JSTL EL?

Typing practice for the angle brackets?

The S2 request wrapper will map the EL requests to the OGNL stack. If the value 
isn't found on the value stack it'll fall back to the normal JEE lookup 
mechanism.

The only reason I can think of (barring performance, which I can't imagine 
would be significant) would be if there was a name conflict where an S2 action 
property might mask something in a JEE scope and you want the JEE-scoped value.s

Dave


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


  

S2.1 - struts tags vs jstl expression language

2009-01-16 Thread Norris Shelton
I assumed that I had to use the struts tags.  I noticed that my older ${} 
worked for my objects.  Is there a compelling reason to use the longer struts 
tags instead of JSTL EL?

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  

Re: Convention plugin example

2009-01-14 Thread Norris Shelton
Right.  Starting from 0, I didn't know that the plugin dependency was needed.  
I think it is the typical open source thing.  The documentation is there, but 
there is rarely a completed project that you can compare to your own to see 
what you are missing.  






From: Dave Newton 
To: Struts Users Mailing List 
Sent: Wednesday, January 14, 2009 2:37:50 PM
Subject: Re: Convention plugin example

Norris Shelton wrote:
> Thanks for the fast response.  I did not know there was such a thing.

But... but you asked how to get a Convention plugin app running.

Dave

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


  

Re: Convention plugin example

2009-01-14 Thread Norris Shelton
Great thanks.  I have been looking around and have not found anything.  I had 
managed to get my Struts and Spring working with annotations.

 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: Wes Wannemacher 
To: Struts Users Mailing List 
Sent: Wednesday, January 14, 2009 12:58:04 PM
Subject: Re: Convention plugin example

Norris,

I have a few examples using Conventions + Struts 2.1.x available here -

http://code.google.com/p/struts2inpractice/source/browse/#svn/trunk

The ch04* examples include Struts 2.1, Spring, Conventions and
persistence (JPA & JDBC).

I haven't updated them since 2.1 went GA, but to do so, you simply
have to remove the added repository from the pom.xml file.

-Wes

On Wed, Jan 14, 2009 at 11:55 AM, Norris Shelton
 wrote:
> Does anyone know of a basic hello world application that uses the Convention 
> plugin and Maven.  I am having trouble getting any of my actions to be 
> registered.
>
> Here is the S2 related dependencies from my pom.xml
>
>
>org.apache.struts
>struts2-core
>2.1.6
>
>
>org.apache.struts
>struts2-spring-plugin
>2.1.6
>
>
>org.apache.struts
>struts2-config-browser-plugin
>2.1.2
>
>
> Here is what I have in my web.xml
>
>struts2
>
> org.apache.struts2.dispatcher.FilterDispatcher
>
>
>struts2
>/*
>
>
> Here is my struts.xml
> "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>"http://struts.apache.org/dtds/struts-2.1.dtd";>
> 
>
>
>
>
> value="--my-base-package--"/>
>
>
>
> 
>
> My java class package is the same value that is in the placeholder 
> --my-base-package--
>
> The class name ends in Action.  I tried placing it in a sub-package named 
> .actions and also tried it with extending ActionSupport.
>
>
> When I check 
> http://localhost:8080/--my-context-/config-browser/actionNames.action, I get 
> no actions mapped.
>
> Any help would be appreciated.
>
>
>
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Shelton Consulting, LLC
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
>
>
>
>



-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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


  

Re: Convention plugin example

2009-01-14 Thread Norris Shelton
Thanks for the fast response.  I did not know there was such a thing.  It is 
working great now.



org.apache.struts
struts2-convention-plugin
2.1.6



 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





From: Dave Newton 
To: Struts Users Mailing List 
Sent: Wednesday, January 14, 2009 12:11:46 PM
Subject: Re: Convention plugin example

Norris Shelton wrote:
> Does anyone know of a basic hello world application that uses the 
> Convention plugin and Maven.  I am having trouble getting any of my
> actions to be registered.
> 
> Here is the S2 related dependencies from my pom.xml
> 
> 
> org.apache.struts
> struts2-core
> 2.1.6
> 
> 
> org.apache.struts
> struts2-spring-plugin
> 2.1.6
> 
> 
> org.apache.struts
> struts2-config-browser-plugin
> 2.1.2
> 

Where's the convention plugin?

Dave


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


  

Convention plugin example

2009-01-14 Thread Norris Shelton
Does anyone know of a basic hello world application that uses the Convention 
plugin and Maven.  I am having trouble getting any of my actions to be 
registered.

Here is the S2 related dependencies from my pom.xml


org.apache.struts
struts2-core
2.1.6


org.apache.struts
struts2-spring-plugin
2.1.6


org.apache.struts
struts2-config-browser-plugin
2.1.2


Here is what I have in my web.xml

struts2

org.apache.struts2.dispatcher.FilterDispatcher


struts2
/*


Here is my struts.xml
http://struts.apache.org/dtds/struts-2.1.dtd";>











My java class package is the same value that is in the placeholder 
--my-base-package--

The class name ends in Action.  I tried placing it in a sub-package named 
.actions and also tried it with extending ActionSupport.


When I check 
http://localhost:8080/--my-context-/config-browser/actionNames.action, I get no 
actions mapped.

Any help would be appreciated.


 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton



  

Re: Unit testing Struts2 + Spring application?

2008-07-24 Thread Norris Shelton
Take a look at this.  This is set-up for Maven.  I had to copy my 
/WEB-INF/applicationResources.xml to test/resources/



package mil.army.usarec.ars.techdemo;

import static org.junit.Assert.*;
import org.junit.*;
import org.junit.runner.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.test.context.*;
import org.springframework.test.context.junit4.*;

/**
 * DemoAction Tester.
 * @author SheltonN
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"/applicationContext-test.xml"})
public class DemoActionTest {

@Autowired
private SomeService someService = null;


/**
 * Tester for Method: demoForm().
 */
@Test
public void testDemoForm() throws Exception {
assertNotNull("SomeService was not injected by Spring", someService);
assertEquals("some other value", someService.getSomethingElse());
}
}





- Original Message 
From: Jukka Välimaa <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Thursday, July 24, 2008 7:23:59 AM
Subject: Re: Unit testing Struts2 + Spring application?

Check out Appfuse ,
Struts 2 Modular version. It has this kind of setup

2008/7/23 Paweł Wielgus <[EMAIL PROTECTED]>:

> Hi Joachim,
> isn't StrutsTestCase for Struts 1.x ?
>
> Best regards,
> Paweł Wielgus.
>
> On 23/07/2008, Joachim Ansorg <[EMAIL PROTECTED]> wrote:
> > Hi,
> >  I'm working on a Struts2 application which uses Spring as factory.
> >  I'm using Struts 2.1 and  Spring 2.5.
> >
> >  The problem is for me that
> >- I don't know how to use StrutsTestCase so the created action are
> > spring-wired
> >- How to make the tests use my /WEB-INF/struts.xml file as Struts
> > configuration
> >
> >  Does anybody have this kind of setup working? If yes, are there any
> tricks
> > to do that?
> >
> >  Thanks a lot,
> >  Joachim
> >
> > -
> >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>



  

Re: (beginner) How to intialize a form's input item

2007-10-18 Thread Norris Shelton
Look at the Preparable or Model interface.


- Original Message 
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: user@struts.apache.org
Sent: Thursday, October 18, 2007 1:47:22 PM
Subject: (beginner) How to intialize a form's input item

Hi,

I am starter in Struts. I am using 1.3.8. 

My requirement: Prepopulate a form feild if value is present.

Can anybody help me in intializing a input feild using struts custom tags?

Thanks

H.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[answer]Re: Annotations and action mappings with "!"

2007-10-18 Thread Norris Shelton
I found the answer by accident.  The action needs to be specified as 
/employee/employee!list.action.  It is not intuitive, but it does work. 


- Original Message 
From: Norris Shelton <[EMAIL PROTECTED]>
To: Strutss 
Sent: Thursday, October 18, 2007 2:02:45 PM
Subject: Annotations and action mappings with "!"

It appears that this does not work.  Is that correct?  I have 
/employee/employee.action working, but I get a 404 when I try 
/employee/employee.action!list.



Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Annotations and action mappings with "!"

2007-10-18 Thread Norris Shelton
Thank you.


- Original Message 
From: Wes Wannemacher <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Thursday, October 18, 2007 2:23:43 PM
Subject: Re: Annotations and action mappings with "!"

what about /employee!list.action

-W

On 10/18/07, Norris Shelton <[EMAIL PROTECTED]> wrote:
> It appears that this does not work.  Is that correct?  I have 
> /employee/employee.action working, but I get a 404 when I try 
> /employee/employee.action!list.
>
>
>
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Shelton Consulting, LLC
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com


-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Annotations and action mappings with "!"

2007-10-18 Thread Norris Shelton
It appears that this does not work.  Is that correct?  I have 
/employee/employee.action working, but I get a 404 when I try 
/employee/employee.action!list.


 
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Shelton Consulting, LLC
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [OT] Re: writing images from a database

2005-09-29 Thread Norris Shelton
Yes and no.  

If it's his production code no, but if it's a how-to or
something that goes in a wiki, it should leave no details
uncovered.  

It is better to be over-documented, than under.  Also, I would
use the full package name on objects.  Nothing is more fun than
trying to figure out an object when it's in more than one
package (like ALL the client certificate code) or it's in some
library that you have never seen.

--- Dave Newton <[EMAIL PROTECTED]> wrote:

> Murray Collingwood wrote:
> 
> >I agree with Frank, we all started with Java/Struts somewhere
> and back then the more 
> >comments in the code made it so much easier for us to
> understand. 
> >
> If you're documenting functionality, I totally agree.
> 
> If you're commenting "inputStream.read(xxx)" with "read in the
> bytes" I 
> couldn't disagree more.
> 
> Dave
> 
> 
> 
>
---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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



RE: writing images from a database

2005-09-29 Thread Norris Shelton
; }
> 
> return null; // tells the Action servlet to not do
> anything more
>   }
> }
> 
> -- This is the struts-config.xml entry - scope must be
> session!
> 
>  path="/jpegServerAction" 
> scope="session" 
> type="transcard15.JpegServerAction" 
> validate="false" />
> 
> -- 
> This transmission is intended only for use by the addressee(s)
> named herein and may contain information that is proprietary,
> confidential and/or legally privileged. If you are not the
> intended recipient, you are hereby notified that any
> disclosure, copying, distribution, or use of the information
> contained herein (including any reliance thereon) is STRICTLY
> PROHIBITED. If you received this transmission in error, please
> immediately contact the sender and destroy the material in its
> entirety, whether in electronic or hard copy format. Thank
> you.
> 
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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



Re: Struts 1.2.6 -> 1.2.7 validation

2005-06-10 Thread Norris Shelton
Ah, ha.  I see now.  I checked the upgrade page, but it did not
say anything about an upgrade from 1.2.6 to 1.2.7.  We had been
running 1.2.6 for several months.



--- Niall Pemberton <[EMAIL PROTECTED]> wrote:

> You need to deploy the new validator-rules.xml as well. Most
> of the shipped
> validations method signatures have changed and without the new
> validator-rules.xml you are probably getting a whole load of
> exceptions in
> your logs, as well as the validators not working.
> 
> As the release notes for 1.2.7 indicate - there are upgrade
> notes on the
> wiki - and the need to deploy the new validator-rules.xml is
> mentioned in
> the upgrade notes for 1.2.7
> 
> http://struts.apache.org/userGuide/release-notes.html
> http://wiki.apache.org/struts/StrutsUpgrade
> 
> Niall
> 
> - Original Message - 
> From: "Norris Shelton" <[EMAIL PROTECTED]>
> Sent: Thursday, June 09, 2005 11:40 PM
> 
> 
> > I have code that works correctly under 1.2.6.  I changed to
> > 1.2.7 and now my validation depends="required" are not
> working.
> >
> > Has anyone else ran into this.  Replacing the jars was the
> only
> > change that I made.
> 
> 
> 
>
---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Struts 1.2.6 -> 1.2.7 validation

2005-06-09 Thread Norris Shelton
I have code that works correctly under 1.2.6.  I changed to
1.2.7 and now my validation depends="required" are not working. 

Has anyone else ran into this.  Replacing the jars was the only
change that I made.


Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html

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



Problems with e-mail validation

2005-05-18 Thread Norris Shelton
I have a field that has multiple emailAddresses fields.  I have
my validation set-up as:




The validation always fires, even when it is not specified. 
Does this have something to do with having the multiple fields
(e.g. String[])?



Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


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



Re: Trying to create a form object in code

2005-02-23 Thread Norris Shelton
Fantastic.  Someone had showed me something similar earlier, but
I was hung-up on the servlet parameter.  I did not know that it
was already available in the action.

Thanks so much.

--- Niall Pemberton <[EMAIL PROTECTED]> wrote:

> createDynActionFormClass(FormBeanConfig) is only for
> DynaActionForm and its
> derivatives - LazyValidatorForm isn't a DynaActionForm (its an
> ActionForm
> thats a DynaBean, but not a DynaActionForm).
> 
> If you want to create any kind of ActionForm, then call the
> FormBeanConfig's
> createActionForm() method
> 
> ActionForm form =  cfg.createActionForm(servlet);
> 
> Niall
> 
> 
> - Original Message - 
> From: "Norris Shelton" <[EMAIL PROTECTED]>
> Sent: Wednesday, February 23, 2005 12:43 PM
> 
> 
> > Does anyone have an idea on this?  I am trying to create a
> > LazyValidatorForm object in code
> > --- Norris Shelton <[EMAIL PROTECTED]> wrote:
> >
> > > FormBeanConfig cfg =
> > > mapping.getModuleConfig().findFormBeanConfig(name);
> > > form =(DynaActionForm)
> > >
> >
>
DynaActionFormClass.createDynaActionFormClass(cfg).newInstance();
> > >
> > > The cfg object has the properties for my dyna bean, but I
> get:
> > > java.lang.IllegalArgumentException: ActionForm is not
> dynamic
> > > at
> > >
> >
>
org.apache.struts.config.FormBeanConfig.getDynaActionFormClass(FormBeanConfi
> g.java:84)
> > > at
> > >
> >
>
org.apache.struts.action.DynaActionFormClass.createDynaActionFormClass(DynaA
> ctionFormClass.java:232)
> > >
> > > Here is my method signature:
> > > public void formDataCopy(ActionMapping mapping,
> > >  HttpServletRequest request,
> > >  ActionForm form,
> > >  String name)
> > >
> 
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

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



Re: Trying to create a form object in code

2005-02-23 Thread Norris Shelton
Does anyone have an idea on this?  I am trying to create a
LazyValidatorForm object in code
--- Norris Shelton <[EMAIL PROTECTED]> wrote:

> FormBeanConfig cfg =
> mapping.getModuleConfig().findFormBeanConfig(name);
> form =(DynaActionForm)
>
DynaActionFormClass.createDynaActionFormClass(cfg).newInstance();
> 
> The cfg object has the properties for my dyna bean, but I get:
> java.lang.IllegalArgumentException: ActionForm is not dynamic
>   at
>
org.apache.struts.config.FormBeanConfig.getDynaActionFormClass(FormBeanConfig.java:84)
>   at
>
org.apache.struts.action.DynaActionFormClass.createDynaActionFormClass(DynaActionFormClass.java:232)
> 
> Here is my method signature:
> public void formDataCopy(ActionMapping mapping,
>  HttpServletRequest request,
>  ActionForm form,
>          String name)
> 
> 
> =
> 
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Appriss, Inc.
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
> 
> 
> 
>   
> __ 
> Do you Yahoo!? 
> The all-new My Yahoo! - Get yours free! 
> http://my.yahoo.com 
>  
> 
> 
>
-----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Trying to create a form object in code

2005-02-17 Thread Norris Shelton
FormBeanConfig cfg =
mapping.getModuleConfig().findFormBeanConfig(name);
form =(DynaActionForm)
DynaActionFormClass.createDynaActionFormClass(cfg).newInstance();

The cfg object has the properties for my dyna bean, but I get:
java.lang.IllegalArgumentException: ActionForm is not dynamic
at
org.apache.struts.config.FormBeanConfig.getDynaActionFormClass(FormBeanConfig.java:84)
at
org.apache.struts.action.DynaActionFormClass.createDynaActionFormClass(DynaActionFormClass.java:232)

Here is my method signature:
public void formDataCopy(ActionMapping mapping,
 HttpServletRequest request,
 ActionForm form,
 String name)


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



Can forms inherit from other forms

2005-02-10 Thread Norris Shelton
I ran across this article

http://webdeveloper.earthweb.com/repository/javascripts/2003/12/341171/cssscroll.html

Has something like this every been implemented in the standard
code?  maybe an inherit property.

I have 3 forms (LazyValidatorForm)and they all have to have
default  the same fields or have the same fields defined as
string arrays.

=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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



Re: OT: Problem with checkbox - now javascript problem

2005-02-10 Thread Norris Shelton
having a checkbox with the same name as a hidden field prevented
the value from being evaluated.   This was solved by putting the
script directly into the onclick method.

onclick=" if (this.checked == true) {
  
document.getElementById('${recordType.name}Box').style.display='block';
} else {
  
document.getElementById('${recordType.name}Box').style.display='none';
}"

This forced me to define a hidden area for all the properties,
but that was easier than investing more time.

--- Norris Shelton <[EMAIL PROTECTED]> wrote:

> Dang it.  This is not going to work for me.  I have a check
> box.
>  If the check box is checked, I have some javascript looking
> for
> the click event.  If the check box has a .checked = true.  I
> change div's display value to block, else to none.  So, you
> check the check box and some radio buttons show up, else they
> disappear.
> 
> If I put the hidden field, then the javascript returns an
> undefined value.  Any ideas on how to solve this.  Here is
> what
> the html looks like:
> 
>  checked="checked" onclick="javascript:bookingBoxDisplay();">
> Bookings 
> 
> 
> 
> 
> <!--
>function bookingBoxDisplay(){
>   if (document.searchNameForm.recordTypebooking.checked) {
>
> document.getElementById('bookingBox').style.display='block';
>   } else {
>
> document.getElementById('bookingBox').style.display='none';
>   }
>}
> // -->
> 
> 
>  style="display:block;">
> value="all"
> checked="checked"> All 
> value="incarcerated"> Incarcerated Only
> 
> 
snipped...

=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

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



Re: OT: Problem with checkbox - now javascript problem

2005-02-10 Thread Norris Shelton
Dang it.  This is not going to work for me.  I have a check box.
 If the check box is checked, I have some javascript looking for
the click event.  If the check box has a .checked = true.  I
change div's display value to block, else to none.  So, you
check the check box and some radio buttons show up, else they
disappear.

If I put the hidden field, then the javascript returns an
undefined value.  Any ideas on how to solve this.  Here is what
the html looks like:


Bookings 




<!--
   function bookingBoxDisplay(){
  if (document.searchNameForm.recordTypebooking.checked) {
   
document.getElementById('bookingBox').style.display='block';
  } else {
   
document.getElementById('bookingBox').style.display='none';
  }
   }
// -->



All 
Incarcerated Only



--- Norris Shelton <[EMAIL PROTECTED]> wrote:

> Now I see clearer what you were saying.  I found this in the
> java forums.
> 
>
http://forum.java.sun.com/thread.jspa?threadID=242031&messageID=2946045
> 
> It worked like a charm.
> 
> I wonder why the html:checkbox docs don't mention this.
> 
> Thanks for your help.
> 
> --- Cédric Levieux <[EMAIL PROTECTED]> wrote:
> 
> > Because when you uncheck a checkbox you don't send this
> field
> > and the
> > form process let the previous value in place
> > 
> > One of tips of mine is to put a hidden field with the same
> > name and to
> > see the field as an array : when it contains only one value
> > the
> > checkbox is unchecked, checked otherwise
> > 
> > Hope it will help,
> > 
> > Cedric
> > 
> > 
> > On Tue, 8 Feb 2005 13:58:22 -0800 (PST), Norris Shelton
> > <[EMAIL PROTECTED]> wrote:
> > > I have a checkbox drawn by:
> > >  > > onclick="javascript:${recordType.name}BoxDisplay();"
> />
> > > ${recordType.description} 
> > > 
> > > The form is defined as:
> > >  > > type="org.apache.struts.validator.LazyValidatorForm" >
> > > ...
> > > 
> > >  > > type="java.lang.Boolean" initial="true"/>
> > > ...
> > > 
> > > 
> > > The check box displays correct and even defaults.  If I
> > uncheck
> > > the box and submit, when it failes validation, it is still
> > > checked.
> > > 
> > > =
> > > 
> > > Norris Shelton
> > > Software Engineer
> > > Sun Certified Java 1.1 Programmer
> > > Appriss, Inc.
> > > ICQ# 26487421
> > > AIM NorrisEShelton
> > > YIM norrisshelton
> > > 
> > > __________
> > > Do you Yahoo!?
> > > Meet the all-new My Yahoo! - Try it today!
> > > http://my.yahoo.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]
> > 
> > 
> 
> 
> =
> 
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Appriss, Inc.
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection
> around 
> http://mail.yahoo.com 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Problem with checkbox

2005-02-10 Thread Norris Shelton
Now I see clearer what you were saying.  I found this in the
java forums.

http://forum.java.sun.com/thread.jspa?threadID=242031&messageID=2946045

It worked like a charm.

I wonder why the html:checkbox docs don't mention this.

Thanks for your help.

--- Cédric Levieux <[EMAIL PROTECTED]> wrote:

> Because when you uncheck a checkbox you don't send this field
> and the
> form process let the previous value in place
> 
> One of tips of mine is to put a hidden field with the same
> name and to
> see the field as an array : when it contains only one value
> the
> checkbox is unchecked, checked otherwise
> 
> Hope it will help,
> 
> Cedric
> 
> 
> On Tue, 8 Feb 2005 13:58:22 -0800 (PST), Norris Shelton
> <[EMAIL PROTECTED]> wrote:
> > I have a checkbox drawn by:
> >  > onclick="javascript:${recordType.name}BoxDisplay();" />
> > ${recordType.description} 
> > 
> > The form is defined as:
> >  > type="org.apache.struts.validator.LazyValidatorForm" >
> > ...
> > 
> >  > type="java.lang.Boolean" initial="true"/>
> > ...
> > 
> > 
> > The check box displays correct and even defaults.  If I
> uncheck
> > the box and submit, when it failes validation, it is still
> > checked.
> > 
> > =
> > 
> > Norris Shelton
> > Software Engineer
> > Sun Certified Java 1.1 Programmer
> > Appriss, Inc.
> > ICQ# 26487421
> > AIM NorrisEShelton
> > YIM norrisshelton
> > 
> > __
> > Do you Yahoo!?
> > Meet the all-new My Yahoo! - Try it today!
> > http://my.yahoo.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]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: How do I prefill a form

2005-02-09 Thread Norris Shelton
My the action method that I call before visiting the form is as
follows:
if (form == null) {
 form = new LazyValidatorForm();
}
CommonTools.formDataCopy(request, form);
request.setAttribute("searchNameForm", form);
return mapping.findForward("searchName");

The form is always null.  I guess that is because the form has
not been visited.  I create the lazy form (still working on
using the form bean config to do this).  I call a helper method
that retrieves my formData object from the session (creating and
storing if it is not already there) and copies it's contents
into the current form object.

I then set that object to the request using the name that the
action uses.  

Voila.  It works great.


--- Norris Shelton <[EMAIL PROTECTED]> wrote:

> I am using a LazyValidatorForm for each area of my site.  They
> want information entered on a form in one part of the site to
> be
> the default value when a form in another part of the site is
> displayed.  I am accumulating the information that is entered
> in
> a session bean.  

=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

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



RE: How do I prefill a form

2005-02-09 Thread Norris Shelton
Sorry, I was using the wrong form.  It should have been a
LazyValidatorForm.

--- Marco Mistroni <[EMAIL PROTECTED]> wrote:

> Hello,
>   What does the  getFormData method return?
> It should be a  bean with exactly the same properties as your
> dynavalidatoraction form..
> 
> 
> Regards
>   marco
> 
> -Original Message-
> From: Norris Shelton [mailto:[EMAIL PROTECTED] 
> Sent: 09 February 2005 17:08
> To: Struts Users Mailing List; Dakota Jack
> Subject: Re: How do I prefill a form
> 
> Here is the entire contents of my init method:
> if (form == null) {
>  form = new DynaValidatorActionForm();
> }
> CommonTools.formDataCopy(request, form);
> return mapping.findForward("searchName");
> 
> If I break on the CommonTools line and put my mouse on the
> form,
> I see form is not null, but is empty.
> 
> The contents of the formDataCopy method is:
> BeanUtils.copyProperties(object, getFormData(request));
> 
> The getFormData method retrieves the "formData" bean from the
> request.  The bean exists and has the previously entered
> information.
> 
> If I let the request run it's couse, I get an error message:
> 
> 12:04:26,098 WARN  [RequestProcessor] Unhandled Exception
> thrown: class java.lang.NullPointerException
> java.lang.NullPointerException
>   at
>
org.apache.commons.beanutils.PropertyUtils.isWriteable(PropertyUtils.jav
> a:1285)
>   at
>
org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:259
> )
>   at
>
com.appriss.jxportal.CommonTools.formDataCopy(CommonTools.java:281)
>   at
>
com.appriss.jxportal.search.SearchAction.nameInit(SearchAction.java:47)
> 
> 
> CommonTools.java:281 is the BeanUtils.copyProperties line.  It
> seems like I am not creating the form correctly.
> 
> --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> 
> > 
> > On Wed, 9 Feb 2005 08:04:44 -0800 (PST), Norris Shelton
> > <[EMAIL PROTECTED]> wrote:
> > > I am using a LazyValidatorForm for each area of my site. 
> > They
> > > want information entered on a form in one part of the site
> > to be
> > > the default value when a form in another part of the site
> is
> > > displayed.  I am accumulating the information that is
> > entered in
> > > a session bean.  I then tried to copy that to the form for
> > the
> > > current action before it is displayed.  The form comes in
> as
> > > null.  I then tried to create a new form it it's null, but
> > it
> > > gets a NPE on the toString() method.
> > > 
> > > Is there a way to do this?
> > > 
> > 
> > 
> > If you showed a bit of your code, that would tell us what
> you
> > are
> > doing.  This is fairly simple, actually.  Where you get the
> > information for the second form is rather beside the point. 
> > If you
> > have the information and a way to store it on the form and
> do
> > so in
> > your action  then the information will be there.  So, you
> need
> > to show
> > us what you are doing.  My guess is that the data stored is
> > null. 
> > But, without seeing your code, I cannot tell for sure.
> > 
> > Jack
> > 
> > -- 
> > "You can lead a horse to water but you cannot make it float
> on
> > its back."
> > "Heaven has changed.  The Sky now goes all the way to our
> > feet.
> > 
> > ~Dakota Jack~
> > 
> > "This message may contain confidential and/or privileged
> > information.
> > If you are not the addressee or authorized to receive this
> for
> > the
> > addressee, you must not use, copy, disclose, or take any
> > action based
> > on this message or any information herein. If you have
> > received this
> > message in error, please advise the sender immediately by
> > reply e-mail
> > and delete this message. Thank you for your cooperation."
> > 
> >
>
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> =
> 
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Appriss, Inc.
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
> 
> 
> 
>   
> __ 
> Do you Yahoo!? 
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.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]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

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



Re: How do I prefill a form

2005-02-09 Thread Norris Shelton
Oopsie, that should have been LazyValidatorForm.  That was part
of my problem.  Thx.

I took a look at using the FBC, but I was very clumsy.  What
would I put as the ActionServlet in
createActionForm(ActionServlet)?

BTW, I was able to get it to work.  However, I would rather have
it work correctly if possible.


--- Joe Germuska <[EMAIL PROTECTED]> wrote:

> At 9:08 AM -0800 2/9/05, Norris Shelton wrote:
> >Here is the entire contents of my init method:
> >if (form == null) {
> >  form = new DynaValidatorActionForm();
> >}
> 
> You can never simply instantiate a DynaBean and use it; it
> needs to 
> be configured to know what it's properties are.  (Well, the 
> LazyDynaBean is changing this, but...)
> 
> You should use Struts' normal mechanisms for looking up a form
> bean 
> instance.  Since Struts 1.2.1, the FormBeanConfig object has
> acted as 
> a "factory" for beans, so this means looking up the FBC object
> and 
> calling it's "createActionForm(ActionServlet)" method.
> 
> ModuleConfig has a findFormBeanConfig(String) method; you get
> the 
> current ModuleConfig by calling 
> ModuleUtils.getInstance().getModuleConfig(HttpServletRequest, 
> ServletContext);
> 
> Hope that helps.
> 
> Joe
> 
> -- 
> Joe Germuska
> [EMAIL PROTECTED]  
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"  -The Ex
> 
>
---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250

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



Re: How do I prefill a form

2005-02-09 Thread Norris Shelton
Here is the entire contents of my init method:
if (form == null) {
 form = new DynaValidatorActionForm();
}
CommonTools.formDataCopy(request, form);
return mapping.findForward("searchName");

If I break on the CommonTools line and put my mouse on the form,
I see form is not null, but is empty.

The contents of the formDataCopy method is:
BeanUtils.copyProperties(object, getFormData(request));

The getFormData method retrieves the "formData" bean from the
request.  The bean exists and has the previously entered
information.

If I let the request run it's couse, I get an error message:

12:04:26,098 WARN  [RequestProcessor] Unhandled Exception
thrown: class java.lang.NullPointerException
java.lang.NullPointerException
at
org.apache.commons.beanutils.PropertyUtils.isWriteable(PropertyUtils.java:1285)
at
org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:259)
at
com.appriss.jxportal.CommonTools.formDataCopy(CommonTools.java:281)
at
com.appriss.jxportal.search.SearchAction.nameInit(SearchAction.java:47)


CommonTools.java:281 is the BeanUtils.copyProperties line.  It
seems like I am not creating the form correctly.

--- Dakota Jack <[EMAIL PROTECTED]> wrote:

> 
> On Wed, 9 Feb 2005 08:04:44 -0800 (PST), Norris Shelton
> <[EMAIL PROTECTED]> wrote:
> > I am using a LazyValidatorForm for each area of my site. 
> They
> > want information entered on a form in one part of the site
> to be
> > the default value when a form in another part of the site is
> > displayed.  I am accumulating the information that is
> entered in
> > a session bean.  I then tried to copy that to the form for
> the
> > current action before it is displayed.  The form comes in as
> > null.  I then tried to create a new form it it's null, but
> it
> > gets a NPE on the toString() method.
> > 
> > Is there a way to do this?
> > 
> 
> 
> If you showed a bit of your code, that would tell us what you
> are
> doing.  This is fairly simple, actually.  Where you get the
> information for the second form is rather beside the point. 
> If you
> have the information and a way to store it on the form and do
> so in
> your action  then the information will be there.  So, you need
> to show
> us what you are doing.  My guess is that the data stored is
> null. 
> But, without seeing your code, I cannot tell for sure.
> 
> Jack
> 
> -- 
> "You can lead a horse to water but you cannot make it float on
> its back."
> "Heaven has changed.  The Sky now goes all the way to our
> feet.
> 
> ~Dakota Jack~
> 
> "This message may contain confidential and/or privileged
> information.
> If you are not the addressee or authorized to receive this for
> the
> addressee, you must not use, copy, disclose, or take any
> action based
> on this message or any information herein. If you have
> received this
> message in error, please advise the sender immediately by
> reply e-mail
> and delete this message. Thank you for your cooperation."
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

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



How do I prefill a form

2005-02-09 Thread Norris Shelton
I am using a LazyValidatorForm for each area of my site.  They
want information entered on a form in one part of the site to be
the default value when a form in another part of the site is
displayed.  I am accumulating the information that is entered in
a session bean.  I then tried to copy that to the form for the
current action before it is displayed.  The form comes in as
null.  I then tried to create a new form it it's null, but it
gets a NPE on the toString() method.

Is there a way to do this?

=====

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

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



Problem with checkbox

2005-02-08 Thread Norris Shelton
I have a checkbox drawn by:

${recordType.description} 


The form is defined as:

 ...
 
 
 ...


The check box displays correct and even defaults.  If I uncheck
the box and submit, when it failes validation, it is still
checked.


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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



Re: How do I default information based upon user information?

2005-02-07 Thread Norris Shelton
That will work.  I was going to have to perform some
preprocessing for the form anyway.

Thx.

--- Wendy Smoak <[EMAIL PROTECTED]> wrote:

> From: "Norris Shelton" <[EMAIL PROTECTED]>
> 
> > I have a lazy validator form that I need to default the
> value to
> > be one of 2 values, based upon information about the user.
> >
> > Is this something I can do on the actualy JSP page by using
> a
> > logic  tag and setting the value if it's unset?
> 
> You probably could do it in the JSP, but IMO it would best be
> done in the
> Action, before forwarding to the JSP.  Isn't it similar to
> pre-populating
> the form from a database record before displaying it for the
> first time?
> 
> -- 
> Wendy Smoak
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



How do I default information based upon user information?

2005-02-07 Thread Norris Shelton
I have a lazy validator form that I need to default the value to
be one of 2 values, based upon information about the user.  

Normally I would just default the value in the form declaration.
 

Is this something I can do on the actualy JSP page by using a
logic  tag and setting the value if it's unset?

=====

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: question about form buttons

2005-02-02 Thread Norris Shelton
I eventually struggled through this.  Here is what I ended up
with:









clearFields is a js method that knows the default values for a
blank form.

--- Norris Shelton <[EMAIL PROTECTED]> wrote:

> I need 3 buttons 
> 1) normal submit button - works correctly - yeah
> 
> 
> 
> 2) reset button - press this and any changes since the last
> form
> submit are removed
> Tried (displayed image, but submitted:
> 
> used (resets correctly, but no image:
> 
> 
> 3) clear button - runs some javascript to blank all of the
> fields.
> Displays image correctly, clears form, but submits.
>  onclick="clearFields();return false;"/>
> A complicating factor is that all of these need to be images.
> 
> =
> 
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Appriss, Inc.
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
> 
> 
> 
>   
> __ 
> Do you Yahoo!? 
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250
> 
>
---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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



question about form buttons

2005-01-31 Thread Norris Shelton
I need 3 buttons 
1) normal submit button - works correctly - yeah



2) reset button - press this and any changes since the last form
submit are removed
Tried (displayed image, but submitted:

used (resets correctly, but no image:


3) clear button - runs some javascript to blank all of the
fields.
Displays image correctly, clears form, but submits.

A complicating factor is that all of these need to be images.

=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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



Re: html:options

2005-01-28 Thread Norris Shelton
I am using a LazyValidatorForm as my backing bean.  I assumed
that it would be able to handle them automatically, but you got
me to thinking.  I added in the String[] declaration and it
works great.


   
  
  
  
  
   


--- Eddie Bush <[EMAIL PROTECTED]> wrote:

> Are you getting any interesting debug statements?
> 
> Looks to me like the form should be properly populated, even
> if
> validation failed.  What type of field are the values being
> put into? 
> If you're looking for multiples, I imagine you're putting them
> into a
> String array?


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: html:options

2005-01-28 Thread Norris Shelton
That was it exactly.  Thx.

Now I have another question.  My box is a multi select.  If
there is a validation error, only the first option will still be
selected.


--- Kishore Senji <[EMAIL PROTECTED]> wrote:

> On Fri, 28 Jan 2005 16:53:16 -0800 (PST), Norris Shelton
> <[EMAIL PROTECTED]> wrote:
> > Here is what I have in the JSP tag file:
> > 
> >> multiple="true">
> >   > labelProperty="description" />
> 
> collection attribute takes a name which holds the Collection
> and not
> the collection itself. Assuming that your list is set under
> the name
> "state", your collection attribute should be
> collection="state" and
> not collection="${state}"
> 
> >   
> > 
> > 
> > state is a simple tag that makes a List of State objects
> > available to the page.  I tried setting them as a page scope
> > attribute and a request scope attribute.  I always get the
> > following message:
> > 
> > javax.servlet.jsp.JspException: Cannot find bean under name
> > [EMAIL PROTECTED],
> > [EMAIL PROTECTED],
> > [EMAIL PROTECTED],
> > [EMAIL PROTECTED],
> > [EMAIL PROTECTED],
> > [EMAIL PROTECTED],
> > [EMAIL PROTECTED],
> > [EMAIL PROTECTED]
> > 
> > =
> > 
> > Norris Shelton
> > Software Engineer
> > Sun Certified Java 1.1 Programmer
> > Appriss, Inc.
> > ICQ# 26487421
> > AIM NorrisEShelton
> > YIM norrisshelton
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Mail - now with 250MB free storage. Learn more.
> > http://info.mail.yahoo.com/mail_250
> > 
> >
>
---------
> > 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]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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



Re: html:options

2005-01-28 Thread Norris Shelton
The ${formName} is in fact a variable that holds the name of the
form.  Kishore Senji's solution was what I needed.

--- Eddie Bush <[EMAIL PROTECTED]> wrote:

> Seems to me you have the form name incorrect?  is 'formName'
> the name
> of the form, or is it a String holding the name of the form?
> 
> I think you'd find it easier to populate your list in an
> action.
> 
> Perhaps you meant to put:
> 
>  multiple="true">
> 
> If "formName" (above) is the name of your form, I think this
> is what
> you're aiming for.  Otherwise, supposing you're using the
> html-el
> tags, you're going to wind up with the value of the variable
> "formName" (presumably an object) evaluated as a String ...
> which
> probably isn't what you're after.
> 
> HTH
> 
> On Fri, 28 Jan 2005 16:53:16 -0800 (PST), Norris Shelton
> <[EMAIL PROTECTED]> wrote:
> > javax.servlet.jsp.JspException: Cannot find bean under name
> 
> -- 
> Eddie Bush
> 
>
-----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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



html:options

2005-01-28 Thread Norris Shelton
Here is what I have in the JSP tag file:

   
  
   


state is a simple tag that makes a List of State objects
available to the page.  I tried setting them as a page scope
attribute and a request scope attribute.  I always get the
following message:

javax.servlet.jsp.JspException: Cannot find bean under name
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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



Re: Problem using logic:equal and logic:notEqual

2005-01-27 Thread Norris Shelton
I was missing name.  I was a little leary, because the form name
would depend on which form I was included on at the time.  I
changed the file to a tag file and sent the form name as a
parameter.  This worked perfectly:


 


 


Thx for your help.

--- Wendy Smoak <[EMAIL PROTECTED]> wrote:

> From: "Norris Shelton" <[EMAIL PROTECTED]>
> > I'm trying to determine which block of HTML to output.  This
> is
> > on a page that will be included by many different forms.
> >
> > 
> >  
> > 
> > 
> >  
> > 
> >
> > javax.servlet.jsp.JspException: No selector attribute
> > (cookie/header/name/parameter) was specified
> 
> http://struts.apache.org/userGuide/struts-logic.html#equal
> 
> Your logic:equal tag is missing an attribute, either cookie,
> header, name,
> or parameter.  Given that you're using 'property', you need to
> tell it the
> 'name' of the bean that has this property.  (Logic tags do not
> default to an
> enclosing  bean the way the html tags do.)
> 
> How about
>">
> 
> -- 
> Wendy Smoak
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

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



Problem using logic:equal and logic:notEqual

2005-01-27 Thread Norris Shelton
I'm trying to determine which block of HTML to output.  This is
on a page that will be included by many different forms.  


 


 



Anybody have a suggestion?


Here is the beginning of the exception:
javax.servlet.jsp.JspException: No selector attribute
(cookie/header/name/parameter) was specified
18:23:07,500 ERROR [Engine] StandardWrapperValve[jsp]:
Servlet.service() for servlet jsp threw exception
at
org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:205)
at
org.apache.struts.taglib.logic.EqualTag.condition(EqualTag.java:46)
at
org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagBase.java:174)
at
org.apache.jsp.tag.web.location_tag._jspx_meth_logic_equal_0(location_tag.java:216)
javax.servlet.jsp.JspException: No selector attribute
(cookie/header/name/parameter) was specified

=====

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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



Complex validation - comparing dates

2005-01-26 Thread Norris Shelton
I'm trying to ensure that the start date is less than the end
date.




test
((endDate > startDate) or (*this*
== null))




I already have validations to ensure that they are valid dates
(before this).

Nothing happens.  Any suggestions?

=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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



Is there a way to determine if there is an error message for a specific property

2005-01-26 Thread Norris Shelton
I wanted to change the background color of fields that have a
validation error to red.

Is there something that I can check to see if there is a message
related to a specific field?



=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

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



Re: Validation is not working for me

2005-01-25 Thread Norris Shelton
Thank you so much for your help.  

I found the problem.  I saw in an article how the
validatorPlugin was defined with a set-property
property="pathnames" for the validation.xml and the
validator-rules.xml.

Either that does not work or I did it wrong.  I went back to
having a comma separated list.  It's ugly, but it works:
  
  
  



--- Kishore Senji <[EMAIL PROTECTED]> wrote:

> On Mon, 24 Jan 2005 18:38:18 -0800 (PST), Norris Shelton
> <[EMAIL PROTECTED]> wrote:
> > It looks like they are set-up, but nothing happens.  It goes
> > right into my dispatch action method.
> > 
> > If I submit the form with nothing entered, it goes into the
> add
> > method.  It was working last night, but 
> 
> I would check the following things:
> 
> * Make sure that the validation plugin is defined
> * Make sure that "watchForm" extends ValidatorForm and not
> ValidatorActionForm
> * Make sure that the validate method calls the
> super.validate() and
> takes the errors into account, if the validate method is
> overridden
> 
> > 
> > Here is my form action: (it works)
> > watchActionAdd.do?method=add
> > 
> > Here is the form declaration:
> > >parameter="method"
> >type="com.appriss.jxportal.watch.WatchAction"
> >name="watchForm"
> >scope="request"
> >validate="true"
> >input="/watch/watchAdd.jsp">
> > > path="/watch/watchView.jsp" contextRelative="true"/>
> >
> > 
> > Here is the validation declaration:
> >
> >
> > > depends="required,minlength">
> >
> > > resource="false"/>
> >
> >minlength
> >2
> >        
> >
> > > depends="required,minlength">
> >
> >
> >
> >
> >
> >datePattern
> >MM/dd/
> >
> >
> >
> >
> > 
> > It acts as if there is no validation turned on.
> > 
> > =
> > 
> > Norris Shelton
> > Software Engineer
> > Sun Certified Java 1.1 Programmer
> > Appriss, Inc.
> > ICQ# 26487421
> > AIM NorrisEShelton
> > YIM norrisshelton
> > 
> > __
> > Do you Yahoo!?
> > Take Yahoo! Mail with you! Get it on your mobile phone.
> > http://mobile.yahoo.com/maildemo
> > 
> >
>
-
> > 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]
> 
> 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

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



Validation is not working for me

2005-01-24 Thread Norris Shelton
It looks like they are set-up, but nothing happens.  It goes
right into my dispatch action method.

If I submit the form with nothing entered, it goes into the add
method.  It was working last night, but 

Here is my form action: (it works)
watchActionAdd.do?method=add

Here is the form declaration:




Here is the validation declaration:






minlength
2








datePattern
MM/dd/






It acts as if there is no validation turned on.


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 

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