l(request.getParameter("email"));
// this is the method that will bind an object to a session
session.setAttribute("infoRequest", infoRequest);
%>
Click
Tag: session
JSP: Comment utiliser un fichier journal en JSP
Using Log Files
Using Log Files
This page writes to a log file.
<%
String address = request.getRemoteAddr();
String file = ((HttpServletRequest) request).getRequestURI();
session.getServletContext().log(
"User access! " +
" User IP: " + address +
" Resource: " + file
);
%>
Télécharger la bibliothèque baselet_batik-xml.jar
public static void dumpNode(org.w3c.dom.Node node)
public void (String msg, org.krysalis.barcode4j.impl.datamatrix.SymbolShapeHint shape)
public String ge
|
JSP: Utiliser un tableau de String en jsp
<%@ page session="false" %>
<%
String[] couleurs = {"Rouge", "Verte", "bleue"};
for (int i = 0; i < couleurs.length; i++) {
out.print("" + couleurs[i] + "
");
}
%>
JSP: Utilisation de la valeur “session” comme le scope de Bean
Using Beans and Session Scope
Using Beans and Session Scope
<%
bean1.setCounter(bean1.getCounter() + 1);
%>
The counter value is:
JSP: Exemple d’utilisation des objets
er", counter);
Integer applicationCounter = (Integer)application.getAttribute("applicationCounter");
if (applicationCounter == null) {
JSP: Affichage des informations d’une session en jsp
es}" value="${pageContext.session.creationTime}" property="time"/>
The creation time:
<
JSP: Utilisation d’un objet Result du package javax.servlet.jsp.jstl.sql.Result
olumn”>
java
JSP: Afficher la liste des Cookies
null && name.length()>0) {
added = new Cookie(name,value);
response.addCookie(added);
}
%>
Cookie List
JSP: Afficher le tableau ASCII en jsp
ingBuffer();
sb.append("");
sb.append(" ");
for (int col = 0; col < 16; col++) {
sb.append("");
sb.append(
java
Servlets: Créer une page de connexion qui mène à une nouvelle page
quest req, HttpServletResponse resp) throws ServletException,
java.io.IOException {
resp.setContentType(“text/html”);
java.io.PrintWriter out = re
java
JSP: Exemple d’utlidation de Scriplet
th>Fahrenheit
Celsius
<%
NumberFormat fmt = new DecimalFormat("###.000");
for (int f = 32; f <= 212; f += 20) {
double c = ((
Télécharger la bibliothèque easymock-2.2-retroweave.jar
public abstract org.ow2.easybeans.api.Factory getFactory(String arg1)
public abstract ClassLoader getClassLoader()
public abstract org.ow2.easybeans.api.E
|
Télécharger la bibliothèque easymock-1.0.jar
public abstract org.ow2.easybeans.api.Factory getFactory(String arg1)
public abstract ClassLoader getClassLoader()
public abstract org.ow2.easybeans.api.E
|