Struts Tag -

2006-06-05 Thread J Gotsch
  Looking at the documentation, it's not clear on how I can use the 

  .
   
  Now, which of the following three is the correct syntax for the match 
comparing?
   
   
value="ABC"> 
   

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

Re: JSP TAG Issue - can't find bean in JSP!

2006-05-21 Thread J Gotsch
Can Anyone tell me If I can compare my hardcoded value to a variable as I'm 
doing here. 

J Gotsch <[EMAIL PROTECTED]> wrote:  Hello,
I am trying to compare 2 values within a JSP using a logic:match tag as 
illustrated below:



name="" value=""> 


//note that LookupConstants.SUPER returns "SUPER". 

However, I get the following error whenever accessing the JSP:

2006-05-21 14:44:17,700 [HttpRequestHandler-1635615] ERROR 
org.apache.struts.taglib.tiles.InsertTag.doEndTag - ServletExcept
ion in '/WEB-INF/pages/menu.jsp': Cannot find bean: "SUPER" in any scope.

Can you please let me know what I'm doing wrong? How can I use the menuRole 
variable in a compare tag?


-
Sneak preview the all-new Yahoo.com. It's not radically different. Just 
radically better. 


-
Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone.  Get Yahoo! 
Messenger with Voice

Re: JSP TAG Issue - can't find bean in JSP!

2006-05-21 Thread J Gotsch
I think the issue is the name attribute. 

Martin Gainty <[EMAIL PROTECTED]> wrote:  Straight from the doc-
The tag perform a pattern matching operation on the 
variable specified in the tag
where value would be some hardcoded string or you can compare to a property
I am not familiar with the implementation of a bean (attribute) in the value 
clause
Anyone else?

Martin-

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.

- Original Message - 
From: "J Gotsch" 
To: "Struts Users Mailing List" 
Sent: Sunday, May 21, 2006 6:40 PM
Subject: JSP TAG Issue - can't find bean in JSP!


> Hello,
> I am trying to compare 2 values within a JSP using a logic:match tag as 
> illustrated below:
>
> 
> 
> > name="" value="">
> 
>
> //note that LookupConstants.SUPER returns "SUPER".
>
> However, I get the following error whenever accessing the JSP:
>
> 2006-05-21 14:44:17,700 [HttpRequestHandler-1635615] ERROR 
> org.apache.struts.taglib.tiles.InsertTag.doEndTag - ServletExcept
> ion in '/WEB-INF/pages/menu.jsp': Cannot find bean: "SUPER" in any scope.
>
> Can you please let me know what I'm doing wrong? How can I use the 
> menuRole variable in a compare tag?
>
>
> -
> Sneak preview the all-new Yahoo.com. It's not radically different. Just 
> radically better. 

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




-
Be a chatter box. Enjoy free PC-to-PC calls  with Yahoo! Messenger with Voice.

JSP TAG Issue - can't find bean in JSP!

2006-05-21 Thread J Gotsch
  Hello,
  I am trying to compare 2 values within a JSP using a logic:match tag as 
illustrated below:
   
  <% String menuRole = null; %>
  <% menuRole="SUPER" %>
   
  
   
  //note that LookupConstants.SUPER returns "SUPER". 
   
  However, I get the following error whenever accessing the JSP:
   
  2006-05-21 14:44:17,700 [HttpRequestHandler-1635615] ERROR 
org.apache.struts.taglib.tiles.InsertTag.doEndTag - ServletExcept
  ion in '/WEB-INF/pages/menu.jsp': Cannot find bean: "SUPER" in any scope.
   
  Can you please let me know what I'm doing wrong?  How can I use the menuRole 
variable in a compare tag?


-
Sneak preview the  all-new Yahoo.com. It's not radically different. Just 
radically better. 

- Design Issue with Struts Validation

2006-05-16 Thread J Gotsch
When I go to a page for the 1st time, the validation takes affect. Obviously I 
don't want that, I only want to validate upon submitting.  How do I get around 
this? 
   
  My form extends ValidatorActionForm
   
  My Action Mapping in Struts-Config:
   
  
   

   


-
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

problem with using Tag and Scriplets together

2006-05-15 Thread J Gotsch
  Any idea how I can set a local JSP variable with the value of a bean property 
in a JSP?
   
  In the example below, I want to set tempRole to the value of the 
securityRoleName prperty.   But This is not working. 
   
   
  <% String tempRole = null; %>
   
   
  
  
  
 <% if (tempRole==null) { tempRole = %> securityRoleName <% ;} %> 
   


-
Get amazing travel prices for air and hotel in one click on Yahoo! FareChase 

Re: Conditional Statements (if/else) Using logic tag

2006-05-14 Thread J Gotsch
I guess my problem is larger than using an if/else statement. I figured how to 
do that, but I'm iterating over a List in the JSP, and want to be able to exit 
the loop whenever certain item exist. I don't suppose there's a way to do that, 
is there?
   
  My requirement in a nutshell: the List could have role1, role2, and role3. 
But I can only print one role on the screen. If the list has multiple roles, 
then my loop will show all of them. I want to be able to exit the loop after I 
find the role that I'm looking for. 
   
   
   
  Philihp Busby <[EMAIL PROTECTED]> wrote:
  Jerome is referring to tags in the JSTL Core tag library.








mmm code-bloat.

