Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Jakarta Server Pages
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Overview== [[File:JSP Model 2.svg|thumb|The JSP Model 2 architecture.]] Architecturally, JSP may be viewed as a high-level [[Abstraction (computer science)|abstraction]] of [[Jakarta Servlet]]s. JSPs are translated into servlets at runtime, therefore JSP is a Servlet; each JSP servlet is cached and re-used until the original JSP is modified.<ref>[http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro4.html The Life Cycle of a JSP Page (Sun documentation)]</ref> Jakarta Server Pages can be used independently or as the view component of a server-side [[model–view–controller]] design, normally with [[JavaBeans]] as the model and Java servlets (or a framework such as [[Apache Struts]]) as the controller. This is a type of [[JSP model 2 architecture|Model 2]] architecture.<ref>{{cite web |last1=Seshadri |first1=Govind |date=1999-12-29 |df=mdy |url=https://www.infoworld.com/article/2076557/understanding-javaserver-pages-model-2-architecture.html |title=Understanding JavaServer Pages Model 2 architecture |work=[[JavaWorld]] |access-date=2020-07-17}}</ref> JSP allows Java code and certain predefined actions to be interleaved with static web markup content, such as HTML. The resulting page is compiled and executed on the server to deliver a document. The compiled pages, as well as any dependent Java libraries, contain Java bytecode rather than [[machine code]]. Like any other .jar or Java program, code must be executed within a [[Java virtual machine]] (JVM) that interacts with the server's host [[operating system]] to provide an abstract, platform-neutral environment. JSPs are usually used to deliver HTML and XML documents, but through the use of OutputStream, they can deliver other types of data as well.<ref>{{Cite web|url=https://coderanch.com/t/286297/JSP/java/OutputStream-already-obtained|title=OutputStream already obtained (JSP forum at Coderanch)|website=coderanch.com}}</ref> The [[Web container]] creates JSP implicit objects like request, response, session, application, config, page, pageContext, out and exception. JSP Engine creates these objects during translation phase.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)