Professional Documents
Culture Documents
Guia01 Ejemplos Simple Con JSP
Guia01 Ejemplos Simple Con JSP
Guia01 Ejemplos Simple Con JSP
jspExample1.jsp Output
<html>
<body>
<%
out.print("Hello World!");
%>
</body>
</html>
jspExample2.jsp Output
<html>
<body>
<%="Hello World!"%>
</body>
</html>
jspExample3.jsp Output
<html>
<body>
jspInt.jsp Output
<html>
<body>
int variable having value : <%=iVariable%>
</body>
</html>
3. Long variable is same as int variable just long can store more bytes than int.
jspFloat.jsp Output
<html>
<body>
float variable having value : <%=fVariable%>
</body>
</html>
When you work on float variable don’t forget to add f character float fVariable=567.345f,
otherwise it will get error of “Type mismatch: cannot convert from double to float”
jspBoolean.jsp Output
boolean checkCondition=false;
%>
<html>
<body>
<%
if(checkCondition==true)
{
out.print("This condition is true");
}
else
{
out.print("This condition is false");
}
%>
</body>
</html>
http://www.easywayserver.com/jsp/JSP-example.htm