RE: JspException: null in doStartTag() of form tag

2006-10-02 Thread Samere, Adam J
Can you post the stack trace from your application log along with the
version of struts you are using and the class ContactUsTestForm inherits
from?

Adam 

-Original Message-
From: Jennifer Jacobs [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 02, 2006 1:44 PM
To: user@struts.apache.org
Subject: JspException: null in doStartTag() of form tag


Hello,

I've created struts forms before with no problems, and have been working
with them for over a year, and I'm suddenly having a horrible time
creating a small test form, and I have no idea what I'm missing.  The
error that I'm getting is completely unhelpful:

javax.servlet.jsp.JspException: null

I've been able to debug and know that the error is occuring when doing
the
lookup() method in the doStartTag() method of the form tag.  It's like
it's not able to bring in the struts-config?

I feel like I've done everything possible to strip this down to the most
basic form possible, and I'm ripping my hair out trying to figure out
what's happening.

Here's my struts-config:

form-beans
form-bean name=MyForm
type=com.jaj.test.ContactUsTestForm/
/form-beans
action-mappings
action path=/test
type=com.jaj.test.ContactUsTestAction 
name=MyForm scope=session input=/contactTest.jsp
forward name=success path=/contactTest.jsp
redirect=true/
/action
/action-mappings

Here's my jsp:

html:form action=/test 
html:submit
Submit
/html:submit
/html:form

I can't make it any easier!  Anyone have any suggestions?

Thanks,
Jennifer

--
View this message in context:
http://www.nabble.com/JspException%3A-null-in-doStartTag%28%29-of-form-t
ag-tf2371322.html#a6606195
Sent from the Struts - User mailing list archive at Nabble.com.


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


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

Thank you. Paychex, Inc.


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



RE: Issue with MappingDispatchAction

2006-09-12 Thread Samere, Adam J
You could set the action of the single form using javascript in the
onclick event of the download button. LookupDispatchAction may be better
suited for what you are trying to do.

Adam 

-Original Message-
From: Ruepen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 12, 2006 2:44 PM
To: Struts Users Mailing List
Subject: Issue with MappingDispatchAction

Hello,

I am encountering some issues with using the MappingDispatchAction. The
situation is that we (developers) are using a base class that extends
MappingDispatchAction. Now I have a jsp page that has 2 buttons in it,
one is Search and the other is Download. Now the form action for the
Search button is mapped to, let's say, SubmitSearch.  Which works
fine and is mapped correctly in the struts-config.xml file.
Now I added another button called Download which downloads an item
after the search is completed. How would I go about getting the
Download button to map correctly to the same Action that is handling
the Search? By the way, the parameter for the SubmitSearch is of
course search in the action mapping of the struts-config.xml file,
which corresponds to a method named search in the Action that we are
using.  I added a download method where I handle all that's required
for the download in the Action.  I tried using 2 forms within the same
jsp, but it didn't work. I'll keep trying that.

Any help or insight is appreciated.



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


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

Thank you. Paychex, Inc.


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



RE: Field check using DynaValidatorForm

2006-09-07 Thread Samere, Adam J
You have validate=false in your action mapping. Change that to true.

Adam 

-Original Message-
From: leo mj [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 07, 2006 6:59 AM
To: user@struts.apache.org
Subject: Field check using DynaValidatorForm

hi all,

  I want to do Dynamic field check using validator framework.

I have done the following steps:

1.Add validator plugin in struts-config.xml

plug-in className=org.apache.struts.validator.ValidatorPlugIn
   set-property property=pathnames
value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/
   /plug-in

2.I have used index.jsp as my LOGIN page.

With the following code:


!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN %@
taglib uri=/WEB-INF/struts-html.tld prefix=html% %@ taglib
uri=/WEB-INF/struts-bean.tld prefix=bean% html:html HEAD %@
page language=java contentType=text/html; charset=ISO-8859-1
pageEncoding=ISO-8859-1%
META http-equiv=Content-Type content=text/html; charset=ISO-8859-1
META name=GENERATOR content=IBM Software Development Platform
META http-equiv=Content-Style-Type content=text/css LINK
href=theme/Master.css rel=stylesheet
type=text/css
TITLE/TITLE
/HEAD

BODY
html:errors/
html:form action=/submitLogin.do
TABLE border=0 cellpadding=0 cellspacing=0
TBODY
TR
TD/TD
TD/TD
TD/TD
TD/TD
TD width=28/TD
TD width=54/TD
TD width=68/TD
TD width=77/TD
TD width=89/TD
TD width=59/TD
/TR
TR
TD height=2/TD
TD height=2/TD
TD height=2/TD
TD height=2/TD
TD width=28 height=2/TD
TD width=54 height=2/TD
TD width=68 height=2/TD
TD width=77 height=2/TD
TD width=89 height=2/TD
TD width=59 height=2/TD
/TR
TR
TD height=20/TD
TD height=20/TD
TD height=20/TD
TD height=20/TD
TD width=28 height=20/TD
TD width=54 height=20/TD
TD width=68 height=20/TD
TD width=77 height=20/TD
TD width=89 height=20/TD
TD width=59 height=20/TD
/TR
TR
TD height=38/TD
TD height=38/TD
TD height=38/TD
TD height=38/TD
TD width=28 height=38/TD
TD width=54 height=38/TD
TD width=68 height=38/TD
TD width=77 height=38/TD
TD width=89 height=38/TD
TD width=59 height=38/TD
/TR
TR
TD/TD
TD/TD
TD/TD
TD/TD
TD width=28/TD
TD width=54/TD
TD width=68Name/TD
TD width=77html:text
property=username/html:text/TD
TD width=89/TD
TD width=59/TD
/TR
TR
TD height=65/TD
TD height=65/TD
TD height=65/TD
TD height=65/TD
TD width=28 height=65/TD
TD width=54 height=65/TD
TD width=68 height=65Password/TD
TD width=77 height=65html:password
property=password/html:password/TD
TD width=89 height=65/TD
TD width=59 height=65/TD
/TR
TR
TD height=20/TD
TD height=20/TD
TD height=20/TD
TD height=20/TD
TD width=28 height=20/TD
TD width=54 height=20/TD
TD width=68 height=20/TD
TD width=77 height=20/TD
TD width=89 height=20/TD
TD width=59 height=20/TD
/TR
TR
TD height=31/TD
TD height=31/TD
TD height=31/TD
TD height=31/TD
TD height=31 width=28/TD
TD height=31 width=54/TD
TD height=31 width=68/TD
TD height=31 width=77/TD
TD height=31 width=89html:submit
value=Submit/html:submit/TD
TD height=31 width=59/TD
/TR
TR
TD height=37/TD
TD height=37/TD
TD height=37/TD
TD height=37/TD
TD height=37 width=28/TD
TD height=37 width=54/TD
TD height=37 width=68/TD
TD height=37 width=77/TD
TD height=37 width=89/TD
TD height=37 width=59/TD
/TR
TR
TD height=38/TD
TD height=38/TD
TD height=38/TD
TD 

RE: [SERVLET_FILTERS]

2006-08-28 Thread Samere, Adam J
Short answer: Yes.

An instance of the filter-class will be created for each filter you define, 
regardless of how many times you reuse a filter class in a single deployment 
descriptor.

Adam 

-Original Message-
From: temp temp [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 28, 2006 3:13 PM
To: user@struts.apache.org
Subject: [SERVLET_FILTERS]

  filter
filter-nameSearchResultsFilter.CheckIn/filter-name
  
filter-classcom.reisys.fema.ndsp.web.filter.SearchResultsFilter/filter-class
  init-param
param-namereq_attribute_name/param-name
param-valuetaskInstances/param-value
  /init-param
/filter
filter-mapping
  filter-nameSearchResultsFilter.CheckIn/filter-name
  url-pattern/action/workflow/taskinstance/checkin.do/url-pattern
/filter-mapping
   
filter
filter-nameSearchResultsFilter.Assign/filter-name
  
filter-classcom.reisys.fema.ndsp.web.filter.SearchResultsFilter/filter-class
  init-param
param-namereq_attribute_name/param-name
param-valueworkInstances/param-value
  /init-param
/filter
filter-mapping
  filter-nameSearchResultsFilter.Assign/filter-name
  url-pattern/action/workflow/workinstance/assign.do/url-pattern
/filter-mapping
   
   
  I have a  servlet filter which should behave different based on  
parameter passed to it. Above is a mapping of  a filter with different names 
but the same Filter class  SearchResultsFilter to different urls's.
   
  The init  method of the filter  SearchResultsFilter.CheckIn  and 
SearchResultsFilter.Assign   will be common or different ? Suppose 
SearchResultsFilter.CheckIn is called first and in  the init method I 
initialize some variables and later SearchResultsFilter.Assign  is called at 
this time will the init method  be called again ?
   
   
   


-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.

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

Thank you. Paychex, Inc.


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



RE: what's initial in form-bean ?

2006-08-28 Thread Samere, Adam J
The initial attribute on the form-property allows you to initialize
the value of the property when the form instance is created by the
framework.

Adam

-Original Message-
From: A. Lotfi [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 28, 2006 3:15 PM
To: Struts Users Mailing List
Subject: what's initial in form-bean ?

what initial in this form bean means ?
   
   
  form-bean name=proposalPrint
type=edu.wmc.coeuslite.utils.DynaBeanList
 form-property name=listFormName type=java.lang.String
initial=sponsorTemplateForm/
/form-bean
   
  Thanks


-
Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail.

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

Thank you. Paychex, Inc.


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



RE: Struts Version from struts.jar

2006-08-09 Thread Samere, Adam J
Have a look at the manifest in the jar. META-INF/manifest.mf 

-Original Message-
From: Raghuveer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 09, 2006 9:10 AM
To: user@struts.apache.org
Subject: Struts Version from struts.jar

I have struts.jar in WEB-INF/lib folder.
How to find which version of struts  is being used by my web application
?

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


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

Thank you. Paychex, Inc.


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



RE: Validator not getting called and I can't see why

2006-08-04 Thread Samere, Adam J
Sure you can, just follow Eric's example and subclass DynaValidatorForm.
Then change your form-bean declaration to
form-bean name=createStudentGroupForm
type=view.struts.forms.Page_6_Form
...
/form-bean

Adam

-Original Message-
From: Bart Busschots [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 04, 2006 10:41 AM
To: Struts Users Mailing List
Subject: Re: Validator not getting called and I can't see why

Hi Eric,

Thanks for the reply but I'm using a DynaValidatorForm so I don't have a
class to override things in. I would assume that DynaValidatorForm
validates correctly because I use it all over the place. It's just this
one action that's not validating and I just can't see what's different
here.

Bart.



Givler, Eric wrote:
 Can you override the validate() method inside your form and just call
super.validate(), then see what the error collection has?
 At least then you know it was called, but may not have done what you
thought it should:

 package view.struts.forms;

 import javax.servlet.http.HttpServletRequest;

 import org.apache.log4j.Logger;
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.validator.DynaValidatorForm;

 public class Page_6_Form extends DynaValidatorForm {
private static Logger log = Logger.getLogger(Page_6_Form.class);

public ActionErrors validate(ActionMapping mapping, 
 HttpServletRequest request) {

   log.info( request.getRemoteUser() +  *** validate() - Start 
 ***);

   // step in here with debug   
   ActionErrors errors = super.validate(mapping, request);

   // look at results of errors object as watch on first test
   log.info( request.getRemoteUser() +  *** validate - End,
errors=  +
 ( errors == null ? 0 : errors.size()+ ) +  ***);  

   return ( errors );
} // validate

 } // Page_6_Form


 -Original Message-
 From: Bart Busschots [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 03, 2006 6:10 PM
 To: Struts Users Mailing List
 Subject: Validator not getting called and I can't see why


 I'm either missing something stupid (which is always possible) or I've

 managed to break the validator. I have an app that uses validator all 
 over the place and it's working fine in all my other actions but for 
 this one action it is simply not getting called.

 I can't see any difference between this action/form/validation and all

 the other ones that are working.

 This is the form:

   form-bean name=createStudentGroupForm 
 type=org.apache.struts.validator.DynaValidatorForm
form-property name=groupName type=java.lang.String /
form-property name=noStudents type=java.lang.String /
form-property name=groupType type=java.lang.String /
form-property name=wikiText type=java.lang.String /
form-property name=studentNames type=java.lang.String[] /
   /form-bean

 This is the action:

   action path=/mentor/createStudentGroupStep1 
 type=vtie.portal.mentor.CreateStudentGroupPrepareAction 
 name=createStudentGroupForm scope=session validate=true 
 input=/home/mentor/addStudentGroupForm.jsp
forward name=createAnonymous 
 path=/do/mentor/createAnonymousStudentGroup /
forward name=getStudentNames 
 path=/home/mentor/getStudentNamesForm.jsp /
forward name=fail path=/home/mentor/addStudentGroupForm.jsp /
   /action

 And this is the validation:

   form name=createStudentGroupForm
field property=groupName page=1 depends=required, mask
 varvar-namemask/var-namevar-value^[a-zA-Z]+[\w\
 ]*$/var-value/var
 arg0 key=mentor.createStudentGroup.groupName.label/
/field
field property=noStudents page=1 depends=required, integer
 arg0 key=mentor.createStudentGroup.noStudents.label/
/field
field property=studentNames page=2 depends=required
 arg0 key=mentor.createStudentGroup.studentNames.label/
/field
   /form

 Can anyone see something obviously wrong there?

 Cheers,

 Bart.

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


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

   


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


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

RE: Exposing an attribute using tiles

2006-08-03 Thread Samere, Adam J
Tiles assembles pages using dynamic (runtime) inclusion. The logic:iterate tag 
defines a page scoped attribute under the key specified by the id tag 
attribute. The nextPage.jsp will have it's own pageContext, so the 
outageElement is not visible. Perhaps you could put the outageElement into 
request scope... 

-Adam

-Original Message-
From: Per Jørgen Walstrøm [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 03, 2006 11:23 AM
To: Struts Users Mailing List
Subject: Exposing an attribute using tiles

hello list,
I have the following code:

tiles:insert definition=myLayout
   tiles:put name=body type=string
  logic:iterate id=outageElement name=searchForm 
property=region1Papers
 tiles:insert page=/nextPage.jsp flush=false/
  /logic:iterate
   /tiles:put
/tiles:insert

and my nextPage.jsp contains this:
bean:write name=outageElement property=name/

When I run my code, I get the following error:
17:18:42,768 ERROR [Engine] ApplicationDispatcher[/oweb] Servlet.service() for 
servlet jsp threw exception
javax.servlet.jsp.JspException: ServletException in 'nextPage.jsp': No bean 
found under attribute key outageElement

Does anyone know how I could make nextPage.jsp aware of the 'outageElement'? I 
have been experimenting with tiles:useAttribute and tiles:importAttribute, 
but just can't seem to get it to work...

Any suggestions would be highly appreciated!

cheers,
pj



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


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

Thank you. Paychex, Inc.


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



RE: Server side validation not working

2006-07-12 Thread Samere, Adam J
Did you set the input attribute on your action mapping in
struts-config.xml ? 

-Original Message-
From: Pankaj Gupta [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 12, 2006 8:55 AM
To: Struts Users Mailing List
Subject: Re: Server side validation not working

Yes I did.

Krishna, Hari wrote:
 did u put html:errors properly in jsp

 -Original Message-
 From: Pankaj Gupta [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 12, 2006 6:13 PM
 To: Struts Users Mailing List
 Subject: Server side validation not working


 Hi All,

 I am using server side validation in my application. The problem is 
 that when validate() returns an ActionErrors object, the page 
 displayed becomes blank. I have no clue as to why this is happening. 
 There is no javascript error or exception thrown.

 Pl Help.

 regards,
 Pankaj

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 Notice:  All email and instant messages (including attachments) sent 
 to or from Franklin Templeton Investments (FTI) personnel may be 
 retained, monitored and/or reviewed by FTI and its agents, or 
 authorized law enforcement personnel, without further notice or
consent.

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


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

Thank you. Paychex, Inc.


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



RE: Detection of process complete

2006-07-12 Thread Samere, Adam J
Since you are using Ajax, the returned value is not going to cause the
browser to navigate to a new page. You can parse the returned value and
manually direct the browser to a new page by setting the document
location.

// check status of ajax request, parse data
If not done
  ... Do nothing
If success
  document.location = mysuccessAction
Else
  document.location = myerrorAction
 
-Adam

-Original Message-
From: Paul McMahon [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 12, 2006 10:14 AM
To: Struts Users Mailing List
Subject: Detection of process complete

I am having problems getting an action to detect when an external
process is complete.

I have a navigation action class that kicks off the process and then
directs browser to a progress .jsp page.  redirect=false so control
stays with the navigation class. 

The progress .jsp page uses AJAX techniques to display ongoing progress,
by calling a progress URL that returns progress fields in XML to fill
in the progress .jsp page. The progress URL is mapped by Struts to a
progress action class/form to do this work.

The progress action returns success or fail mapping when the
process is complete. I expect this to go to a summary page as shown in
struts config below, but the browser stays on the progress page.

Here are my action mappings:
 action 
path=/RecoveryNavigation
type=com.plasmon.appliance.action.RecoveryNavigationAction
scope=session
name=RecoveryNavigationForm
validate=false
 
 forward name=nosession path=/Logout.do redirect=true /
 forward name=archives_exist
path=/appliance/recovery/Options.jsp 
redirect=false/
 forward name=clean_system 
path=/appliance/recovery/CleanOptions.jsp redirect=false/ 
 forward name=progress
path=/appliance/recovery/Progress.jsp 
redirect=false/
 forward name=cancel path=/Summary.do redirect=true/
 forward name=success path=/Summary.do redirect=true/
 forward name=fail path=/Summary.do redirect=true/

 /action

Note this action is only called from within AJAX javascript in the
Progress.jsp page:
 
 action 
input=/appliance/recovery/Progress.jsp
name=RecoveryProgressForm
path=/RecoveryProgress
scope=session
type=com.plasmon.appliance.action.RecoveryProgressAction
validate=false
 
 forward name=success path=/Summary.do redirect=true/
 forward name=fail path=/Summary.do redirect=true/
 /action

When RecoveryProgressAction returns mapping success or fail I would
expect redirection to Summary page but this is not happening.

Any ideas?

--
-Paul McMahon

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


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

Thank you. Paychex, Inc.


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



RE: Does validator work with Lookup dispatch action

2006-07-12 Thread Samere, Adam J
You can set the page attribute on your form validation definition, then
use client side script to set the page request parameter based on which
button is clicked.

You might want to look at MappingDispatchAction as well.

-Original Message-
From: David Durham [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 12, 2006 10:20 AM
To: Struts Users Mailing List
Subject: Re: Does validator work with Lookup dispatch action

mosho wrote:
 I have few concerns using lookupdispatch action, 1. Will I be able to 
 validate using struts validator?
 2. I need to validate only when next button is hit, is that possible?
 
 Is there any tutorial avialable for using lookup dispatch action.

I've done something similar by explicitly calling form.validate() from
within the execute method, but this has a bad smell.  Someone else
probably has a better approach.


-Dave


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


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

Thank you. Paychex, Inc.


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



RE: Action called multiple times

2006-07-11 Thread Samere, Adam J
Also, if you are submitting the request with script (i.e. onclick event
of a button) it's possible that the browser is submitting the form and
the call for the onclick. 

-Original Message-
From: Ulrich Elsner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 10:35 AM
To: Struts Users Mailing List
Subject: Re: Action called multiple times

Hi,

just to be sure: in the Action, you do a

return null;

if everything is successful?
Everything else looks ok [1] or at least shouldn't trick Struts into
rerunning the action. You might want to set the ContentType in the
response, though.

Ulrich

[1] that is, looks just like my code, which just works with no
complaints.

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


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

Thank you. Paychex, Inc.


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



RE: how do I use a LazyDynaBean as an ActionForm?

2006-07-11 Thread Samere, Adam J
The class specified by the type attribute in your form bean must be a
concrete implementation of org.apache.struts.action.ActionForm (as the
signature of the Action.execute method indicates). 

You can create your own implementation of ActionForm backed by a
LazyDynaBean, or try org.apache.struts.validator.LazyValidatorForm.

-Adam

-Original Message-
From: Yanroy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 12:39 PM
To: user@struts.apache.org
Subject: how do I use a LazyDynaBean as an ActionForm?


Hi,
You may recall I posted a message similar to this one several days ago.
I never received a reply, so I'm hoping that this shorter (and hopefully
simpler) version will get one.  I'm using a LazyDynaBean as the form
associated with a strut, which the docs seem to say will work by being
wrapped inside some other kind of ActionForm.  I haven't found any
examples online of exactly how to do this (none contain
struts-config.xml, strut and JSP all from the same app).  I'll give you
a couple lines from my
struts-config.xml:

form-bean 
name=AnalysisForm 
type=org.apache.commons.beanutils.LazyDynaBean
form-property 
name=runnableTables 
type=java.lang.Integer
initial=1 
/
/form-bean

I also specify some array fields in that bean, but I edited that out for
the sake of brevity.

I also have my action:

action
path=/AnalysisConfig
name=AnalysisForm

type=org.assistment.apps.newReporting.analysis.struts.AnalysisConfig
scope=request
parameter=method
/action

The real problem here is that I have no idea how to get the data out of
the LazyDynaBean.  In my action strut, the form parameter passed to the
handler is null.  To me, this indicates some kind of misconfiguration,
but I can't see what it could be.  I'd greatly appreciate any help you
can give... this problem is completely holding up my work (it's the last
part of the webapp I'm making).

Thank you very much,
Ryan

PS - If anyone cares, my previous message was titled ActionForm is null
when using dynabean
--
View this message in context:
http://www.nabble.com/how-do-I-use-a-LazyDynaBean-as-an-ActionForm--tf19
25661.html#a5273110
Sent from the Struts - User forum at Nabble.com.


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


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

Thank you. Paychex, Inc.


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



RE: how do I use a LazyDynaBean as an ActionForm?

2006-07-11 Thread Samere, Adam J
The class you are missing is part of the commons validator framework.
http://jakarta.apache.org/commons/validator/

commons-validator.jar is certainly a part of the core struts
distribution though. Make sure you include all the struts dependencies
for your version.

If all you need is to define ActionForms without writing concrete
ActionForm subclasses yourself you can use the
org.apache.struts.action.DynaActionForm. The lazy forms (DynaBean based)
allow you to get and set properties without defining them in the
form-bean declaration in struts-config.xml.

Adam

-Original Message-
From: Yanroy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 1:53 PM
To: user@struts.apache.org
Subject: RE: how do I use a LazyDynaBean as an ActionForm?


I've seen the LazyValidatorForm referenced on a number of websites.  I
actually tried it before I tried the LazyDynaBean, but it causes an
exception.  Apparently there's some related class missing?  Here's what
I get from tomcat when I try to use it:

java.lang.NoClassDefFoundError:
org/apache/commons/validator/ValidatorException

The rest of the stack trace seems to indicate it's coming from a JSP,
presumably the one my strut forwards to.  My understanding of
LazyValidatorForm is that it is now a full part of struts, so I assume
it's in the struts libs, which are definately installed.  I'm obviously
missing something here...  Do I need to enable the validator?  I was
planning on doing validation myself inside the strut.

Thanks again,
Ryan
--
View this message in context:
http://www.nabble.com/how-do-I-use-a-LazyDynaBean-as-an-ActionForm--tf19
25661.html#a5274452
Sent from the Struts - User forum at Nabble.com.


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


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

Thank you. Paychex, Inc.


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



RE: How to get the action name (in addition to the context path name)?

2006-07-11 Thread Samere, Adam J
The org.apache.struts.action.ActionMapping class provides access to this
information. It is provided as the first parameter to the Action.execute
method, and is also stored as a request attribute under the
org.apache.struts.Globals.MAPPING_KEY key
(org.apache.struts.action.mapping.instance).

There may be a better way to do what you are attempting though...


-Original Message-
From: Bryce Nesbitt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 2:05 PM
To: user@struts.apache.org
Subject: How to get the action name (in addition to the context path
name)?

From within a struts 1.0 jsp, how can I find the name of the action that
invoked me?
I can find the context path easy enough:
 %= request.getContextPath().toString() % And the name of the
..jsp that I'm in:
  %= request.getRequestURL() % But where is the action name
hidden?
   

I'm trying to recycle code from two actions:
 action name=rezForm path=/admin/changeFoo
 action name=rezForm path=/member/changeFoo

The .jsp's that implement the views are identical except for the
html:form:
html:form action=/admin/changeFoo
html:form action=/admin/changeFoo

So I'd like to have them share the same code, and just insert the
invoking action name.
Can this be done?

--

Visit http://www.obviously.com/


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


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

Thank you. Paychex, Inc.


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



RE: same name action in 2 diff struts-config.xml

2006-07-05 Thread Samere, Adam J
If you use modules rather than just multiple config files the action
name is relative to the module name, so you can use the same path. If
you are not using modules, you need to name them differently so that the
RequestProcessor knows which Action instance to invoke.

Adam

-Original Message-
From: A. Lotfi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 05, 2006 12:08 PM
To: Struts Users Mailing List
Subject: same name action in 2 diff struts-config.xml

Hi,
  I have two struts-config.xml :
   
  struts-config.xml tha has an action called : getMessages
  struts-config-coi.xml that has an action called : getMessages
   
  this two actions have the same name but they are difined different in
each struts-config file .
   
  Do I have to rename one of the in all the source code and  JSPs , or
there is another way ?
  thank you.
   
   


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

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

Thank you. Paychex, Inc.


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



RE: struts portlet bridge - html rewrite

2006-07-05 Thread Samere, Adam J
You could try storing the output of html:rewrite into a variable (or
using c:url), then use the variable as the value of the page attribute.
jsp:include's page attribute will allow expressions (EL or scripting)

http://java.sun.com/products/jsp/syntax/2.0/syntaxref2020.html#8828


Adam

-Original Message-
From: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 05, 2006 1:00 PM
To: Struts Users Mailing List
Subject: Re: struts portlet bridge - html rewrite

You cannot include one JSP tag into another JSP tag.

On 7/4/06, Spin [EMAIL PROTECTED] wrote:

 Hello,
 I want to use the bridge together with the jsp:

 %@ taglib

uri=http://portals.apache.org/bridges/struts/tags-portlet-html;
 prefix=html%
 jsp:include flush=true page=html:rewrite 
 page='einbind.jsp'//jsp:include

 This line is only for practice, my goal is to call an action:
 jsp:include flush=true page=html:rewrite 
 page='start.do'//jsp:include

 I try to include actionURL or renderURL in the jsp and also in the 
 struts-portlet-config. But the error stays alway the same kind:
 (source code)
 The requested resource (/Tiger7/html:rewrite page='einbind.jsp'/) is

 not availablebr

 What is wrong? How can I use html:rewrite in my jsp. I found 
 http://portals.apache.org/bridges/multiproject/portals-bridges-struts/
 features.html
 but this could not help me.
 Thanks for help
 Spin

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


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

Thank you. Paychex, Inc.


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



RE: Help required: No bean found exception

2006-06-19 Thread Samere, Adam J
Perhaps your session timed out? 

-Original Message-
From: Bharat Kumar Meda [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 19, 2006 12:57 PM
To: Struts Users Mailing List
Subject: Help required: No bean found exception


Hi,


I have a struts based application for adding, deleting and searching
records.  (single jsp, three buttons, one form, one action) Form is with
session scope. While loading the jsp, I prepopulate with data obtained
from DB.


Everything was working fine. But suddenly I got the following exception:
javax.servlet.ServletException: No bean found under attribute key
accountCompanyForm


(accountCompanyForm is my form.)


I think this is related to session but not able to find the exact cause.
Though this exception did not occur again, I am now skeptical and want
avoid this exception in future.


Any idea on what could have been the issue and how to prevent it?


Thanks in advance,
Bharat


 CAUTION - Disclaimer * This e-mail
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents
to any other person and any such actions are unlawful. This e-mail may
contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as
a result of any virus in this e-mail. You should carry out your own
virus checks before opening the e-mail or attachment. Infosys reserves
the right to monitor and review the content of all messages sent to or
from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

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

Thank you. Paychex, Inc.


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



RE: How to avoid IllegalStateException ?

2006-06-16 Thread Samere, Adam J
You aren't calling FilterChain.doFilter(req,res) after sending the
redirect are you? Are there any other filters ahead of this filter in
the pipeline that use the response? Perhaps you could post the
applicable code from your Filter and information regarding any other
filters you are using.

-Adam

-Original Message-
From: Bharat Kumar Meda [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 16, 2006 8:55 AM
To: Struts Users Mailing List
Subject: How to avoid IllegalStateException ?


Hi,

I have a struts based application and using Filters for authorization.
If the user is not authorized, I have to redirect the user to a third
party application.

For that, in the doFilter method, I have added the redirection logic (I
am using response.sendRedirect to take the user to the third party
application.)

Now, the issue is that whenever I call my app url I get the following
exception though I am redirected to the third party application. Is
there a way to avoid this exception?
java.lang.IllegalStateException: Cannot forward a response that is
already committed

Is there a way to avoid this exception?

My web.xml has the following entry:
filter-mapping
 filter-nameAuthenticationFilter/filter-name
 url-pattern*.do/url-pattern
/filter-mapping

Thanks in advance,
Bharat

 CAUTION - Disclaimer * This e-mail
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents
to any other person and any such actions are unlawful. This e-mail may
contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as
a result of any virus in this e-mail. You should carry out your own
virus checks before opening the e-mail or attachment. Infosys reserves
the right to monitor and review the content of all messages sent to or
from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

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


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

Thank you. Paychex, Inc.


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



RE: How to avoid IllegalStateException ?

2006-06-16 Thread Samere, Adam J
Your logic needs to go:

If(not authorized)
Then
 redirect to 3rd party, do not call filterChain.doFilter
Else
 do not redirect to 3rd party, call filterChain.doFilter 


-Adam

-Original Message-
From: Bharat Kumar Meda [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 16, 2006 9:43 AM
To: Struts Users Mailing List
Subject: RE: How to avoid IllegalStateException ?

Thanks Adam, Indeed I was calling  filterChain.doFilter(request,
response) after redirect.

I just tried commenting filterChain.doFilter. No IllegalStateException
comes now and am redirected to third party url.

But now my application is not working if authorization is successful; I
am getting a blank page! No exception and no logs as well

Any idea on how to proceed?

Here is my doFilter method:
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain filterChain) throws IOException, ServletException {
try {
//check authentication
// If not authorized, redirect to the third party
application
} catch (InvalidUserException ine) {
logger.error(Invalid User Exception from TPY , ine);
} catch (TPYException tpe) {
logger.error(TPY Exception , tpe);
} catch (Exception ex) {
logger.error(General Excepion in doFilter , ex);
}

// filterChain.doFilter(request, response);
  }


I am not using any other filters.

I have the following mappings in the web.xml:

!-- Filter Mapping --
 filter-mapping
  filter-nameAuthenticationFilter/filter-name
  url-pattern*.do/url-pattern
  /filter-mapping

!-- Standard Action Servlet Mapping --
  servlet-mapping
  servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping



Regards,
Bharat
-Original Message-
From: Samere, Adam J [mailto:[EMAIL PROTECTED]
Sent: Friday, June 16, 2006 6:45 PM
To: Struts Users Mailing List
Subject: RE: How to avoid IllegalStateException ?

You aren't calling FilterChain.doFilter(req,res) after sending the
redirect are you? Are there any other filters ahead of this filter in
the pipeline that use the response? Perhaps you could post the
applicable code from your Filter and information regarding any other
filters you are using.

-Adam

-Original Message-
From: Bharat Kumar Meda [mailto:[EMAIL PROTECTED]
Sent: Friday, June 16, 2006 8:55 AM
To: Struts Users Mailing List
Subject: How to avoid IllegalStateException ?


Hi,

I have a struts based application and using Filters for authorization.
If the user is not authorized, I have to redirect the user to a third
party application.

For that, in the doFilter method, I have added the redirection logic (I
am using response.sendRedirect to take the user to the third party
application.)

Now, the issue is that whenever I call my app url I get the following
exception though I am redirected to the third party application. Is
there a way to avoid this exception?
java.lang.IllegalStateException: Cannot forward a response that is
already committed

Is there a way to avoid this exception?

My web.xml has the following entry:
filter-mapping
 filter-nameAuthenticationFilter/filter-name
 url-pattern*.do/url-pattern
/filter-mapping

Thanks in advance,
Bharat

 CAUTION - Disclaimer * This e-mail
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents
to any other person and any such actions are unlawful. This e-mail may
contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as
a result of any virus in this e-mail. You should carry out your own
virus checks before opening the e-mail or attachment. Infosys reserves
the right to monitor and review the content of all messages sent to or
from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

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


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

Thank you

RE: html:checkbox not storing property

2006-06-15 Thread Samere, Adam J
Browsers do not send a request parameter for check boxes that are not
checked. Input of type text is always sent. I'm guessing what you see is
the box not being unchecked... You need to set it in the reset method.

-Original Message-
From: Sebastian Stein [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 15, 2006 9:08 AM
To: Struts Users Mailing List
Subject: html:checkbox not storing property

Hi folks,


I have a jsp page with a struts html:checkbox looking as follows:

html:checkbox name=backupform property=enable styleClass=input/

The backupform is defined in struts-config.xml as:

form-bean name=backupForm type=org.contineo.forms.BackupForm/

If I enter the page, the state of the checkbox is correctly set.
However, when I leave the page, the value of the checkbox is not
preserved. I debugged this a little bit and noticed that in the
BackupForm class first the reset(...) function is called and later the
isEnable() function, but not the setEnable(boolean e) function.

This is very strange, because in the same form I have another input
defined as follows:

html:text name=backupform property=path size=60
styleClass=input/

Here the correct value is set during page load as well as after
forwarding to the next page. While leaving the page first the reset(...)
function of the BackupForm class is called, afterwards the
setPath(String p) function and later several times the getPath()
function.

So where is the difference between a html:checkbox and a html:text?

By the way, I'm using Struts 1.1.


Sebastian

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


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

Thank you. Paychex, Inc.


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



RE: [HELP] bean:define and Map

2006-06-15 Thread Samere, Adam J
There are probably numerous ways to accomplish this, what I like to do
is define/instantiate the Map using the jsp:useBean/ tag, then set the
key/value pairs using the c:set/ tag from JSTL.

jsp:useBean id=paramsMap class=java.util.HashMap/ You MUST to use
a concrete implementation of java.util.Map, not the interface.

c:set target=${paramsMap} property=key1 value=myvalue/

c:set target=${paramsMap} property=key2 value=another value/

html:link action=/someAction name=paramsMapSome Where/html:link

-Adam

-Original Message-
From: Garner Shawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 15, 2006 11:24 AM
To: user@struts.apache.org
Subject: [HELP] bean:define and Map

bean:define id=paramsMap type=java.util.Map/


I get a can not set null value form paramsMap.
How do I specify the key, value pairs?

This is to pass into html:link name= for request parameters when they
click on the link.

Thanks.
Shawn

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


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

Thank you. Paychex, Inc.


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



RE: [HELP] bean:define and Map

2006-06-15 Thread Samere, Adam J
The bean:define tag can create new attributes and scripting variables of
type String or create a copy of an existing bean or property on an
existing bean. The standard jsp:useBean covers creating a new instance
of any class with a default constructor, so why duplicate that
functionality in a Struts specific tag?


-Adam

-Original Message-
From: Garner Shawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 15, 2006 12:02 PM
To: Struts Users Mailing List
Subject: Re: [HELP] bean:define and Map

Thanks, this works.
Can you explain to me why I couldn't do the same thing with bean:define?

On 6/15/06, Samere, Adam J [EMAIL PROTECTED] wrote:
 There are probably numerous ways to accomplish this, what I like to do

 is define/instantiate the Map using the jsp:useBean/ tag, then set 
 the key/value pairs using the c:set/ tag from JSTL.

 jsp:useBean id=paramsMap class=java.util.HashMap/ You MUST to 
 use a concrete implementation of java.util.Map, not the interface.

 c:set target=${paramsMap} property=key1 value=myvalue/

 c:set target=${paramsMap} property=key2 value=another value/

 html:link action=/someAction name=paramsMapSome 
 Where/html:link

 -Adam

 -Original Message-
 From: Garner Shawn [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 15, 2006 11:24 AM
 To: user@struts.apache.org
 Subject: [HELP] bean:define and Map

 bean:define id=paramsMap type=java.util.Map/


 I get a can not set null value form paramsMap.
 How do I specify the key, value pairs?

 This is to pass into html:link name= for request parameters when 
 they click on the link.

 Thanks.
 Shawn

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


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

 are hereby notified that any dissemination, distribution, or copying 
 of this communication is strictly prohibited. If you have received 
 this communication in error, please notify us immediately by replying 
 to the message and deleting it from your computer.

 Thank you. Paychex, Inc.


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



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


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



RE: ajax:autocomplete tag

2006-06-14 Thread Samere, Adam J
You can forward to a JSP from your action rather than coding tags into
your action, then generate XML in your JSP rather than HTML.
Your JSP (aside from taglib directives etc) may look like this:

?xml version=1.0 encoding=UTF-8?
ajax-response
  response
c:forEach var=user items=${requestScope.users}
item
namec:out value=${user.userName}//name
valuec:out value=${user.id}//value
/item
/c:forEach
  /response
/ajax-response 


-Adam

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 14, 2006 8:01 AM
To: user@struts.apache.org
Subject: RE: ajax:autocomplete tag

Hi

That was what I ment - You don't return any values from your action. You
need to write the values to the response (supplied by the action), and
then return null. The documentation at http://ajaxtags.sourceforge.net
shows you how, or search for Struts and returning a file for instance.

Hermod

-Original Message-
From: Sony Thomas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 14, 2006 1:55 PM
To: Struts Users Mailing List
Subject: Re: ajax:autocomplete tag


Hi Hermod,

I am setting the value entered in the textbox

 parameters=username={username}

username is my textfield name.

The problem is How will I return the username list back to jsp from
action.

It is very very urgent. can anyone help me please

sony

[EMAIL PROTECTED] wrote:
 Hi

 You are not setting any values in the request - How can the list be 
 populated if you don't supply any values

 Hermod

 -Original Message-
 From: Sony Thomas [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 14, 2006 1:09 PM
 To: user@struts.apache.org
 Subject: ajax:autocomplete tag


 Hi,

 I am a newbie in ajax. I want to use ajax in my application. Let me 
 explain my requirement :

 when I enter a character in the text field i have to call an action. 
 Inside my action i have to load all the users and send  it back to jsp

 so that I can display.

 I am able to call the action class from my jsp. But my problem is how 
 will I set the list of users to response.Can anyone help me please



 What to do in my action to show the Userlist in jsp ? Please it is 
 very urgent 

 Here is my jsp code :

 form action=taskSave
 input id=username name=username type=text size=30 
 class=form-autocomplete /
 /form
 ajax:autocomplete
   baseUrl=/enterpriseUI/userAjaxComplete.do
   source=username
   target=username
   parameters=username={username}
   className=testcomplete
   minimumCharacters=1/



 Here is my Action class code :

 public ActionForward execute(ActionMapping mapping, ActionForm form,
 HttpServletRequest request, 
 HttpServletResponse response) {
   

 logger.info(** Inside ajaxAutoCompleteAction
** );
 try{
   ArrayList usersList = (ArrayList)UserManager.loadAll();
  
 //  return new AjaxXmlBuilder().addItems(usersList, model, 
 make).toString();
 }catch(BusinessObjectException e){
 e.printStackTrace();
 }
 return mapping.findForward(success);
 }



 Thanks in advance


 Sony Thomas

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


 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 * * *

 This email with attachments is solely for the use of the individual or

 entity to whom it is addressed. Please also be aware that the DnB NOR 
 Group cannot accept any payment orders or other legally binding 
 correspondence with customers as a part of an email.

 This email message has been virus checked by the anti virus programs 
 used in the DnB NOR Group.

 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 * * *


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




   


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

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


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



RE: web.xml specifications from 2.4 to 2.3

2006-06-14 Thread Samere, Adam J
You need to use the 1.0 JSTL implementation as you said.

Your taglib directives will then need to use the 1.0 uri, for example:

[EMAIL PROTECTED] uri=http://java.sun.com/jstl/core; prefix=c % (no /jsp/ 
in
the path)

-Adam

-Original Message-
From: chuanjiang lo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 14, 2006 11:33 AM
To: Struts Users Mailing List
Subject: Re: web.xml specifications from 2.4 to 2.3

i have some other pages that uses c:if and etc etc..

I've read on the net and realize that the 2.3 specifications supports
only JSTL 1.0 and it would not evaluate the EL expressions.

So how do i make it evaluate the EL expression without changing my
implementation.




On 6/14/06, Rahul Akolkar [EMAIL PROTECTED] wrote:

 On 6/14/06, Dave Newton [EMAIL PROTECTED] wrote:
  chuanjiang lo wrote:
   bean:define id=biz_link type=String name=Biz_Bean
   property=business_id/
   html:link
 action=/viewBiz/ViewBusinessDetail?business_id=${biz_link}
 
  You need to use the EL-enabled tag libs (struts-el or something like
  that) when you don't have JSP 2.0 available.
 
 snip/

 Indeed: http://struts.apache.org/struts-action/struts-el/index.html

 -Rahul


  Dave
 
 

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



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

Thank you. Paychex, Inc.


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



RE: best way to send parameters through more requests

2006-06-09 Thread Samere, Adam J
You also may be able to store state in hidden fields in the rendered
markup, or by encoding the raw binary data in a single hidden field.
This goes a bit beyond the scope of this list though. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 7:40 AM
To: user@struts.apache.org; [EMAIL PROTECTED]
Subject: RE: best way to send parameters through more requests


Also a word of caution I presume all the objects you store in session
are seriallizable. If they are not then your solution wont work if the
application is deployed on cluster

Small piece of information can be transferred through hidden fields from
form to form through struts actions  Cheers -Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: 09 June 2006 12:33
To: Struts Users Mailing List
Subject: Re: best way to send parameters through more requests

Emilia Ipate wrote:
 Is there a solution besides using session, to send some request 
 parameters from one request to another?
 I would like to implement something like a shopping cart (a 
 functionality which needs about4-5 steps) and I do not want to store 
 the objects in the session (it is alread too big)!
  
 So, do you have any ideas?

Keep the shopping cart in the DB and load it on every page.

Personally I'd rather keep things like that in the session, though,
unless there's a requirement to keep the cart sticky.

Dave



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


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


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

Thank you. Paychex, Inc.


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



RE: best way to send parameters through more requests

2006-06-09 Thread Samere, Adam J
Typically the best solution is to keep this data in the session. That is
what the session is for. As I mentioned, the other option would be to
encode the data using base64 encoding (or something similar) and store
it in a single hidden field.

What makes you so sure you have too much data in the session? Perhaps
you could streamline some of the other data you store in the session or
make sure you cleanup unneeded data.

-Adam

-Original Message-
From: Emilia Ipate [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 8:04 AM
To: Struts Users Mailing List
Subject: RE: best way to send parameters through more requests

Using hidden fields is good, but what if you have like 4-5 request
steps? You will end up at step 5 to send to server a long list of hidden
fileds (all the fields used in step 1,2,3 and 4)... And this sounds like
a unmaintable code!!!


Emilia

-Original Message-
From: Samere, Adam J [mailto:[EMAIL PROTECTED]
Sent: vrijdag 9 juni 2006 13:57
To: Struts Users Mailing List
Subject: RE: best way to send parameters through more requests


You also may be able to store state in hidden fields in the rendered
markup, or by encoding the raw binary data in a single hidden field.
This goes a bit beyond the scope of this list though. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 7:40 AM
To: user@struts.apache.org; [EMAIL PROTECTED]
Subject: RE: best way to send parameters through more requests


Also a word of caution I presume all the objects you store in session
are seriallizable. If they are not then your solution wont work if the
application is deployed on cluster

Small piece of information can be transferred through hidden fields from
form to form through struts actions  Cheers -Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: 09 June 2006 12:33
To: Struts Users Mailing List
Subject: Re: best way to send parameters through more requests

Emilia Ipate wrote:
 Is there a solution besides using session, to send some request
 parameters from one request to another?
 I would like to implement something like a shopping cart (a 
 functionality which needs about4-5 steps) and I do not want to store 
 the objects in the session (it is alread too big)!
  
 So, do you have any ideas?

Keep the shopping cart in the DB and load it on every page.

Personally I'd rather keep things like that in the session, though,
unless there's a requirement to keep the cart sticky.

Dave



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


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


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

Thank you. Paychex, Inc.


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


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


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



RE: struts-config xml file throws a java exception

2006-06-08 Thread Samere, Adam J
Where is loginRequired referenced in your struts-config document? Perhaps I 
misunderstood your problem.

-Original Message-
From: Olivier Bex [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 4:04 AM
To: 'Struts Users Mailing List'
Subject: RE: struts-config xml file throws a java exception

Hi, 

Here is my form bean declaration : 

form-beans
form-bean name=loginForm type=com.eyrolles.LoginForm /
form-bean name=employeForm type=com.eyrolles.EmployeForm /
  /form-beans

And here is the action form : 
(NB : the other declaration loginForm does not use the loginrequired
property.)

package com.eyrolles.struts;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;

public class EmployeForm extends ActionForm {

  private static final long serialVersionUID = 1L;  
  protected String username;
  protected String password;
  protected String name;
  protected String phone;
  protected String email;
  protected String depid;
  protected String roleid;

  public void setUsername(String username) {

this.username = username;
  }

  public String getUsername() {

return username;
  }

  public void setPassword(String password) {

this.password = password;
  }

  public String getPassword() {

return password;
  }

  public void setName(String name) {

this.name = name;
  }

  public String getName() {

return name;
  }

  public void setPhone(String phone) {

this.phone = phone;
  }

  public String getPhone() {

return phone;
  }

  public void setEmail(String email) {

this.email = email;
  }

  public String getEmail() {

return email;
  }

  public void setDepid(String depid) {

this.depid = depid;
  }

  public String getDepid() {

return depid;
  }

  public void setRoleid(String roleid) {

this.roleid = roleid;
  }

  public String getRoleid() {

return roleid;
  }

  // Cette méthode est appelée par chaque requête. Elle réinitialise les
  // attributs du formulaire avant de copier les données de la nouvelle requête.
  public void reset(ActionMapping mapping, HttpServletRequest request) {

this.username = ;
this.password = ;
this.name = ;
this.phone = ;
this.email = ;
this.depid = 1;
this.roleid = 1;
  }

  public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {

ActionErrors errors = new ActionErrors();

EmployesActionMapping employesMapping =
  (EmployesActionMapping)mapping;

// Cette action nécessite-t-elle l'identification de l'utilisateur ?
if ( employesMapping.isLoginRequired() ) {

  HttpSession session = request.getSession();
  if ( session.getAttribute(USER) == null ) {

// retourner null force l'action à traiter l'erreur de login
return null;
  }
}

if ( (roleid == null ) || (roleid.length() == 0) ) {

  errors.add(roleid, new ActionMessage(errors.roleid.required));
}
if ( (depid == null ) || (depid.length() == 0) ) {

  errors.add(depid, new ActionMessage(errors.depid.required));
}
if ( (email == null ) || (email.length() == 0) ) {

  errors.add(email, new ActionMessage(errors.email.required));
}
if ( (phone == null ) || (phone.length() == 0) ) {

  errors.add(phone, new ActionMessage(errors.phone.required));
}
if ( (name == null ) || (name.length() == 0) ) {

  errors.add(name, new ActionMessage(errors.name.required));
}
if ( (password == null ) || (password.length() == 0) ) {

  errors.add(password, new ActionMessage(errors.password.required));
}
if ( (username == null ) || (username.length() == 0) ) {

  errors.add(username, new ActionMessage(errors.username.required));
}
return errors;
  }
}

-Message d'origine-
De : Samere, Adam J [mailto:[EMAIL PROTECTED] Envoyé : mercredi 7 juin 2006 
19:04 À : Struts Users Mailing List Objet : RE: struts-config xml file throws a 
java exception

Can you post the form bean declaration from struts config and the ActionForm 
subclass? 


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


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

Thank you

RE: struts-config xml file throws a java exception

2006-06-08 Thread Samere, Adam J
You don't have a custom action-mappings type... The set-property set's property 
on the ActionMapping instance.
action-mappings type=foo.bar.MyActionMapping
...
/action-mappings
-Original Message-
From: Olivier Bex [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 9:06 AM
To: 'Struts Users Mailing List'
Subject: RE: struts-config xml file throws a java exception

LoginRequired is referenced in the action tags of each action.

Here is a sample : 

action-mappings

action path=/Login
  type=com.eyrolles.LoginAction
  validate=true
  input=/login.jsp
  name=loginForm
  scope=request 
  forward name=success path=/EmployeListe.do/
/action

action path=/EmployeListe
  type=com.eyrolles.EmployeListeAction
  scope=request 
  set-property property=loginRequired value=true/
  forward name=success path=/employeliste.jsp/
/action
[...]
/action-mapping

Olivier.

-Message d'origine-
De : Samere, Adam J [mailto:[EMAIL PROTECTED] Envoyé : jeudi 8 juin 2006 14:10 
À : Struts Users Mailing List Objet : RE: struts-config xml file throws a java 
exception

Where is loginRequired referenced in your struts-config document? Perhaps I 
misunderstood your problem.

-Original Message-
From: Olivier Bex [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 4:04 AM
To: 'Struts Users Mailing List'
Subject: RE: struts-config xml file throws a java exception

Hi, 

Here is my form bean declaration : 

form-beans
form-bean name=loginForm type=com.eyrolles.LoginForm /
form-bean name=employeForm type=com.eyrolles.EmployeForm /
  /form-beans

And here is the action form : 
(NB : the other declaration loginForm does not use the loginrequired
property.)

package com.eyrolles.struts;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;

public class EmployeForm extends ActionForm {

  private static final long serialVersionUID = 1L;  
  protected String username;
  protected String password;
  protected String name;
  protected String phone;
  protected String email;
  protected String depid;
  protected String roleid;

  public void setUsername(String username) {

this.username = username;
  }

  public String getUsername() {

return username;
  }

  public void setPassword(String password) {

this.password = password;
  }

  public String getPassword() {

return password;
  }

  public void setName(String name) {

this.name = name;
  }

  public String getName() {

return name;
  }

  public void setPhone(String phone) {

this.phone = phone;
  }

  public String getPhone() {

return phone;
  }

  public void setEmail(String email) {

this.email = email;
  }

  public String getEmail() {

return email;
  }

  public void setDepid(String depid) {

this.depid = depid;
  }

  public String getDepid() {

return depid;
  }

  public void setRoleid(String roleid) {

this.roleid = roleid;
  }

  public String getRoleid() {

return roleid;
  }

  // Cette méthode est appelée par chaque requête. Elle réinitialise les
  // attributs du formulaire avant de copier les données de la nouvelle requête.
  public void reset(ActionMapping mapping, HttpServletRequest request) {

this.username = ;
this.password = ;
this.name = ;
this.phone = ;
this.email = ;
this.depid = 1;
this.roleid = 1;
  }

  public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {

ActionErrors errors = new ActionErrors();

EmployesActionMapping employesMapping =
  (EmployesActionMapping)mapping;

// Cette action nécessite-t-elle l'identification de l'utilisateur ?
if ( employesMapping.isLoginRequired() ) {

  HttpSession session = request.getSession();
  if ( session.getAttribute(USER) == null ) {

// retourner null force l'action à traiter l'erreur de login
return null;
  }
}

if ( (roleid == null ) || (roleid.length() == 0) ) {

  errors.add(roleid, new ActionMessage(errors.roleid.required));
}
if ( (depid == null ) || (depid.length() == 0) ) {

  errors.add(depid, new ActionMessage(errors.depid.required));
}
if ( (email == null ) || (email.length() == 0) ) {

  errors.add(email, new ActionMessage(errors.email.required));
}
if ( (phone == null ) || (phone.length() == 0) ) {

  errors.add(phone, new ActionMessage(errors.phone.required));
}
if ( (name == null ) || (name.length() == 0) ) {

  errors.add(name, new ActionMessage(errors.name.required));
}
if ( (password == null ) || (password.length() == 0) ) {

  errors.add(password, new ActionMessage(errors.password.required));
}
if ( (username == null ) || (username.length() == 0

RE: message resources

2006-06-08 Thread Samere, Adam J
Internally the DynaForm (i.e. DynaBean) uses a Map to store the
properties. This is what allows it to provide dynamic properties and
save you from writing ActionForm subclasses.

When you reference myDynaForm with a JSP Expression Language (EL)
expression like ${myDynaForm.description} reflection is used to call a
getter method (in this case getDescription() on the instance
(myDynaForm). 

So... ${myDynaForm.description} is equivalent to
myDynaForm.getDescription()

The DynaForm class does not have this method. It does however have a
method public Map getMap() which returns the Map used to store your
properties. So, by putting ${myDynaForm.map.description} the equivalent
is myDynaForm.getMap().get(description) which will return your
property.

When using the struts bean tags such as bean write the tags are aware of
the DynaBean, and therefore know that they need to get the underlying
Map, then call get(String) using the supplied property.

Make sense?

-Adam

-Original Message-
From: Marcus [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 9:47 AM
To: Struts Users Mailing List
Subject: Re: message resources


 When using EL with dyna beans you need to reference the map property 
 then your property. The struts tags (i.e. bean:write) handle this for 
 you.

  bean:message key=valueAdded

Sorry,

call me dumb,
but I didn't really get what you tried to explain.

EL ?
- map property  - you mean my dynaForm?
Or do you really mean a map? I am not using one..

Marcus

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


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

Thank you. Paychex, Inc.


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



RE: struts-config xml file throws a java exception

2006-06-08 Thread Samere, Adam J
Does your struts-config have:

action-mappings type=com.ex.struts.EmployesActionMapping
...
/action-mappings 

It didn't in the example you provided earlier.

-Original Message-
From: Olivier Bex [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 9:58 AM
To: 'Struts Users Mailing List'
Subject: RE: struts-config xml file throws a java exception

Here is my Actionmapping class using the property loginRequired : 

package com.ex.struts;

import org.apache.struts.action.ActionMapping;

public class EmployesActionMapping extends ActionMapping {

  private static final long serialVersionUID = 1L;
  protected boolean loginRequired = false;

  public void setLoginRequired(boolean loginRequired) {

this.loginRequired = loginRequired;
  }

  public boolean getLoginRequired() {

return loginRequired;
  }
}

-Message d'origine-
De : Dave Newton [mailto:[EMAIL PROTECTED] Envoyé : jeudi 8 juin 2006 15:19 À : 
Struts Users Mailing List Objet : Re: struts-config xml file throws a java 
exception

Olivier Bex wrote:
 LoginRequired is referenced in the action tags of each action.
   

I may have missed it, but did you provide the source for your custom 
ActionMapping class that you are expecting the set-property... element to act 
upon? (If you didn't, or haven't sub-classed ActionMapping or aren't using 
somebody else's custom ActionMapping, consider this a hint ;)

Dave



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



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


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

Thank you. Paychex, Inc.


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



RE: multibox not works when all checkboxes are unselected!

2006-06-08 Thread Samere, Adam J
Browsers are only required to submit values for checkboxes when they are
selected. So when a box is not checked, no value is sent, so the state
on the server is not changed. When using session scoped objects to store
the value of checkboxes your processing needs to be aware of the fact
that values for checkbox=off are not sent.

-Adam 

-Original Message-
From: starki78 [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 11:40 AM
To: user
Subject: multibox not works when all checkboxes are unselected!

Hi!

I've a large problem with html:multibox.
I've tree checkboxes. When I choose
one or two or three it arrives correct
at the next action!
Only then all checkboxes are deselected
it remembers the state of the checkboxes that was selected before! The
state of the form is session in struts-config.
Can you help me with this problem??
I really don't have an idea how to solve it!

Thanks a lot!










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


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

Thank you. Paychex, Inc.


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



RE: Digester Error while reading struts config file

2006-06-08 Thread Samere, Adam J
What container are you using? By moving xerces 2.8 inside my war do
you mean the xercesImpl.jar? Which JVM you are using may also be of
interest.

What is bluecast? I bet your Sax Parser factory is picking the wrong
one...

-Original Message-
From: RickD [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 10:48 AM
To: user@struts.apache.org
Subject: Digester Error while reading struts config file


Has anyone seen this.  I'm migrating to struts 1.2.9 from 1.1.  I've
tried using the 1.2 version of the DTD, and I've tried it without a
DOCTYPE declaration to stop validation.  

I also read that there may be a problem with the xerces parser.  I read
that the Digester has problems if the xerces is in the parent class
path.  I'm moved xerces 2.8 inside my war; this had no effect.

thx


Jun 8, 2006 8:33:53 AM org.apache.commons.digester.Digester getParser
SEVERE: Digester.getParser:
javax.xml.parsers.ParserConfigurationException: XML document validation
is not supported
at
com.bluecast.xml.JAXPSAXParserFactory.newSAXParser(JAXPSAXParserFactory.
java:105)
at
org.apache.commons.digester.parser.XercesParser.newSAXParser(XercesParse
r.java:139)
at
org.apache.commons.digester.ParserFeatureSetterFactory.newSAXParser(Pars
erFeatureSetterFactory.java:73)
at
org.apache.commons.digester.Digester.getParser(Digester.java:682)
at
org.apache.commons.digester.Digester.getXMLReader(Digester.java:891)
at
org.apache.commons.digester.Digester.parse(Digester.java:1572)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServl
et.java:738)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja
va:687)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:3
--
View this message in context:
http://www.nabble.com/Digester-Error-while-reading-struts-config-file-t1
755486.html#a4773732
Sent from the Struts - User forum at Nabble.com.


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


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

Thank you. Paychex, Inc.


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



RE: Digester Error while reading struts config file

2006-06-08 Thread Samere, Adam J
The concrete SAXParserFactory implementation to use is determined as
follows:

1. Use the javax.xml.parsers.SAXParserFactory system property if it is
set. (with -Djavax.xml.parsers.SAXParserFactory=my.factory.impl for
example)
2. If JRE/lib/jaxp.properties exists and has a
javax.xml.parsers.SAXParserFactory use that
3. Use a JAR file service provider to look for a file called
META-INF/services/javax.xml.parsers.SAXParserFactory in any jar file on
the CLASSPATH

I'm thinking whatever jar file has com.bluecast.xml.JAXPSAXParserFactory
also has a javax.xml.parsers.SAXParserFactory in the META-INF.

Try removing this jar file if you can, or override it by setting the
javax.xml.parsers.SAXParserFactory as a system property or in
JRE/lib/jaxp.properties

-Original Message-
From: RickD [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 1:33 PM
To: user@struts.apache.org
Subject: RE: Digester Error while reading struts config file


I didn't remove any xerces related jars from tomcat cat.  I looked in
common/lib and server/lib but didn't see xerces.

in the web.xml  I only specify a single module config file.
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
load-on-startup2/load-on-startup

There error returned after adding the resolver.jar, xercesImpl.jar, and
xml-api.jar is as follows...
I must have doesn something wrong because it still contains the bluecast
call.



SEVERE: Digester.getParser:
javax.xml.parsers.ParserConfigurationException: XML document validation
is not supported
at
com.bluecast.xml.JAXPSAXParserFactory.newSAXParser(JAXPSAXParserFactory.
java:105)
at
org.apache.commons.digester.parser.XercesParser.newSAXParser(XercesParse
r.java:139)
at
org.apache.commons.digester.ParserFeatureSetterFactory.newSAXParser(Pars
erFeatureSetterFactory.java:73)
at
org.apache.commons.digester.Digester.getParser(Digester.java:682)
at
org.apache.commons.digester.Digester.getXMLReader(Digester.java:891)
at
org.apache.commons.digester.Digester.parse(Digester.java:1572)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServl
et.java:738)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja
va:687)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:333)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:1105)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3915)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4176
)
at
org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:10
85)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1178)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:29
2)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:119)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.j
ava:1304)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.proc
essChildren(ContainerBase.java:1568)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.proc
essChildren(ContainerBase.java:1577)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(
ContainerBase.java:1557)
at java.lang.Thread.run(Thread.java:595)
Jun 8, 2006 11:25:45 AM org.apache.struts.action.ActionServlet init
SEVERE: Unable to initialize Struts ActionServlet due to an unexpected
exception or error thrown, so marking the servlet as unavailable.  Most
likely, this is due to an incorrect or missing library dependency.
java.lang.NullPointerException
at
org.apache.commons.digester.Digester.getXMLReader(Digester.java:891)
at
org.apache.commons.digester.Digester.parse(Digester.java:1572)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServl
et.java:738)
at org.apache.struts.



--
View this message in context:
http://www.nabble.com/Digester-Error-while-reading-struts-config-file-t1
755486.html#a4777120
Sent from the Struts - User forum at Nabble.com.


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


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

RE: Problem in a action

2006-06-07 Thread Samere, Adam J
Looks like your form is failing validation, and you do not have an input 
attribute on your action element. 

action path=/inicio type=seda.incidencias.struts.action.ActionInicio
name=formInicio input=inputPage.jsp

/action

-Original Message-
From: José María Tristán [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 07, 2006 10:02 AM
To: 'Struts Users Mailing List'
Subject: Problem in a action

Hi:

I have an error when i try launch an action of struts:

 No input attribute for mapping path
/coffeenet/SeguimientoComercial/IndexSeguiComer

The struts-config.xml:

action path=/inicio 
type=seda.incidencias.struts.action.ActionInicio
name=formInicio
forward name=SeguimientoComercial redirect=false
path=/coffeenet/SeguimientoComercial/IndexSeguiComer.do /
/action

action path=/coffeenet/SeguimientoComercial/IndexSeguiComer
type=seda.coffeenet.SeguimientoComercial.struts.action.IndexSeguiComerActio
n  name=seguimientoComercialForm scope=session 
validate=true
forward name=success
path=/tiles/pages/coffeenet/SeguimientoComercial/SolicitarSeguimientoComerc
ial.jsp /
/action

The best of it is that this action has been working.

Thanks very much


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


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

Thank you. Paychex, Inc.


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



RE: struts-config xml file throws a java exception

2006-06-07 Thread Samere, Adam J
Can you post the form bean declaration from struts config and the ActionForm 
subclass? 

-Original Message-
From: Olivier Bex [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 07, 2006 12:51 PM
To: 'Struts Users Mailing List'
Subject: RE: struts-config xml file throws a java exception

Hi Ed,

You've guessed right for the definition of the form bean and the property 
loginRequired.
Unfortunately for you, I do have a class implementing loginRequired, and do 
have setter and getter method.

This is why I don't understand the exception thrown by tomcat.

Regards,
Olivier.

-Message d'origine-
De : Ed Griebel [mailto:[EMAIL PROTECTED] Envoyé : mercredi 7 juin 2006 18:43 
À : Struts Users Mailing List Objet : Re: struts-config xml file throws a java 
exception

Hi Oliver-

I'm going to guess that you have defined a form bean and properties in your 
form bean, and one of these properties is called loginRequired.
I'm also going to guess that you don't have a setter method for this property 
with the method signature of 'public void setLoginRequired(String x)'

-ed

On 6/7/06, Olivier Bex [EMAIL PROTECTED] wrote:
 Hi everyone,



 When I start Tomcat 5.0.28, it says that I have a parsing error in my 
 struts-config.xml, but I think it's not.

 The log file throws a java.lang.NoSuchMethodException : bean has no
property
 named loginRequired



 Regards,



 Olivier BEX






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


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

Thank you. Paychex, Inc.


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



RE: displaying ActionMessages.GLOBAL_MESSAGE messages only

2006-06-07 Thread Samere, Adam J
How about just:

logic:messagesPresent message=true 
property=%= ActionMessages.GLOBAL_MESSAGE %
.
/logic:messagesPresent

You don't want to tie your code to the actual key since that is an
implementation detail, that's what the public constant is for.

-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 07, 2006 3:55 PM
To: Chris Cheshire; Struts Users Mailing List
Subject: Re: displaying ActionMessages.GLOBAL_MESSAGE messages only

At 12:47 PM -0700 6/7/06, Chris Cheshire wrote:
In my actions I have messages stored in the session either under 
ActionMessages.GLOBAL_MESSAGE, or my own key (eg 'search').

In my jsp I have a section to display the search specific messages.
logic:messagesPresent message=true property=search 
/logic:messagesPresent

I also need to display the global messages at the top of the page, 
however this displays everything, including the search messages:

logic:messagesPresent message=true
...
/logic:messagesPresent

What do I set for the property to ONLY display the messages keyed by 
ActionMessages.GLOBAL_MESSAGE?

technically, you would use

logic:messagesPresent message=true 
property=org.apache.struts.action.GLOBAL_MESSAGE
.
/logic:messagesPresent

It has been observed that this is kind of cumbersome.  A nice
enhancement (that just about any willing volunteer could do, hint hint
:-) ) would be to enhance the logic:messagesPresent,
logic:messagesNotPresent, and html:messages and html:errors tags to have
another attribute, global which if it had the valuetrue 
would save you from needing to know that verbose property name.

Joe

-- 
Joe Germuska
[EMAIL PROTECTED] * http://blog.germuska.com

You really can't burn anything out by trying something new, and
even if you can burn it out, it can be fixed.  Try something new.
-- Robert Moog

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


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

Thank you. Paychex, Inc.


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



RE: Reset Image Button

2006-06-06 Thread Samere, Adam J
You may just need to return false after calling reset.
onclick=document.MyForm.reset(); return false; 
 
Or just use a standard img or the html:img tag instead of html:image

-Original Message-
From: marcus biel (innoWake gmbh) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 7:50 AM
To: Struts Users Mailing List
Subject: Reset Image Button

Is there a way to create an image button that IS a reset button?

I tried this:
html:image src=reset.gif onclick=document.MyForm.reset() /

and this:
html:resethtml:image src=reset.gif
onclick=document.MyForm.reset() //html:reset

But unfortunately, it didn't work! :-(

Marcus


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


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

Thank you. Paychex, Inc.


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



RE: Adding JSP tag as a parameter to another jsp tag

2006-06-06 Thread Samere, Adam J
Assuming your test:example tag's property attribute supports
expressions, you could set the value of the title:renderTitle/ into a
page scoped variable then write it into the property attribute using an
expression. For example, using c:set from JSTL:

c:set var=myTitletitle:renderTitle//c:set
test:example name=abc title=123 property=${myTitle}/

-Original Message-
From: Shoukat, Faisal [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 8:54 AM
To: Struts Users Mailing List
Subject: RE: Adding JSP tag as a parameter to another jsp tag

Hi,

Can anyone advise on how to call a jsp tag as a parameter to another jsp
tag:

For example: (this is completely hypothetical but matches my case)

test:example name=abc title=123 property=example/

Now in the property element I Want to call another tag which is already
written which returns me the string required for example
title:renderTitle/

So it would look like 

test:example name=abc title=123 property=title:renderTitle//

However I don't know how to add the second tag

Any one know?

Thanks


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


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

Thank you. Paychex, Inc.


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



RE: Adding JSP tag as a parameter to another jsp tag

2006-06-06 Thread Samere, Adam J
There wasn't the last time I looked

You'll probably find it worth your time to grab JSTL. There are many
other useful features that are not available in the Struts libraries,
since it would just be duplicated efforts. If there is some reason you
are absolutely forbidden from using JSTL, you might consider writing
your own set tag.

--Adam 

-Original Message-
From: Shoukat, Faisal [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 9:12 AM
To: Struts Users Mailing List
Subject: RE: Adding JSP tag as a parameter to another jsp tag

Is there an equivalent of this with struts libraires

c:set var=myTitletitle:renderTitle//c:set

-Original Message-
From: Samere, Adam J [mailto:[EMAIL PROTECTED]
Sent: 06 June 2006 14:02
To: Struts Users Mailing List
Subject: RE: Adding JSP tag as a parameter to another jsp tag

Assuming your test:example tag's property attribute supports
expressions, you could set the value of the title:renderTitle/ into a
page scoped variable then write it into the property attribute using an
expression. For example, using c:set from JSTL:

c:set var=myTitletitle:renderTitle//c:set
test:example name=abc title=123 property=${myTitle}/

-Original Message-
From: Shoukat, Faisal [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 06, 2006 8:54 AM
To: Struts Users Mailing List
Subject: RE: Adding JSP tag as a parameter to another jsp tag

Hi,

Can anyone advise on how to call a jsp tag as a parameter to another jsp
tag:

For example: (this is completely hypothetical but matches my case)

test:example name=abc title=123 property=example/

Now in the property element I Want to call another tag which is already
written which returns me the string required for example
title:renderTitle/

So it would look like 

test:example name=abc title=123 property=title:renderTitle//

However I don't know how to add the second tag

Any one know?

Thanks


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


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

Thank you. Paychex, Inc.


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




The Northgate IS Content Screening and Inspection system has scanned
this message for malicious and inappropriate content and none was found.
Please take care when opening attachments even when these are expected
and from known and trusted sources. 




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


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



RE: How to terminate the uploading process of Struts?

2006-06-06 Thread Samere, Adam J
You may be able to configure this in your web server.

-Original Message-
From: Al Eridani [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 10:29 AM
To: Struts Users Mailing List
Subject: Re: How to terminate the uploading process of Struts?

On 6/4/06, Truong Xuan Tinh [EMAIL PROTECTED] wrote:
Hi experts,
 Can we terminate the uploading process of Struts when the uploaded 
 data size is exceeded the max file size configured in the controller 
 of Struts.

I believe that this is not a Struts issue.
I remember I tried years ago (not using Struts) and, while I could
terminate the process, I could find no way of clearing the remaining
data that the browser kept sending without reading it, which defeated
the purpose of the exercise.
I did not spend too much time trying, though.

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


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

Thank you. Paychex, Inc.


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



RE: Image change on error

2006-06-06 Thread Samere, Adam J
The message attribute is a boolean indicated whether messages should be
checked for under Globals.ERROR_KEY or Globals.MESSAGE_KEY.

You probably want to use the name or property attributes. See the online
docs.


-Original Message-
From: marcus biel (innoWake gmbh) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 11:25 AM
To: Struts Users Mailing List
Subject: AW: Image change on error

Nope,

this was too fast - it does not work, because it now always changes the
image - seems like it always finds the error message! :-(


Marcus


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


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

Thank you. Paychex, Inc.


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



RE: [Struts + Tiles] JSTL problem on WebSphere Application Server 6

2006-06-05 Thread Samere, Adam J
Additionally, make sure you use the correct 1.1 uri in your tag lib
import:

%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % 

Note the jsp between java.sun.com and jstl in the path.

-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 05, 2006 11:28 AM
To: Struts Users Mailing List
Subject: RE: [Struts + Tiles] JSTL problem on WebSphere Application
Server 6

Curiously, I thought to do a Google to verify whether Websphere 6 was a
Servlet 2.4 container, which is relevant to your situation, and in
addition to verifying that, I also found someone who had the exact same
problem as you, at http://www.jroller.com/page/agrebnev/20050831.  As
this blog entry is almost a year old, perhaps there are revisions to WS6
that fixes this.

However, note the following:

1. You need to use the JSTL 1.1 version, as you have a Servlet 2.4
container.
2. You need to make sure your web.xml is using the servlet 2.4 format,
and not 2.3.  If you use the latter, EL expressions in your JSP will not
be evaluated.  The servlet 2.4 format uses a schema, and not a dtd.

 -Original Message-
 From: Rafael [mailto:[EMAIL PROTECTED]
 Sent: Sunday, June 04, 2006 12:16 PM
 To: Struts Users Mailing List
 Subject: Re: [Struts + Tiles] JSTL problem on WebSphere Application 
 Server 6
 
 I'm using JSTL version 1.0, but 1.1 doesn't work too. No, I haven't.
 
 Can you explain JSTL stopped working a little more extensively?
 sure, will try to give examples... I've a JSP page called index.jsp in

 this index page I included another jsp page called taglib.jsp in this 
 taglib.jsp I've only the taglib URI imports(see below). So, in the 
 index.jsp page I use %@ include file=taglibs.jsp % and so...I can 
 make use of JSTL tags. If I do so, in the index.jsp tags like c:out 
 value=Hi/ doesn't work, actually all JSTL tags doesn't work. But if

 I include the URI tag (%@ taglib uri=http://java.sun.com/jstl/core; 
 prefix=c %) in the index.jsp page, all JSTL tags work perfectly...
 
 
 **Taglibs.jsp
 **
 %--
  This file includes all necessary tag libraries for the JSPs in this 
 application.  Pages can  include this file like this %@ include 
 file=/taglibs.jsp % so that they don't  have to explicitly include 
 all of these taglibs on each page.
 --%
 %@ taglib uri=struts-tiles.tld prefix=tiles % %@ taglib 
 uri=struts-html.tld prefix=html %
 
 %@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
 **
 **
 
 -Rafael T Icibaci
 
 
 - Original Message -
 From: Samere, Adam J [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Friday, June 02, 2006 12:36 PM
 Subject: RE: [Struts + Tiles] JSTL problem on WebSphere Application 
 Server 6
 
 
 I doubt that the include is not working. What version of JSTL are you 
 using? Do you have taglib entries in web.xml?
 
 Can you explain JSTL stopped working a little more extensively?
 
 -Original Message-
 From: Rafael [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 02, 2006 11:01 AM
 To: Struts Users Mailing List
 Subject: [Struts + Tiles] JSTL problem on WebSphere Application Server

 6
 
 Hi Guys,
 
 I've an application that uses Struts and Tiles, this application was 
 running on WebSphere 5.1 for almost 3 years but now when we moved to
 WAS6 JSTL stopped working. Let me give an example:
 
 we've a jsp page called taglibs.jsp, in this jsp page we've all the 
 struts, jstl taglibrary imports. So, when we need struts or JSTL in 
 another JSP page we just include this taglibs.jsp. Using - %@ 
 include file=/jsp/taglibs.jsp % , seems that WAS6 container support

 JSP 2.0 and somehow this caused the include directive to stop working.

 I found a lot of messages in Forums and after I read the JSP 2.0 spec,

 I decided to set encoding to each page. Isn't worked because actually 
 include directive includes content like- p Content /p but don't 
 include taglib directives like the one below.
 %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
 
 
 Any ideias ?
 
 Thanks !!
 
 -Rafael T Icibaci
 
 
 -
 The information contained in this message may be privileged, 
 confidential, and protected from disclosure. If the reader of this 
 message is not the intended recipient, or any employee or agent 
 responsible for delivering this message to the intended recipient, you

 are hereby notified that any dissemination, distribution, or copying 
 of this communication is strictly prohibited. If you have received 
 this communication in error, please notify us immediately by replying 
 to the message and deleting it from your computer.
 
 Thank you. Paychex, Inc.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED

RE: dispatch action error

2006-06-02 Thread Samere, Adam J
I don't think your method param is being passed when the form is
submitted. You should probably make the parameters you are passing in
the query string hidden fields on the form you are submitting. If you
need to dynamically set the method parameter you can then do so in the
onclick event of the anchor element.

html:form action=/myDispatchAction  
input type=hidden name=method value=/
input type=hidden name=applicantId value=.../
/html:form

a href=javascript:void(0)
onclick=javascript:document.forms.applicationDetailsForm.method.value='
changeStatus';
document.forms.applicationDetailsForm.submit();[Submit]/a

-Adam

-Original Message-
From: Shoukat, Faisal [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 02, 2006 5:35 AM
To: Struts Users Mailing List
Subject: dispatch action error

Hi Guys,

 

I am after some advice with the following:

 

I am submitting a form which has the value as selected in a drop down.
From my struts config.xml it forwards to the correct dispatch action
class method. And does the processing within that method.  However just
before returning to the next jsp it throws the logging exception
recorded below where it states that I have tried to call a dispatch
action class with a parameter of ''. I don't understand why it makes
this second call.

 

I submit the form with the following link: 

 

   logic:equal name=cnt value=1

  a href=html:rewrite
page=/abc/applicationDetails.do/?method=changeStatusapplicantId=bea
n:wr
ite name=app property=appId/ 

 
onclick=javascript:document.forms.applicationDetailsForm.submit();retur
n
false;[Submit]/a

  /logic:equal

 

I have tried it with return false and without it.

 

Can anybody advise on this?

 

Thanks

 

10:08:12,253 DEBUG [LoginBarFilter] In doFilter() for request:
[EMAIL PROTECTED]

10:08:12,253 DEBUG [LoginBarFilter] checking access level

10:08:12,253 INFO  [LoginBarFilter] Level determined as SAVSUB

10:08:12,253 INFO  [LoginBarFilter] storing access level SAVSUB to
session with key access

10:08:12,253 INFO  [LoginBarFilter] setting module name for css to
AYRECRUIT

10:08:12,269 DEBUG [LoginBarFilter] Branding URL from DB = 

10:08:12,269 DEBUG [ModuleUtils] Get module name for path
/web/applicationDetails.do

10:08:12,269 DEBUG [ModuleUtils] Module name found: default

10:08:12,269 DEBUG [RequestProcessor] Processing a 'GET' for path
'/web/applicationDetails'

10:08:12,269 DEBUG [RequestUtils]  Looking for ActionForm bean instance
in scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestUtils]  Can recycle existing ActionForm
instance of type 'abc.forms.ApplicationDetailsForm'?: true

10:08:12,269 DEBUG [RequestUtils]  --
[EMAIL PROTECTED]

10:08:12,269 DEBUG [RequestProcessor]  Storing ActionForm bean instance
in scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestProcessor]  Populating bean properties from
this request

10:08:12,269 DEBUG [RequestProcessor]  Looking for Action instance for
class abc.actions.ApplicationDetailsAction

10:08:12,269 DEBUG [RequestProcessor]   Returning existing Action
instance

10:08:12,269 ERROR [DispatchAction] Action[/web/applicationDetails] does
not contain method named ''

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

at java.lang.Class.getMethod(Class.java:986)

at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:3
22)

at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:
262)

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194
)

at java.lang.Class.getMethod(Class.java:986)

at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
oces
sor.java:419)

at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:3
22)

at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)

at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:
262)

at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194
)

at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
oces
sor.java:419)

at
javax.servlet.http.HttpServlet.service(HttpServlet.java:192)

at

RE: dispatch action error

2006-06-02 Thread Samere, Adam J
Perhaps two requests are being made: one for the anchor, one for the
form submit. The anchor would send the method value, the form would not
(unless you have an input named method defined on the form). 

-Original Message-
From: Shoukat, Faisal [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 02, 2006 8:16 AM
To: Struts Users Mailing List
Subject: RE: dispatch action error

I did some debugging on the getMethod() and when I submit the form the
request.getParameter() first time returns '' then in the same request
changeStatus parameter is found.

So its not that the form is not passing the parameter because it does,
the issue I don't understand is why would it pass '' initially then in
the same request it finds the correct parameter

Any pointers

-Original Message-
From: Samere, Adam J [mailto:[EMAIL PROTECTED]
Sent: 02 June 2006 13:09
To: Struts Users Mailing List
Subject: RE: dispatch action error

I don't think your method param is being passed when the form is
submitted. You should probably make the parameters you are passing in
the query string hidden fields on the form you are submitting. If you
need to dynamically set the method parameter you can then do so in the
onclick event of the anchor element.

html:form action=/myDispatchAction  
input type=hidden name=method value=/
input type=hidden name=applicantId value=.../
/html:form

a href=javascript:void(0)
onclick=javascript:document.forms.applicationDetailsForm.method.value='
changeStatus';
document.forms.applicationDetailsForm.submit();[Submit]/a

-Adam

-Original Message-
From: Shoukat, Faisal [mailto:[EMAIL PROTECTED]
Sent: Friday, June 02, 2006 5:35 AM
To: Struts Users Mailing List
Subject: dispatch action error

Hi Guys,

 

I am after some advice with the following:

 

I am submitting a form which has the value as selected in a drop down.
From my struts config.xml it forwards to the correct dispatch action
class method. And does the processing within that method.  However just
before returning to the next jsp it throws the logging exception
recorded below where it states that I have tried to call a dispatch
action class with a parameter of ''. I don't understand why it makes
this second call.

 

I submit the form with the following link: 

 

   logic:equal name=cnt value=1

  a href=html:rewrite
page=/abc/applicationDetails.do/?method=changeStatusapplicantId=bea
n:wr
ite name=app property=appId/ 

 
onclick=javascript:document.forms.applicationDetailsForm.submit();retur
n
false;[Submit]/a

  /logic:equal

 

I have tried it with return false and without it.

 

Can anybody advise on this?

 

Thanks

 

10:08:12,253 DEBUG [LoginBarFilter] In doFilter() for request:
[EMAIL PROTECTED]

10:08:12,253 DEBUG [LoginBarFilter] checking access level

10:08:12,253 INFO  [LoginBarFilter] Level determined as SAVSUB

10:08:12,253 INFO  [LoginBarFilter] storing access level SAVSUB to
session with key access

10:08:12,253 INFO  [LoginBarFilter] setting module name for css to
AYRECRUIT

10:08:12,269 DEBUG [LoginBarFilter] Branding URL from DB = 

10:08:12,269 DEBUG [ModuleUtils] Get module name for path
/web/applicationDetails.do

10:08:12,269 DEBUG [ModuleUtils] Module name found: default

10:08:12,269 DEBUG [RequestProcessor] Processing a 'GET' for path
'/web/applicationDetails'

10:08:12,269 DEBUG [RequestUtils]  Looking for ActionForm bean instance
in scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestUtils]  Can recycle existing ActionForm
instance of type 'abc.forms.ApplicationDetailsForm'?: true

10:08:12,269 DEBUG [RequestUtils]  --
[EMAIL PROTECTED]

10:08:12,269 DEBUG [RequestProcessor]  Storing ActionForm bean instance
in scope 'session' under attribute key 'applicationDetailsForm'

10:08:12,269 DEBUG [RequestProcessor]  Populating bean properties from
this request

10:08:12,269 DEBUG [RequestProcessor]  Looking for Action instance for
class abc.actions.ApplicationDetailsAction

10:08:12,269 DEBUG [RequestProcessor]   Returning existing Action
instance

10:08:12,269 ERROR [DispatchAction] Action[/web/applicationDetails] does
not contain method named ''

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

at java.lang.Class.getMethod(Class.java:986)

at
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:3
22)

at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:
262)

java.lang.NoSuchMethodException:
abc.actions.ApplicationDetailsAction.(org.apache.struts.action.ActionMap
ping
, org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java

RE: [Struts + Tiles] JSTL problem on WebSphere Application Server 6

2006-06-02 Thread Samere, Adam J
I doubt that the include is not working. What version of JSTL are you
using? Do you have taglib entries in web.xml?

Can you explain JSTL stopped working a little more extensively?

-Original Message-
From: Rafael [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 02, 2006 11:01 AM
To: Struts Users Mailing List
Subject: [Struts + Tiles] JSTL problem on WebSphere Application Server 6

Hi Guys,

I've an application that uses Struts and Tiles, this application was
running on WebSphere 5.1 for almost 3 years but now when we moved to
WAS6 JSTL stopped working. Let me give an example:

we've a jsp page called taglibs.jsp, in this jsp page we've all the
struts, jstl taglibrary imports. So, when we need struts or JSTL in
another JSP page we just include this taglibs.jsp. Using - %@ include
file=/jsp/taglibs.jsp % , seems that WAS6 container support JSP 2.0
and somehow this caused the include directive to stop working. I found a
lot of messages in Forums and after I read the JSP 2.0 spec, I decided
to set encoding to each page. Isn't worked because actually include
directive includes content like- p Content /p but don't include
taglib directives like the one below.
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %


Any ideias ?

Thanks !!

-Rafael T Icibaci


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

Thank you. Paychex, Inc.


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



RE: [Struts + Tiles] JSTL problem on WebSphere Application Server 6

2006-06-02 Thread Samere, Adam J
Thanks for clarifying that. While taglib entries aren't required, they
can be used, and in troubleshooting a tag library issue it can be
important to know whether they are specified in web.xml or loaded
automatically from jar files.

-Adam

-Original Message-
From: John R. Dumonceaux [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 02, 2006 12:08 PM
To: Struts Users Mailing List
Subject: RE: [Struts + Tiles] JSTL problem on WebSphere Application
Server 6

For JSP 1.3 and higher you don't need the taglib entries in the web.xml.

The directive in the JSP file is all you need.

John Dumonceaux




Samere, Adam J [EMAIL PROTECTED]
06/02/2006 10:36 AM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
RE: [Struts + Tiles] JSTL problem on WebSphere Application Server 6






I doubt that the include is not working. What version of JSTL are you
using? Do you have taglib entries in web.xml?

Can you explain JSTL stopped working a little more extensively?

-Original Message-
From: Rafael [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 02, 2006 11:01 AM
To: Struts Users Mailing List
Subject: [Struts + Tiles] JSTL problem on WebSphere Application Server 6

Hi Guys,
 
I've an application that uses Struts and Tiles, this application was
running on WebSphere 5.1 for almost 3 years but now when we moved to
WAS6 JSTL stopped working. Let me give an example:

we've a jsp page called taglibs.jsp, in this jsp page we've all the
struts, jstl taglibrary imports. So, when we need struts or JSTL in
another JSP page we just include this taglibs.jsp. Using - %@ include
file=/jsp/taglibs.jsp % , seems that WAS6 container support JSP 2.0
and somehow this caused the include directive to stop working. I found a
lot of messages in Forums and after I read the JSP 2.0 spec, I decided
to set encoding to each page. Isn't worked because actually include
directive includes content like- p Content /p but don't include
taglib directives like the one below.
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %


Any ideias ?

Thanks !!

-Rafael T Icibaci


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

Thank you. Paychex, Inc.


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



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



RE: Image Button

2006-06-01 Thread Samere, Adam J
html:image src=/path/to/resource/

Or you could just put javascript in the onclick handler for a regular
image. 

-Original Message-
From: marcus biel (innoWake gmbh) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 01, 2006 5:59 AM
To: Struts Users Mailing List
Subject: Image Button


Hi,

I am looking for an example of how to create an image button in Struts.


Thanks,

Marcus


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


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

Thank you. Paychex, Inc.


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



RE: Image Button

2006-06-01 Thread Samere, Adam J
The html:image tag renders an input of type image, which is a submit
type button. If all you are looking for is to customize the size of the
standard submit button you can achieve this using CSS. 

-Original Message-
From: marcus biel (innoWake gmbh) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 01, 2006 7:47 AM
To: Struts Users Mailing List
Subject: AW: Image Button

 html:image src=/path/to/resource/

No, I don't need a regular image, I need a customized submit button.
The reason is, I need a submit button that is bigger then the regular
submit buttons, because this app needs to be usable on a touchscreen...


Marcus


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


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

Thank you. Paychex, Inc.


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



RE: Validating in Action?

2006-06-01 Thread Samere, Adam J
You can use the ActionMessage constructor that takes a string and a
boolean indicating whether or not the string is a key to be looked up in
a resource bundle. By setting this to false, the string is taken as a
literal.

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response){
...
  String myMessage = ...; // app logic that returns a string

  ActionMessages errors = new ActionMessages();

  // use GLOBAL_MESSAGE if message does not pertain to a
specific property
errors.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage(myMessage, false));
saveErrors(request, errors);
}
-Original Message-
From: marcus biel (innoWake gmbh) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 01, 2006 10:50 AM
To: Struts Users Mailing List
Subject: Validating in Action?

Hi,

I got a JSP, form and Action.
I want to add 3 values into an database.
This is done in my action.
The problem: I am using a Service to add the stuff to the db, and when
using this service, it throws error messages like artikel not found or
project not found.
Now I want to display these errors to the user -

The problem is I can't do those error validation in my ActionForm,
because only after doing the action I will know wether or not it
succeeded - so how can I then set the appropiate errormessages and
forward to the jsp?


Thanks,

Marcus 


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


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

Thank you. Paychex, Inc.


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



RE: Global forwards and actions

2006-06-01 Thread Samere, Adam J
Maya,

It looks like you need to use the html:rewrite/ tag to generate your url to 
the /Delete action.

form.action=html:rewrite action='/Delete'/;

The tag will look up your action and prepend the context path etc.

-Original Message-
From: Maya menon [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 01, 2006 2:42 PM
To: Struts Users Mailing List
Subject: Re: Global forwards and actions

well,
   
  Here is exactly what I have:
   
  1. jsp files are in /jsp folder.
  struts-config file entries and action classes. 
   
  struts-config entry is like this:
   
  action path=/Delete 
  type=com.xx.xxx.xxx.xxxaction 
  forward name=success path=/jsp/delete.jsp/
  forward name=failure path=/jsp/failure.jsp/
  /action
  

Monkeyden [EMAIL PROTECTED] wrote:
  

If that's the error you're getting, then that can't be your code. You're trying 
to request /jsp/Delete somewhere in your code. I suspect that the /jsp is a 
directory and thus will only be relevant to the action-forwards, not the form 
or the action-mapping.

On 6/1/06, Monkeyden wrote:

 The form action is the same as the action mapping in struts-config, 
 plus the .do, so if the form has:

   

 then the action mapping must be:

 


 On 6/1/06, Maya menon wrote:
 
  Ok, for delete.jsp I put action=delete.do
  form.action=Delete.do;
  form.submit ();
 
  In struts-config.xml, I put
 
type=com.xx.xxx.xxx.xxxAction 
  
  
  
 
  Now, when I run, it it gives me the following error:
  type Status report
  message Invalid path /jsp/Delete was requested description The 
  request sent by the client was syntactically incorrect (Invalid path 
  /jsp/Delete was requested).
 
  What am I missing here ?
 
 
  Maya menon wrote:
  Manoj,
 
  Thanks.
  So, just 2 action entries r fine, thats what you think.
 
  [EMAIL PROTECTED] wrote:
  Sample config
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  Note the following
  1. This is a typical example modify according to your need 2. Name 
  of the form is addForm and deleteForm in the xml above (You can 
  change as you want) 3. Ask questions I will answer them all (not 
  much work to do today) 4. Path in action mappings can be tile if 
  that is the case you will need a tile definition as well or a jsp 
  page(not a good idea to use jsp) 5. Optional: good idea to have all 
  these xml files per struts module Hope that helps Manoj
 
 
  -Original Message-
  From: Maya menon [mailto:cc]
  Sent: 01 June 2006 16:46
  To: user@struts.apache.org
  Subject: Global forwards and actions
 
  All,
 
  I want to understand this better:
 
  Say, I have one form , addDetails.jsp and another deleteDetails.jsp 
  addDetails.jsp when submitted should call AddAction and 
  deleteDetails should call Deleteaction.
 
  In adddetails I have and in delete I have
 
  Now, what all entries do I need in struts-config.xml for these to be 
  forwarded to the correct action classes ?
  thanks
  Maya
 
 
  -
  Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great 
  rates starting at 1¢/min.
 
 
 
  -
  Do you Yahoo!?
  Get on board. You're invited to try the new Yahoo! Mail Beta.
 
  __
  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 

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

Thank you. Paychex, Inc.


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



RE: html:link question

2006-05-31 Thread Samere, Adam J
You could use the message tag from JSTL to lookup and store the message
from your resource bundle. Then use the EL version of the Struts HTML
tag library to output the saved value.

%-- This stores the value of my.link.1 in myLink1 --%
fmt:message var=myLink1 key=my.link.1/

%-- now plug it in for the href attribute --%
html-el:link href=${myLink1} tabindex=3 something /html-el:link

-Adam

-Original Message-
From: rukka [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 10:32 AM
To: Struts Users Mailing List
Subject: html:link question

Hello,

I do have a  jsp tag like this:

html:link href=my.link.1  tabindex=3 something /html:link

I want to pull href link my.link from Message.resources
(Application.properties).

how do I do that?

Thanks in advance to any replies...

rukka

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


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

Thank you. Paychex, Inc.


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



RE: Displaying and error

2006-05-31 Thread Samere, Adam J
Try ${requestScope['org.apache.struts.action.EXCEPTION']}

-Original Message-
From: John Hutchinson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 1:41 PM
To: user@struts.apache.org
Subject: Displaying and error

Anyone know why this doesn't work in a JSP error page:

%@ page isErrorPage=true %

  c:choose
c:when test=${not empty
requestScope.org.apache.struts.action.EXCEPTION}
  test br /
  ${requestScope.org.apache.struts.action.EXCEPTION}
/c:when
   c:otherwise
no error found
   /c:otherwise
  /c:choose

I've forced an exception, and I see org.apache.struts.action.EXCEPTION
in the request attributes (with a value), but I always get 'no error
found'

Thanks!

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

Thank you. Paychex, Inc.


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



RE: Struts with Eclipse 3.1

2006-05-25 Thread Samere, Adam J
The best IDE support for struts in eclipse I've found is now owned by
BEA, and is called BEA Workshop Studio. It was formerly NitroX from m7.
It does a great job of providing development time error checking and
code completion in jsp and xml configuration files, including validation
and tiles configuration. It's quite pricy compared to alternatives like
MyEclipse, but well worth it in my eyes. It also provides support for
JSF and ORM.
http://workshopstudio.bea.com/index.html

-Original Message-
From: Maya menon [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 11:06 AM
To: user@struts.apache.org
Subject: Struts with Eclipse 3.1

All,
   
  Is it possible to use struts with Eclipse 3.1 ? If yes, how. Can
anyone please help.
   
  Thanks.


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

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

Thank you. Paychex, Inc.


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



RE: iterating over multiple Collections in one loop with JSTL

2006-05-25 Thread Samere, Adam J
How about creating a single list with an object to encapsulate the
values from list1 and list2 in a single entity?

Public class MyClassContainer {
private MyClass1 my1;
private MyClass2 my2;

...
} 

ListMyClassContainer = ...

myClassContainerList.add(new MyClassContainer(myClass1, myClass2));

Then in the JSP you only need one loop.

c:forEach var=myContainer items=myContainerList
c:set var=myClass1 value=${myContainer.my1}/
c:set var=myClass2 value=${myContainer.my2}/
...
/c:forEach

Adam

-Original Message-
From: Pat Slater [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 11:28 AM
To: user@struts.apache.org
Subject: iterating over multiple Collections in one loop with JSTL

Hi,
Is it possible to do with JSTL something like this: 
(Note: size of list1 and list2 are equal) List list1 = getList1(); List
list2 = getList2(); for(int i=0; ilist1.size(); i++) {
MyClass1 x1 = (MyClass1)list1.get( i );
MyClass2 x2 = (MyClass2)list2.get( i ); }


I can iterate with JSTL with forEach for either of the lists separately
but I need to display both of them in the same loop. How can I do that?



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

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

Thank you. Paychex, Inc.


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