, JSP Java Server Pages. , , JSP . JSP HTML- , .
NetBeans Enterprise Pack Tomcat JSP Example JSTL Example. , Tomcat , apache, , example . NetBeans , , NetBeans, . , .
, . , http://localhost:8084//. , , . , , , . http://localhost:8084// .
JSP, , File/New Project/ Samples/J2EE1.4/Web /Tomcat JSP Example.
JSP, JSP, . , File/New Project/ Samples/J2EE1.4/Web / JSTL Example.
The Apache Software Foundation (http://www.apache.org/), http://www.apache.org/licenses/LICENSE-2.0.
- JSTL , JSP , Servlet . , JSP , JSTL JSP.
.
JSP
, Execute JSP. Source HTML- .
|
|
JSP HTML-, .jsp, .html .htm. HTML-, -. HTML- , HTML- .
, ${1 + 2} 3. \$ , ${} , .
JSP-
JSP ( Java):
- request . - , javax.servlet.http.HttpServletRequest.
- response . - , javax.servlet.http.HttpServletResponce.
- pageContext JSP. (, ). - javax.servlet.jsp.PageContext.
- session ( ). - , javax.servlet.http.HttpSession
- application . - , javax.servlet.ServletContext
- out . - javax.servlet.jsp.JspWriter
- config . - , javax.servlet.ServletConfig
- page , . - Object.
<%@ 1=1 2=2... %>
:
<%@ page session=true import=java.util.* %>
( )
<%@ %>Java . ,
<%
for(int i=0; i<table.getEntries().getRows(); i++) {
cal.Entry entr = table.getEntries().getEntry(i);
%>
,
<%@ prefix=" " uri=" " %>< : >
out JSTL Example. c ( customer ), prefix="c", out, taglib uri="http://java.sun.com/jsp/jstl/core":
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
, . out org.apache.taglibs.standard.tag.el.core.
Examples - General Purpose Tags.