- From: Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de>
- Date: Mon, 22 May 2000 18:11:11 +0200
- To: W3 Jigsaw Mailinglist <www-jigsaw@w3.org>
Hi ! ---- Does anyone know how to define a function within a JSP (tomcat 3.1 JSP) ? I'd like to do something like the following (non-working) example: -- snip -- <% boolean isDefined( HttpServletRequest req, String name, String value ) { String vals[] = (String [])req.getParameterValues(name); if (vals != null) { for (int i = 1; i<vals.length; i++) { if( value.equalsIgnoreCase(vals[i]) ) return true; } } return false; } %> <html> <body> <% java.util.Date d = new java.util.Date(); %> The current date is <%= "date == " + d + " " + isDefined(request, "test", "mark1") %> <p /> </body> </html> -- snip -- Any ideas ? ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) Roland.Mainz@informatik.med.uni-giessen.de \__\/\/__/ gisburn@informatik.med.uni-giessen.de /O /==\ O\ MPEG specialist, C&&JAVA&&Sun&&Unix programmer (;O/ \/ \O;) TEL +49 641 99-13193 FAX +49 641 99-41359
Received on Monday, 22 May 2000 12:11:31 UTC