tag:blogger.com,1999:blog-29425680356539470442024-02-20T06:50:55.524-08:00Java TrainingNeeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.comBlogger61125tag:blogger.com,1999:blog-2942568035653947044.post-79574379899810167912019-01-06T08:15:00.000-08:002019-01-06T08:15:09.179-08:00the food of india <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: large;">Indian Food </span><br />
<span style="font-size: large;"> </span><b> </b><br />
Indian<b> </b>cuisine consists of a wide variety of regional and
traditional cuisines native to the Indian subcontinent. Given the range
of diversity in soil type, climate, culture, ethnic groups, and
occupations, these cuisines vary substantially from each other and use
locally available spices, herbs, vegetables, and fruits . Indian food is also heavily influenced by religion, in particular Hindu, cultural choices and traditions. The cuisine is also influenced by centuries of Islamic rule, particularly the Mughal rule. <br />
<br />
Who do not love the spiciness and the variety of Indian food from Chole Bhature to Sahi Paneer and Rajma Chaval . the ingredients are complex and diverse but still the simplicity of the food is very appreciable.the sweet and spicy taste of the food and the best thing is about that is healthy. there are only some cuisines in the world which fuse taste with health in a way that the Indian cuisine do. the combination of spices from all around the earth gives the food it complex taste<br />
om all around the earth gives the food it complex taste<br />
<br />
the variety of ingredients in the food gives food it's Indianans . But still the real taste comes form the Indian kitchens and the Indian women that cook it with all their love <br />
<br />
<br />
<br />
<br />
<span style="font-size: large;"> </span></div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-19178669255227766522015-11-21T03:31:00.005-08:002015-11-21T03:31:59.542-08:00A simple custom tag<div dir="ltr" style="text-align: left;" trbidi="on">
Defining a simple custom tag: To demonstrate the life cycle of a custom
tag practically, I am creating a simple Tag class, its TLD file and a
JSP page. This tag doesn’t do anything fancy, its purpose is just to let
you understand how a custom tag works. Here is the Source code of the
[…]<br />
<a href="http://www.techmentro.com/learningpad/a-simple-custom-tag/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-81895954384373239192015-11-21T03:30:00.000-08:002015-11-21T03:30:57.708-08:00Tag Library Descriptor<div dir="ltr" style="text-align: left;" trbidi="on">
Tag Library Descriptor: A Tag Library Descriptor (TLD) is a XML file
crated by the tag programmer to associate custom tags to their Tag
classes. With the help of a TLD file, a Tag programmer groups the
logically related tags to a library. It is used by the Tag Processor to
identify the Tag classes […]<br />
<a href="http://www.techmentro.com/learningpad/tag-library-descriptor/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-54492210387292773602015-11-21T03:28:00.000-08:002015-11-21T03:28:11.119-08:00TagSupport class of Tag API<div dir="ltr" style="text-align: left;" trbidi="on">
The TagSupport class: TagSupport is a helper class provided by Tag API.
It implements IterationTag interface which is a sub interface of Tag. It
is used as a super class by the custom tag classes. As an application
programmer defines a Servlet by extending HttpServlet class similarly
he/she can define a Tag by extending the […]<br />
<a href="http://www.techmentro.com/learningpad/tagsupport-class-of-tag-api/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-80979065277393769992015-11-18T03:02:00.001-08:002015-11-18T03:02:05.011-08:00Role of PageContext in custom tags<div dir="ltr" style="text-align: left;" trbidi="on">
What is PageContext? PageContext is an interface of the JSP API.
Implementation of it, is provided by server vendors. An object of type
PageContext is created by the server for each request of a JSP page to
store the references of the Servlet & JSP API objects which
participate in the processing of the request. […]<br />
<a href="http://www.techmentro.com/learningpad/role-of-pagecontext-in-custom-tags/" target="_blank">Read Complete Post..</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-39776454309784061602015-11-17T21:10:00.003-08:002015-11-17T21:10:28.712-08:00Tag life cycle methods<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="textPreview">
Tag life cycle: Tag life cycle describes how and when a tag
object is created, initialized, and is used by the tag processor for
processing a custom tag. Tag life cycle is defined by
javax.servlet.jsp.tagext.Tag interface with the help of following
methods: setPageContext(): It is the first method which is invoked by
the tag processor […]<br />
<a href="http://www.techmentro.com/learningpad/tag-life-cycle-methods/" target="_blank">Read Complete Post...</a> <br />
</div>
</div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-87609944068946926182015-11-17T21:09:00.001-08:002015-11-17T21:09:08.253-08:00Introduction to JSP Custom Tags<div dir="ltr" style="text-align: left;" trbidi="on">
Introduction to JSP custom tags: Custom tags are application
programmers’ defined actions which represent presentation logic as
reusable components. The facility of defining custom tags makes the JSP
extensible. To understand the use of custom tags, lets consider the
following scenario. Let there be a web application in which 10 pages
displays user data in […]<br />
<a href="http://www.techmentro.com/learningpad/introduction-to-jsp-custom-tags/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-8578100662201359692015-10-28T03:10:00.004-07:002015-10-28T03:10:59.319-07:00JSP Page Directive<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="textPreview">
JSP page directive: The page directive in JSP is used by
programmers to get the structure of the auto generated servlet modified
according to their requirements. It has following syntax: Commonly used
attributes of the page directive are: 1. import: This attribute is used
to get the specified packages imported in the auto generated servlet […]<br />
<a href="http://www.techmentro.com/learningpad/jsp-page-directive/" target="_blank">Read Complete Post...</a> <br />
</div>
</div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-74684153979022458482015-10-27T03:57:00.003-07:002015-10-27T03:57:45.803-07:00JSP include directive<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18.850000381469727px;">JSP include directive? include directive in JSP, is used by application programmers to get the contents of a page included to the current JSP at the time of translation. It has following syntax: You may recall that <jsp:include …/> action also has the same functionality. Now you should be wondering why are both the action […]</span><br />
<span style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18.850000381469727px;"><a href="http://www.techmentro.com/learningpad/jsp-include-directive/" target="_blank">Read Complete Post...</a></span></div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-87991855024402980972015-10-27T03:56:00.001-07:002015-10-27T03:56:38.931-07:00JSP Directive <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18.850000381469727px;">What is a directive? A directive in JSP, represents an instruction to the translator to modify the structure of the auto generated servlet at the time of translation on behalf of the programmer. You have been already told that for each JSP, a servlet class is auto generated. Sometimes modifications are required in this servlet […]</span><br />
<span style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18.850000381469727px;"><a href="http://www.techmentro.com/learningpad/jsp-directives/" target="_blank">Read Complete Post...</a></span></div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-52216508567217170042015-10-07T03:37:00.003-07:002015-10-07T03:37:52.419-07:00Practical example of external objects in JSP<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="textPreview">
Practical use of external objects in JSP: To demonstrate the use
of external objects with the help of useBean, setProperty &
getProperty actions, I have created a simple web application. Following
diagram describes the flow of application: Description of the diagram:
Source code of the application: First, the home page index.html.
<b>Rectangle Home</b> <form action="rect.jsp"> […]<br />
<a href="http://www.techmentro.com/learningpad/external-objects-in-jsp/" target="_blank">Read Complete Post..</a>. <br />
</div>
</div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-89228880247302056912015-10-06T03:42:00.001-07:002015-10-06T03:42:39.936-07:00JSP getProperty action tag<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="textPreview">
getProperty action of JSP: <jsp:getProperty /> action is
used to write the value a bean property to the output stream. It is used
when a property value is to be sent as response. It has following
syntax: Let following be an external object in a JSP page. To write the
value of mailId property of […]<br />
<a href="http://www.techmentro.com/learningpad/jsp-getproperty-action-tag/" target="_blank">Read Complete Post...</a> <br />
</div>
</div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-57880296589180204412015-10-06T01:36:00.001-07:002015-10-06T01:36:19.968-07:00JSP useBean action tag<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="textPreview">
External objects in JSP: In a JSP page, two types of objects can
be used: 1. implicit objects 2. external objects Implicit objects are
Servlet & JSP API objects which are made available by default in the
_jspService() method. External objects are objects of user defined or
library classes which are created in the _jspService() […]<br />
<a href="http://www.techmentro.com/learningpad/jsp-usebean-action-tag/" target="_blank">Read Complete Post...</a> <br />
</div>
</div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-66359893226511785052015-10-06T01:35:00.000-07:002015-10-06T01:35:06.855-07:00Action tags of JSP<div dir="ltr" style="text-align: left;" trbidi="on">
The Action tags of JSP: Action tags in JSP facilitate automation of
common operations such as creation of objects, setting objects’
properties, writing objects’ property values to the output stream,
including the contents of a component to the response of current request
and forwarding request to another component etc. An action tag has
following syntax: […]<br />
<a href="http://www.techmentro.com/learningpad/action-tags-of-jsp/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-90960429928527502732015-10-05T02:41:00.004-07:002015-10-05T02:41:55.539-07:00Expression tag of JSP<div dir="ltr" style="text-align: left;" trbidi="on">
The expression tag of JSP: Expression tag in JSP has two use. 1. It is
used to write the value of an expression to the output stream i.e. It
provides a short hand mechanism of evaluating expressions and writing
their values to the response. 2. It is used to assign the value of
variables and […]<br />
<a href="http://www.techmentro.com/learningpad/expression-tag-of-jsp/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-36891583571984492142015-10-05T02:40:00.004-07:002015-10-05T02:42:13.084-07:00Declaration tag of JSP<div dir="ltr" style="text-align: left;" trbidi="on">
The declaration tag of JSP: declaration tag in JSP facilitate data
members and methods definition in the auto generated servlet. Main use
of this tag is the overriding of jspInit() and jspDestroy() methods. You
have been told that for each JSP a servlet is auto generated at the
time of translation. If this class was […]<br />
<a href="http://www.techmentro.com/learningpad/declaration-tag-of-jsp/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-38230407860055588202015-10-03T22:41:00.000-07:002015-10-03T22:41:22.164-07:00Scriptlet tag of JSP<div dir="ltr" style="text-align: left;" trbidi="on">
The scriptlet tag of JSP: Scriptlet is the main tag of JSP. It is used
to add request processing logic to a JSP page. A JSP page may contain
any number of scriptlet tags. It has following syntax: At the time of
translation, contents of the scriptlet tags are copied as it is to the
[…]<br />
<a href="http://www.techmentro.com/learningpad/scriptlet-tag-of-jsp/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-70441438256540918762015-10-03T22:39:00.000-07:002015-10-03T22:39:38.087-07:00understanding JSP life cycle<div dir="ltr" style="text-align: left;" trbidi="on">
The JSP life cycle: JSP life cycle is defined by JspPage and HttpJspPage
interfaces. Similar to servlet, JSP life cycle has three methods:
jspInit(), jspDestroy() and _jspService() . javax.servlet.jsp package
contains classes and interface of JSP API. Main classes and interfaces
of the JSP API are: JspPage: It extends Servlet interface and provides
following JSP […]<br />
<a href="http://www.techmentro.com/learningpad/jsp-life-cycle/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-3842687166403685292015-10-03T22:37:00.000-07:002015-10-03T22:37:08.713-07:00Introduction to JSP<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="textPreview">
Limitations of servlet: Servlet as web application development
technology has following drawbacks: 1. Developing web applications using
servlet is unproductive i.e. a lot of code need to written even for
simple tasks. 2. A servlet is responsible for dynamic content generation
as well as presentation. This intermixing of dynamic content generation
logic with the presentation […]<br />
<a href="http://www.techmentro.com/learningpad/introduction-to-jsp/" target="_blank"> Read Complete Post...</a></div>
</div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-18180565828053996332015-10-03T22:35:00.002-07:002015-10-03T22:35:27.438-07:00Servlet 3 file upload example<div dir="ltr" style="text-align: left;" trbidi="on">
Steps required to upload a file: 1. In html form, request type is set to
post and enctype is set to multipart/form-data. 2. <input
type=”file” > element is used in the html form to facilitate
selection of the file from the file system. 3. In the servlet multi part
request is parsed to obtain file […]<br />
<a href="http://www.techmentro.com/learningpad/servlet-3-file-upload-example/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-48715017571331805002015-10-03T22:34:00.000-07:002015-10-03T22:34:09.288-07:00Practical use of @WebServlet and other annotations<div dir="ltr" style="text-align: left;" trbidi="on">
To demonstrate the practical use of servlet annotations, I have created a
web application which have two servlets (ProcessingServlet &
ForwardingServlet), a listener (HitCounterListener), a filter
(HitCounterFilter) and a HTML page (index.html). When the application is
deployed, HitCounterListener sets an attribute named hitCount in the
application scope to count the no. of hits of the […]<br />
<a href="http://www.techmentro.com/learningpad/webservlet-and-other-annotations/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-52863131915659356012015-10-03T22:32:00.000-07:002015-10-03T22:32:02.596-07:00Servlet annotations and their advantages over xml<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="textPreview">
What is an annotation? An annotation is a class member, the
purpose of which is to describe other members of the class. The literal
meaning of the word annotation is: a note added to describe or clarify
something. In real life we all use annotations. When you write the
meaning of a word over it […]<br />
<a href="http://www.techmentro.com/learningpad/servlet-annotations/" target="_blank">Read Complete Post...</a> </div>
</div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-26104416740849710532015-10-03T22:30:00.000-07:002015-10-03T22:30:01.332-07:00Filter and request dispatching<div dir="ltr" style="text-align: left;" trbidi="on">
Filter and request dispatching: In addition to a direct request, a
servlet can be invoked internally through forwarding or inclusion. If a
filter is associated to a servlet then will it inovke when a request is
internally forwarded to the servlet or its response is included to
another servlet’s response? By default, a filter which […]<br />
<a href="http://www.techmentro.com/learningpad/filter-and-request-dispatching/" target="_blank">Read Complete Post...</a> </div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-89708859245928015682015-10-03T22:28:00.000-07:002015-10-03T22:28:42.544-07:00Practical example of a filter<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="textPreview">
A scenario for the practical use of a filter: To demonstrate the
practical use of a filter in a web application, I am creating a filter
which checks the URI of each incoming request. If the request is for the
home page or the servlet which authenticates, simply requested
component is invoked by the filter. […]<br />
<a href="http://www.techmentro.com/learningpad/practical-example-of-a-filter/" target="_blank">Read Complete Post...</a> </div>
<div class="textPreview">
</div>
</div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0tag:blogger.com,1999:blog-2942568035653947044.post-25607411578382586352015-10-03T22:26:00.000-07:002015-10-03T22:26:36.186-07:00What is the role of FilterChain?<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="textPreview">
What is FilterChain? FilterChain is an interface of the servlet
API. Implementation of it, is provided by server vendors. It provides
following method: You may recall that the Filter interface also has
doFilter() method. That method has three parameters one of which is a
FilterChain object. The doFilter() method of the Filter interface is
used […]<br />
<a href="http://www.techmentro.com/learningpad/what-is-the-role-of-filterchain/" target="_blank">
</a></div>
<a href="http://www.techmentro.com/learningpad/what-is-the-role-of-filterchain/" target="_blank">Read Complete Post...</a> <br />
</div>
Neeraj Kumarhttp://www.blogger.com/profile/08766309684778696800noreply@blogger.com0