AF
HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
AF
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.



java-jsp: Could you please explain the JSP directives?

1) page directive
2)include directive
3)taglib directive

In which situation these directives are used.

Explain the above mention JSP directive concepts with taking following fields.

student id, student name, student address.

These data should store in oracle database.


java x 210
jsp x 32
Posted On : 2016-09-06 17:36:59.0
profile MOHAMMAD SALEEM BASHA - anyforum.in MOHAMMAD SALEEM BASHA
266150
up-rate
-3
down-rate

Answers


There is no relation between your form elements and JSP directives. Each directives is used for specific purpose.

Uses of Page directive:
----------------------------------------------------
<%@ page import="java.util.Date" %>
or
<%@ page info="created by ABCD" %>
or
<%@ page isELIgnored="true" %>//Now EL will be ignored
or
<%@ page errorPage="myerrorpage.jsp" %>
or
<%@ page isErrorPage="true" %>

Use of include directive:
------------------------------------------------------
The include directive is used to include the contents of any resource it may be jsp file, html file or text file. The include directive includes the original content of the included resource at page translation time (the jsp page is translated only once so it will be better to include static resource).

<%@ include file="header.html" %>


Use of taglib directive:
---------------------------------------------------
The JSP taglib directive is used to define a tag library that defines many tags. We use the TLD (Tag Library Descriptor) file to define the tags. In the custom tag section we will use this tag so it will be better to learn it in custom tag.

for example as we use struts UI tags, we define like this:

<%@ taglib uri="/struts-tags" prefix="s" %>
<s:form action="#">
<s:text name="name" label="Name"><s:text>
<s:register value="Register"/>
</s:form>

Posted On : 2016-09-06 23:23:14
Satisfied : 1 Yes  0 No
profile Rishi Kumar - anyforum.in Rishi Kumar
523185319307
Reply This Thread
up-rate
5
down-rate



Post Answer
Please Login First to Post Answer: Login login with facebook - anyforum.in