home *** CD-ROM | disk | FTP | other *** search
- <html>
- <body>
- <h1>Include Test</h1>
-
- <form method="post" action="inc.gsp">
-
- <input type="radio" name="template" value="1">1
- <input type="radio" name="template" value="2">2
-
- <p>
-
- <input type="submit">
- </form>
-
- <java>
- //
- // note, these assume that the file is in a directory "/examples/inc"
- // off the doc root. If that's not the case, please edit the paths
- // below to get this working
-
- Form form = request.getForm();
- if(form.getValue("template", false).equals("1")) {
- application.renderTemplate(request, response, "/examples/inc/inc_1.gsp");
- }
- else if(form.getValue("template", false).equals("2")) {
- application.renderTemplate(request, response, "/examples/inc/inc_2.gsp");
- }
- </java>
-
- </body>
- </html>