RE: 2 forms on a single JSP
I believe your workaround is the recommended approach. That is, use one form bean for both forms. The form bean could implement two different Form interfaces (one per html:form) to make the seperation more obvious. -Original Message- From: Tim Sawyer [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 8:25 AM To: [EMAIL PROTECTED] Cc: Tim Sawyer Subject: 2 forms on a single JSP Hello. If I have two html:form's on a JSP page, that submit to two different actions, I have problems where those actions have different form beans. Either form works individually, but when put together I get an error when the page is displayed. The only way around this I have found is to create a single form bean, with the union of fields from both forms, and then to use that form for both the actions that are submitted to from that page. Is this a imitation? Is there a way around it? I'm using 1.0.2 not 1.1. ta, Tim. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: 2 forms on a single JSP
Thats what I figured. Unfortunately I have some generic code for one of the forms (it does a paged view of the data, 30 rows, 5 rows per page) so the form on this page will have to be a subclass of the generic one. Thanks, Tim. Jerome Jacobsen [EMAIL PROTECTED] wrote : I believe your workaround is the recommended approach. That is, use one form bean for both forms. The form bean could implement two different Form interfaces (one per html:form) to make the seperation more obvious. -Original Message- From: Tim Sawyer [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 8:25 AM To: [EMAIL PROTECTED] Cc: Tim Sawyer Subject: 2 forms on a single JSP Hello. If I have two html:form's on a JSP page, that submit to two different actions, I have problems where those actions have different form beans. Either form works individually, but when put together I get an error when the page is displayed. The only way around this I have found is to create a single form bean, with the union of fields from both forms, and then to use that form for both the actions that are submitted to from that page. Is this a imitation? Is there a way around it? I'm using 1.0.2 not 1.1. ta, Tim. -- To unsubscribe, e-mail: [EMAIL PROTECTED]; For additional commands, e-mail: [EMAIL PROTECTED]; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: 2 forms on a single JSP
To be honest, I can't remember. It was a while ago now, and I used the workaround. Now I'm on a more complex page and it would be neater to have two forms, so I was thinking before leaping in. The error was something like a Struts tag looking for a bean and not being able to find it. Which version of struts are you using? 1.0.2? Tim. [EMAIL PROTECTED] wrote : Hi Tim, What's the error that you're getting? In the application I'm working on we have 2 forms with 2 different form beans and 2 different actions on the same JSP, with no problem. Tim Sawyer [EMAIL PROTECTED]; wrote: Hello. If I have two html:form's on a JSP page, that submit to two different actions, I have problems where those actions have different form beans. Either form works individually, but when put together I get an error when the page is displayed. The only way around this I have found is to create a single form bean, with the union of fields from both forms, and then to use that form for both the actions that are submitted to from that page. Is this a imitation? Is there a way around it? I'm using 1.0.2 not 1.1. ta, Tim. -- To unsubscribe, e-mail: [EMAIL PROTECTED]; For additional commands, e-mail: [EMAIL PROTECTED]; __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED]; For additional commands, e-mail: [EMAIL PROTECTED]; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: 2 forms on a single JSP
I guess if the app couldn't find the form bean I would look at my struts-config.xml first to be sure that I had set up the action right. You might need to put the bean scope at the session level (not always desirable, I know). Tim Sawyer [EMAIL PROTECTED] wrote: To be honest, I can't remember. It was a while ago now, and I used the workaround. Now I'm on a more complex page and it would be neater to have two forms, so I was thinking before leaping in. The error was something like a Struts tag looking for a bean and not being able to find it. Which version of struts are you using? 1.0.2? Tim. [EMAIL PROTECTED] wrote : Hi Tim, What's the error that you're getting? In the application I'm working on we have 2 forms with 2 different form beans and 2 different actions on the same JSP, with no problem. Tim Sawyer [EMAIL PROTECTED]; wrote: Hello. If I have two html:form's on a JSP page, that submit to two different actions, I have problems where those actions have different form beans. Either form works individually, but when put together I get an error when the page is displayed. The only way around this I have found is to create a single form bean, with the union of fields from both forms, and then to use that form for both the actions that are submitted to from that page. Is this a imitation? Is there a way around it? I'm using 1.0.2 not 1.1. ta, Tim. -- To unsubscribe, e-mail: [EMAIL PROTECTED]; For additional commands, e-mail: [EMAIL PROTECTED]; __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED]; For additional commands, e-mail: [EMAIL PROTECTED]; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: 2 forms on a single JSP
I actually cut out the forms individually, and tested the page with just one form on (each form in turn). They both worked fine alone, just not at the same time! I've worked around again this time. Tim. [EMAIL PROTECTED] wrote : I guess if the app couldn't find the form bean I would look at my struts-config.xml first to be sure that I had set up the action right. You might need to put the bean scope at the session level (not always desirable, I know). Tim Sawyer [EMAIL PROTECTED] wrote: To be honest, I can't remember. It was a while ago now, and I used the workaround. Now I'm on a more complex page and it would be neater to have two forms, so I was thinking before leaping in. The error was something like a Struts tag looking for a bean and not being able to find it. Which version of struts are you using? 1.0.2? Tim. [EMAIL PROTECTED] wrote : Hi Tim, What's the error that you're getting? In the application I'm working on we have 2 forms with 2 different form beans and 2 different actions on the same JSP, with no problem. Tim Sawyer [EMAIL PROTECTED]; wrote: Hello. If I have two html:form's on a JSP page, that submit to two different actions, I have problems where those actions have different form beans. Either form works individually, but when put together I get an error when the page is displayed. The only way around this I have found is to create a single form bean, with the union of fields from both forms, and then to use that form for both the actions that are submitted to from that page. Is this a imitation? Is there a way around it? I'm using 1.0.2 not 1.1. ta, Tim. -- To unsubscribe, e-mail: [EMAIL PROTECTED]; For additional commands, e-mail: [EMAIL PROTECTED]; __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED]; For additional commands, e-mail: [EMAIL PROTECTED]; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]