Weekend -Special offer upto 50% off | OFFER ENDING IN: 0 D 0 H 0 M 0 S

Log In to start Learning

Login via

Post By Admin Last Updated At 2020-06-15
Expression Language
Expression Language (EL):

The Expression Language (EL) streamlines the openness of information put away in the Java Bean segment, and different items like demand, session, application and so forth. There are numerous understood items, administrators and save words in EL. It is the recently included component in JSP innovation variant 2.0.

Syntax :
${ expression }
 Implicit Objects in Expression Language (EL):
Implicit Objects
Example:
index.jsp
Enter Name:

process.jsp
Welcome, ${ param.name }Operators in EL:Operators in EL Reserve Words in EL:Reserve wordsMVC in JSP :

MVC remains for Model View and Controller. It is an outline design that isolates the business rationale, introduction rational and information. Controller goes about as an interface among View and Model. Controller captures all the approaching solicitations. Display speaks to the condition of the application i.e. information. It can likewise have business rationale. View speaks to the presentation i.e. UI(User Interface).

Advantage of MVC (Model 2) Architecture

  • Route Control is unified
  • The custom labels make the likelihood to reuse a similar business rationale over and over.MVC Architecture
    JSTL (JSP Standard Tag Library):
    JSTL looks like a group of tags to make easy the JSP development.
    Advantage of JSTL
    • Code reusability
    • Fast development
    • No need to use scriptlet tag JSTL Tags:JSTLCustom Tags in JSP:Custom labels are client characterized labels. They dispose of the likelihood of scriptlet tag and isolates the business rationale from the JSP page. A similar business rationale can be utilized ordinarily by the utilization of custom tag. Advantages:
      Eliminates the need of scriptlet tag: The custom labels wipes out the need of scriptlet label which is viewed as awful programming  approach in JSP.
      Separation of business logic from JSP: The custom labels isolate the business rationale from the JSP page with the goal that it might be anything but difficult to keep up.
      Re-usability: The custom labels make the likelihood to reuse a similar business rationale over and over.

    Syntax :
    There are two ways to use the custom tag.body code
    JSP Custom Tag API:Custom TagJspTag interface
    The JspTag is the root interface for every one of the interfaces and classes utilized as a part of custom tag. It is a marker interface.Tag interface The Tag interface is the sub interface of JspTag interface. It gives strategies to perform activity toward the   begin and end of the tag.Field Name with Tag Interface
    Methods of Tag interface:
    Methods of Tag Interface
    Iteration Tag interface:
    The IterationTag interface is the sub interface of the Tag interface. It gives an extra strategy to reexamine the body.
    Field of IterationTag interface :There is just a single field characterized in the IterationTag interface.public static int EVAL_BODY_AGAIN it reconsiders the body content.
    Method of Tag interface:
    it is summoned by the JSP page execution protest after the assessment of the body. In the event that this strategy returns EVAL_BODY_INCLUDE, body substance will be reexamined, on the off chance that it returns SKIP_BODY, no more body content will be assessed.TagSupport class :The TagSupport class actualizes the IterationTag interface. It goes about as the base class for new Tag Handlers. It gives some extra techniques moreover.Attributes in JSP Custom Tag:There can be characterized an excessive number of properties for any custom tag. To characterize the characteristic, you have to perform two assignments. Characterize the property in the TagHandler class with the characteristic name and characterize the setter strategy .characterize the trait component inside the label component in the TLD document.