well what im trying to ask is this:
 
assuming i have two form-bean definition in my struts config example namely: personInfoForm and contactInfoForm
 
what im trying to ask if it's possible for the two to exist in
one html form. i mean i will be entering the information
in the two form-bean on one html. and on submit will populate the two bean.
 
is that possible?
 
 
----- Original Message -----
Sent: Friday, February 28, 2003 1:51 PM
Subject: re:combining two form bean in one form

How do I include one file in another?
 
HTML itself offers no way to seamlessly incorporate the content of one file into another.
 
True dynamic inclusion of one HTML document (even in a different "charset") into another is offered by the OBJECT element, but due to shortcomings of browser versions in current use, it seems unwise to rely on this yet for essential content. The same can be said for IFRAME.
 
Two popular ways of including the contents of one file seamlessly into another for the WWW are preprocessing and server-side inclusion. A preprocessor converts its source into a plain HTML document that you publish on your server. In contrast, documents that use server-side inclusion are processed every time the document is retrieved from the server.
 
Preprocessing techniques include the C preprocessor and other generic text manipulation methods, and several HTML-specific processors. There is a nice annotated list of HTML preprocessors at <http://www.idocs.com/wmr/software/html+preprocessors/>.
 
Beware of making your "source code" non-portable. Also, the HTML can only be validated after preprocessing, so the typical cycle "Edit, Check, Upload" becomes "Edit, Preprocess, Check, Upload" (here, "Check" includes whatever steps you use to preview your pages: validation, linting, management walk-through etc.; and "upload" means whatever you do to finally publish your new pages to the web server).
 
A much more powerful and versatile preprocessing technique is to use an SGML processor (such as the SP package) to generate your HTML; this can be self-validating.
 
Examples of server-side inclusion are Server Side Includes (SSI, supported by Apache, NCSA, and other web servers), and Microsoft's Active Server Pages (ASP, supported by MS IIS). Processing occurs at the time the documents are actually retrieved. A typical inclusion looks like
 
<!--#include virtual="/urlpath/to/myfile.htm" -->
 
However, be sure to consult your own server's documentation, as the details vary somewhat between implementations. The whole directive gets replaced by the contents of the specified file.
 
Using server-side inclusion (a potentially powerful tool) merely as a way to insert static files such as standard header/footers has implications for perceived access speed and for server load, and is better avoided on heavily loaded servers. If you use it in this way, consider making the result cacheable (e.g., via "XBitHack full" on Apache; setting properties of the "Response" object in ASP). Details are beyond the scope of this FAQ but you may find this useful: http://www.mnot.net/cache_docs/
 
Proper HTML validation of server-side inclusion is only possible after server-side processing is done (e.g. by using an on-line validator that retrieves the document from the server).
 
Another approach is to create a database-backed site, as described in "Philip and Alex's Guide to Web Publishing" at <URL:http:// www.arsdigita.com/books/panda/>. A simple change to the database template instantly changes the whole site.
 
Finally, note that if the included file contains arbitrary plain text, then some provision must be made to convert the characters "&" and "<" (in the plain text file) to the entities "&amp;" and "&lt;" (in the HTML document).
 
Regards
Chetan
_______________________________
|                                                             
|     The trouble with being punctual
|      is that nobody's there to appreciate it.
|    
|    
|_______________________________

 

Reply via email to