ECOM/hello.jsp: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<html> <head> <title><%= application.getServerInfo() %></title> </head> <body> <h1> Hello <% String pname; // déclaration de variable pname = request.getParameter(...") |
No edit summary |
||
| Line 1: | Line 1: | ||
<pre> |
|||
<html> |
<html> |
||
<head> |
<head> |
||
| Line 22: | Line 23: | ||
</body> |
</body> |
||
</html> |
</html> |
||
</pre> |
|||
Latest revision as of 17:03, 30 August 2014
<html>
<head>
<title><%= application.getServerInfo() %></title>
</head>
<body>
<h1> Hello
<%
String pname; // déclaration de variable
pname = request.getParameter("name"); // request : objet implicite
if (pname== null) {
Object aname = request.getAttribute("name");
if(aname==null) {
out.println("World");
} else {
out.println(aname);
}
} else {
%>
Mister <%=pname%>
<% } // fin du else %>
</h1>
</body>
</html>