aspose file tools*
The moose likes Struts and the fly likes Validating two different forms in the same JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validating two different forms in the same JSP" Watch "Validating two different forms in the same JSP" New topic
Author

Validating two different forms in the same JSP

Brendt Lucas
Greenhorn

Joined: Jan 04, 2007
Posts: 6
Hi All,

My first post here and was wondering if anyone could help me solve my little problem.

I have a JSP Page (lets call it register.jsp) and I have another JSP Page (InternationalPhoneNumber.jsp).

Register.jsp has a call to international using <tiles:insert page="InternationalPhoneNumber.do">

When you click the submit button I would like that both of these pages be validated. I have already set up both the struts-config.xml and the validation.xml files for both jsp's. The thing I can't figure out is how to tell register.jsp to validate itself and after that, validate internationalPhoneNumber.jsp.

I hope that all made sense.

Thanks in advanced,
Draco

BTW I'm using Struts 1.1
[ January 04, 2007: Message edited by: Draco2k7 ]
vaibhav anubhav
Greenhorn

Joined: Mar 24, 2006
Posts: 5
Hi
you can do in this way. Instead of on-submit validation, you can validate on blur.
Brendt Lucas
Greenhorn

Joined: Jan 04, 2007
Posts: 6
Hi vaibhav anubhav,

I hope my post wasn't confusing but let me clarify, I want to use the Struts Validation Framework, not javascript.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18989
    
    8

"Draco2k7", welcome to the JavaRanch.

We're a friendly group here, but we do require members to have valid display names.

Display names must include your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Draco: I assume you will change your name to meet the site policy....As far as I know, what you are proposing is not possible with Struts. To your browser the page will look like one big form and on the backend only one action will be executed and one action form populated.

- Brent
Brendt Lucas
Greenhorn

Joined: Jan 04, 2007
Posts: 6
Ah, sorry about that guys, I didnt bother to read the name policy, but I've changed it now.

Yeah... I thought that would be the outcome, but better to ask then do nothing.

Thanks and sorry again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validating two different forms in the same JSP