RE: Validation not displaying

2003-04-03 Thread Chen, Gin
Please disregard this.
I'm tired and I set up my validation without the required messages. *sigh*
-Tim

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 12:45 PM
To: 'Struts Users Mailing List'
Subject: Validation not displaying


The submit is returning to the input page so I'm pretty sure that validation
is working but no messages are being displayed.

---
//jsp
html:errors/

html:messages id=msg message=true
name=org.apache.struts.action.GLOBAL_MESSAGE
c:out value=${msg} escapeXml=false/
/html:messages

html:form action='/companySearch'
html:text property='companyName'/
html:submit styleClass=smButtonbean:message
key='button.search'//html:submit
/html:form

//struts-config.xml
form-bean name=selectCompanyForm
type=org.apache.struts.validator.DynaValidatorForm
 form-property name=companyName type=java.lang.String/
/form-bean

plug-in className=org.apache.struts.validator.ValidatorPlugIn
set-property property=pathnames

value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml,/WEB-INF/validat
ion-dyna.xml/
/plug-in

//validation-dyna.xml
form name=selectCompanyForm
field property=companyName depends=required
arg0 key=prompt.company.name/
/field
/form

//ApplicationResources.properties
prompt.company.name=A company name is required to search on

-Tim

-
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: Validation FW: Displaying messages passed the request

2001-08-28 Thread Paradis, André



Matt,

Doing 
a redirection causes a new request to be created, thus you 
loose
everything you put in the previous request object. You could save 
your messages in user session scope, then do your redirection. The next 
page will have access to the user session and you'll be able to read those 
messages. After messages are read, you can remove the bean from session 
scope in order preserve memory on the server.

Andre 
Paradis

  -Original Message-From: Matt Raible 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, August 28, 2001 2:01 
  PMTo: Struts UserSubject: Validation FW: Displaying 
  messages passed the request
  I have a SaveAction that sets up some success 
  messages using:
  messages.add(new ActionMessage("timesheetManage.save.success")); 

  saveMessages(Constants.MESSAGE_KEY, request, 
  messages);
  
  
  And upon this save, the findForward("success") 
  forwards to another action class with:
  
  forward 
  name="success" 
  path="/do/editTimesheet?action=Edit" redirect="true" /
  
  But on the JSP after, there are no messages 
  displayed. I know the answer why, and that is because 
  "redirect=true". However, this is the only way I can forward to another 
  action class in iPlanet.
  
  Anyone know of a workaround to carry these 
  messages into the next page? Can I check the request in "editTimesheet" 
  to see if messages exist, and if so - add them to the request 
  again?
  
  Thanks,
  
  Matt