Example:page1.jsp <%@page language=”java” %> <html> <head><title>Hello World JSP Page.</title></head> <body> <font size=”10″> <% String name=”Java”;…
Category: Advance Java
How to Page Directive in JSP
Page Directive:The page directive applies to an entire JSP page and any of its static include…
Introduction of Directives
Introduction of Directives : Directives are used to convey special information about the page container .directives…
How to use Expression in JSP
Example :exp1.jsp <html> <head> <title>JSP Expression Page</title> </head> <body> <h2>JSP Expression Page</h2> <p> <%= 3+3 %><br>…
Expression in JSP
Expression: A JSP expression is used to insert the value of a scripting language expression, converted…
How to print date in JSP
Example :date.jsp <HTML> <BODY> <% System.out.println( “Evaluating date now” ); java.util.Date date = new java.util.Date(); %>…
How to add Comments in JSP
Comment: A comment marks text or lines that the JSP container should ignore. A comment is…
Procedure to Mixing Scriptlets and HTML
Mixing Scriptlets and HTML: We have already seen how to use the “out” variable to generate…
Scriptlet in Java
Scriptlet: A scriptlet can contain any number of language statements, variable or method declarations, or expressions…
Example of Declaration
Declaration5.jsp <%! String name = “Java”; String date = “5 JULY, 2011”; %> <HTML> <TITLE>Declaration Example</TITLE>…