
0
JSP: Formulaire JSP: comment gérer les valeurs par défaut des paramètres
ut type="submit" value="Submit details" /> </form> </body> </html> //displayDetails.jsp <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <ht |

Comments Off on JSP: Utilisation de tableaux Multidimensionnels
JSP: Utilisation de tableaux Multidimensionnels
<HTML> <HEAD> <TITLE>Using Multidimensional Arrays</TITLE> </HEAD> <BODY> <H1>Using Multidimensional Arrays</H1> <% double accounts[][] = new double[2][100]; accounts[0][3] = 11.09; accounts[1][3] = 19.07; out.println("Savings Account 3 holds $" + accounts[0][3] + "<BR>"); out.println("Checking Account 3 holds $" + accounts[1][3]); %> </BODY> </HTML> |

Servlets: Exemples d’utiliastion des paramètre des URLs
response.getOutputStream(); String fileName = request.getParameter("file"); out.println("<html>"); out.println("<head>"); out.println("<title>W |

JSP: Création d’une classe de gestion d’exception personnalisée
value = v; } } void doWork(int value) throws NewException { if(value |

Comments Off on Java Persistane: Comment utiliser une colonne clé primaire comme une colonne de jointure.
Java Persistane: Comment utiliser une colonne clé primaire comme une colonne de jointure.
} public void setId(int id) { this.id = id; } public int getLot() { return lot; } public void setLot(int lot) { |

JSP: Comment traiter les cookies?
l.value.value}" /><br><br> </c:forEach> </c:otherwise> </c:choose> </body> </html> // cookieSetter.jsp <jsp:useBean id="cookieBean" class="com.java2s.CookieB |

JSP: Exemple de Catch multiple
<HTML> <HEAD> <TITLE>Catching an ArrayIndexOutOfBoundsException Exception</TITLE> </HEAD> <BODY> <H1>Catching an ArrayIndexOutOfBoundsException Exception</H1> <% try { int array[] = new int[100]; array[100] = 100; } catch (ArrayIndexOutOfBoundsException e) { out.println("Array index out of bounds."); } catch(ArithmeticException e) { out.println("Arithmetic exception: " + e); } catch(Exception e) { out.println("An error occurred: " + e); } %> </BODY> </HTML> |

JSP: Comment soummetre un bouton radio
NPUT TYPE="radio" NAME="radios" VALUE="radio3"> Radio Button 3 <BR> <INPUT TYPE="submit" VALUE="Submit"> </FORM> |

JSP: Utlisation de XSLT dans une page JSP
new XSLTInputSource("games.xsl"), new XSLTResultTarget(bos)); out.println(bos); } catch (Exception ex) { |

JSP: Utilisation de jspInit et jspDestroy
<HTML> <HEAD> <TITLE>Using jspInit and jspDestroy</TITLE> </HEAD> <BODY> <H1>Using jspInit and jspDestroy</H1> <%! int number; public void jspInit() { number = 5; } public void jspDestroy() { number = 0; } %> <% out.println("The number is " + number + "<BR>"); %> </BODY> </HTML> |

JSP: Informations Locales, Pays, Langue, Fuseaux Horaire, etc
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <html> <head><title><fmt:message key="Welcome" bundle="i18n.WelcomeBundle" /></title></head> <body> <h2>Here is your Locale info...</h2> <fmt:message key="Welcome" bundle="i18n.WelcomeBundle" /> <%-- <c:set var="clientLocale" value="${pageContext.request.locale}" /> Locale: <c:out value="${clientLocale.displayName}" /> <br /> Locale country: <c:out value="${clientLocale.displayCountry}" /> <br /> Locale language: <c:out value="${clientLocale.displayLanguage}" />--%> </body> </html> |