C'è un modo per fare questo controllo jsp in una classe separata e creare quindi una pagina con il tag body che rimanda alla classe esterna che creera (stile servlet) i contenuti?
Ho letto dell'esistenza di una html di nome <servlet></servlet>, posso inserlo all'interno del body?
E' concettualmente sbagliato?
codice:<html> <head> <title>Titolo</title> </head> <body> <% if (request.getParameter("categoria").equals("politica")) { %> <table width=200> <tr> <td align=center> Prima Sezione - POLITICA </td> </tr> </table> <% } else if (request.getParameter("categoria").equals("finanza")) { %> <table width=200> <tr> <td align=center> Seconda Sezione - FINANZA </td> </tr> </table> <% } else if (request.getParameter("categoria").equals("sport")) { %> <table width=200> <tr> <td align=center> Terza Sezione - SPORT </td> </tr> </table> <% } %> </body> </html>

Rispondi quotando