What jsp that?
java server pages (jsp) be a tenologi servlet-based that used in web tier to present dynamic and static content. jsp be text-based and majority full template text html that united with specific tags dynamic content.
why use jsp?
- since jsps be document text like html, developers avoid formats and manipulation that make possible string very long to produce output. content html now is not being embeddinged with assortedly code from java. this matter makes it easier to maintained.
- jsps more knowledgeable by everybody with eruditions from html, only with study markup dynamic. this matter makes it may be to desainer site to make template html from a site, with developers processed it in a moment later to put into tags that produce dynamic content. this matter also make easy in web development page.
- jsps has built-in that support for software component use that can be used back(javabeans). this matter not only lets developers avoid possibilities finds to return kernel/rudder from every application, has supporter software to separate software component to handle logic promotes separation from presentation and business logic.
- jsps, be solution part from java for web application developers, be multi-platform indivisible and can be run in various container servlet
compatible, beglectfully vendor or the operation system.
- in the hook by work jsps, they don't want compilation from developers. this compilation there for us in container servlet. modification jsps detected automatically. this matter is relatively makes it easy to built.
picture on file jsp simple that do expectation to site user information date and time in this time for user.
from example on, we can see that file jsp be most of html. only in this part is difference:
<%= new java.util.Date()%>
this matter is part from java code to display day and date forthwith. this matter simplifies for make new object to makes object date and display it as string.
under this be result output from file jsp on.
Use IDE enterprise
jsp can be run from assorted project web application in IDE. with assumption that project is ready.
spesification from file jsp this then can be run from IDE directly with depress shift + f6. alternative other, project web can be run as WAR file and upload into server. then jsp can be accessinged with url typing follow:
use build tool
jsp also can be run with keep it as WAR file by using build tool(like one of the outlined in chapter servlet base), and then run WAR file into server web.
jsp file must be kept in directory web.
container servlet regulate jsps at one particular manner to regulate servlet itself: pass use a channel jsp so can be run well.
method servlet that taken from container different: jspinit() for phase initialization, _jspservice() to service phase, and jspdestroy() to destroy phase.
from example jsp that given, seen to stump to discuss method jspinit or _jspservice(). example from jsp only simple text page majority come from content html: he doesn't has method other. answer from matter: jsps -compile into class servlet same by server. this matter causess class servlet that handle demand for page jsp. translasi this putted into to into servlet and compilation subsequent finished used by server: unnecessary developers doubt about how prosedure this finished.
if you hope to see class servlet -generate installation from kiss server application 8.1 laid them in this directory: