Where “D:/.keystore” is the path where file should be created.
Instead of alias “tomcat” any other name can be used.
After running above command, you will be asked many questions, so answer them correctly as shown in below image:
Example of Simple JSP Tiles application without Struts
There are very few resources available on internet which explains step by step integration of tiles in simple jsp page. Apache Tilesâ„¢ is a templating framework built to simplify the development of web application user interfaces.
Tiles allows authors to define page fragments which can be assembled into a complete page at runtime. These fragments, or tiles, can be used as simple includes in order to reduce the duplication of common page elements or embedded within other tiles to develop a series of reusable templates. These templates streamline the development of a consistent look and feel across an entire application.
we have seen that how to create the custom JSP tag using interface “Tag”, means tags which does not have a body. In this article, I will explain creating custom Tags which have a body. We can manipulate the content of body as we want.
This article is about creating custom Tag in JSP using “Tag” interface.
Creating custom tag in JSP has its unique advantages. This is same as Custom controls of the ASP.Net.
By creating the Custom tag, we can resuse that tag every where in our application. Best example of custom tags are the Struts.
Types of Tag:
Tag without body:
<ct:showTime displayTime="false" />
Tag with body:
<ct:showTime displayTime="false" >
Current Time is :
As ther are two types of tag, there are two way of creating them in JSP:
By implementing below interfaces:
Or by extending any of the two below class (provides default implementation of interfaces discussed above):
TagSupport (internally implements Tag)
BodyTagSupport (internally implements BodyTag)
In this article, I will use the interface approach, so that the beginners can get broader idea about how Tag library actually implemented.
The interface of a classic tag handler that does not want to manipulate its body. The Tag interface defines the basic protocol between a Tag handler and JSP page implementation class.
The Tag interface specifies the setter and getter methods for the core pageContext and parent properties.
There are two main actions: doStartTag and doEndTag. Once all appropriate properties have been initialized, the doStartTag and doEndTag methods can be invoked on the tag handler. Between these invocations, the tag handler is assumed to hold a state that must be preserved. After the doEndTag invocation, the tag handler is available for further invocations (and it is expected to have retained its properties).
Empty and Non-Empty Action:
If the TagLibraryDescriptor file indicates that the action must always have an empty action, by an entry of “empty”, then the doStartTag() method must return SKIP_BODY.
Otherwise, the doStartTag() method may return SKIP_BODY or EVAL_BODY_INCLUDE.
If SKIP_BODY is returned the body, if present, is not evaluated.
If EVAL_BODY_INCLUDE is returned, the body is evaluated and “passed through” to the current out.
Servlet, Hibernate, jQuery and Ajax based google like chat with source code
Hi, In this article, my aim is to create an application which uses the concept of Hibernate in Servlet with Ajax support of Jquery.
Below figure can give you the idea of final look and feel of the complete application: