Explain Jsp Directives
By Ramakrishna on Oct 3, 2008 in Explain Jsp Directives
sp Directives:-
As part of Jsp’s we can provide the Jsp Directives using the Syntax:
<%@
java directives
%>
It is an instruction given by the JSP Developers to the Jsp Compiler.
If we need to use the class and interfaces that are part of the packages, as part of java code we must use the import statement in the java file as shown below.
Such as Here given an example for importing the packages, in the servlet programming
import java.lang.*;
import javax.servlet.*;
import java.sql.*;
But In the Jsp’s we can’t provide the import statement as shown above. For importing the packages we can use the following JSP Page Directives
The above packages can be written in jsp as shown below.This syntax is what we called as Jsp Directives
<%@ page import=”java.lang.*” %>
<%@ page import=”javax.servlet.* %>
<%@ page import=”java.sql.* %>