On 5/14/06, J Gotsch wrote:
> Which package does this belong to? I can't find it anywhere.
>
> Jerome Gagner 
wrote:
> use
>
> On 5/13/06, J Gotsch wrote:
> > Hello All,
> >
> > How do I perform an If/else with ?
> >
> > In the below logic:iterate tag, If my collection contains both ROLE1 AND 
> > ROLE2, Then both statements will be displayed. And that's now what I want.
> >
> > I want to implement something like this:
> >
> > if(securityRoleName.equals("ROLE1"))
> > // print You have ROLE1 !
> > else if (securityRoleName.equals("ROLE1"))
> > //print You have ROLE2 !
> > else
> > //print you have NO ROLE!
> >
> > This is what I have now:
> >
> > > property="xyz" scope="session">
> >
> > > property="securityRoleName" value="ROLE1">
> > You have ROLE1 !
> >
> > > property="securityRoleName" value="ROLE2">
> > You have ROLE1 !
> >
> > > property="securityRoleName">
> > You have no ROLE!
> >
> >
> >
> >
> >
> > -
> > Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! 
> > Messenger with Voice.
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min 
> with Yahoo! Messenger with Voice.
>



-
Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just 2¢/min 
with Yahoo! Messenger with Voice.

Re: Conditional Statements (if/else) Using logic tag

2006-05-13 Thread J Gotsch
Which package does this belong to? I can't find it anywhere.
   
  Jerome Gagner <[EMAIL PROTECTED]> wrote:
  use 

On 5/13/06, J Gotsch wrote:
> Hello All,
>
> How do I perform an If/else with ?
>
> In the below logic:iterate tag, If my collection contains both ROLE1 AND 
> ROLE2, Then both statements will be displayed. And that's now what I want.
>
> I want to implement something like this:
>
> if(securityRoleName.equals("ROLE1"))
> // print You have ROLE1 !
> else if (securityRoleName.equals("ROLE1"))
> //print You have ROLE2 !
> else
> //print you have NO ROLE!
>
> This is what I have now:
>
> > property="xyz" scope="session">
> 
> > property="securityRoleName" value="ROLE1">
> You have ROLE1 !
> 
> > property="securityRoleName" value="ROLE2">
> You have ROLE1 !
> 
> > property="securityRoleName">
> You have no ROLE!
> 
> 
> 
>
>
> -
> Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! 
> Messenger with Voice.
>

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




-
Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just 2¢/min 
with Yahoo! Messenger with Voice.

Struts Validation Guide and How-to:

2006-05-13 Thread J Gotsch
  Struts validation could be a pain. This how-to should help.
   
   
  
.
  How to enable struts validation:
   
  Make sure you have the following:
  1) ApplicationResources.properties file with keys/values for standard 
validators (at least - errors.required) 
  2) struts-config.xml file should contain the reference to this resource file 
for message-resources node. 
  3) struts-config plug-in node should contain validator Plugin 
className="org.apache.struts.validator.ValidatorPlugIn" 
  4) The plugin should have set-property with name pathnames that corresponds 
to validator files (such as /WEB-INF/validator-rules.xml and 
/WEB-INF/validation.xml)
  5) Action Validation vs. Form Validation. Alternative solutions:
  Solution A: 
  - Form Validation: validation.xml should contain form with name 
  that corresponds to form-bean name in struts-config.
  - Form Bean or its Parent should inherit 
  org.apache.struts.validator.ValidatorForm class
  Solution B (povides more flexibility):-
  - Form Validation: validation.xml should contain form with name that 
corresponds to action’s path name in struts-config.
  - Form Bean or its Parent should inherit org. 
apache.struts.validator.ValidatorActionForm.
   
  6) The form should have a field with property that corresponds to field name 
we want to validate. Nested properties are okay. 
  7) This field should have a 'depends' attribute that corresponds to the 
validator name mentioned in /WEB-INF/validator-rules.xml (i.e. 'required') 
  8) This field should have an arg0 node with attribute key that corresponds to 
existing key in application resource file 
  9) in action-mapping: 'input' attribute of action should reference to jsp 
page with validated form and validate should be set to true.
  12) jsp page should contains  (or its substitute) 
   
  File Compatibility:
  1) Make sure the validation-rules.xml and commons-validator.jar match. 
  The xml version and jar’s implementation version need to be compatible 
  2) Make sure your struts.jar version is compatible with the 
commons-validator.jar
  3 ) Compabitly issues will usually result in validation not working and no 
errors or warnings to trace the problem. To avoid issues, simply do not attempt 
to reuse other's validation.xml, validation-rules.xml, and 
commons-validator.jar files. Only use files that are packaged with your struts 
distribution zip/tar file. 


-
Blab-away for as little as 1¢/min. Make  PC-to-Phone Calls using Yahoo! 
Messenger with Voice.

Conditional Statements (if/else) Using logic tag

2006-05-13 Thread J Gotsch
Hello All,
   
  How do I perform an If/else with  ?
   
  In the below logic:iterate tag, If my collection contains both ROLE1 AND 
ROLE2, Then both statements will be displayed. And that's now what I want. 
   
  I want to implement something like this:
   
  if(securityRoleName.equals("ROLE1")) 
// print You have ROLE1 !
  else if (securityRoleName.equals("ROLE1"))
   //print You have ROLE2 !
  else 
   //print you have NO ROLE!
   
  This is what I have now:
   
   
 
   
 You have ROLE1 !
   
   
 You have ROLE1 !
   
   
You have no ROLE!
   
 
   


-
Blab-away for as little as 1¢/min. Make  PC-to-Phone Calls using Yahoo! 
Messenger with Voice.