b'\n_START_ARTICLE_\nJavaServer Pages\n_START_PARAGRAPH_\nJavaServer Pages ir servera puses Java tehnolo\xc4\xa3ija, kas \xc4\xbcauj izveidot dinamiski \xc4\xa3ener\xc4\x93tas t\xc4\xabmek\xc4\xbca lapas HTML, XML vai cit\xc4\x81 form\xc4\x81t\xc4\x81. Arhitektoniski JSP var skat\xc4\xabt k\xc4\x81 Java servleta augsta l\xc4\xabme\xc5\x86a abstrakciju. Tehnolo\xc4\xa3iju izstr\xc4\x81d\xc4\x81jusi Sun Microsystems 1990. gadu beig\xc4\x81s._NEWLINE_JSP \xc4\xbcauj statisk\xc4\x81 t\xc4\xabmek\xc4\xbca lap\xc4\x81 iek\xc4\xbcaut Java kodu vai EL form\xc4\x81t\xc4\x81 rakst\xc4\xabtus fragmentus. Kad t\xc4\xabmek\xc4\xbca klients pieprasa lapu, to JSP Servlet Engine apstr\xc4\x81d\xc4\x81 un izveido servleta pirmkodu, kas ir Java klase. Tad to kompil\xc4\x93 Java baitkod\xc4\x81, kuru izpilda Java Virtual Machine. N\xc4\x81kamreiz, kad lietot\xc4\x81js pieprasa \xc5\xa1o pa\xc5\xa1u lapu, tiek palaists iepriek\xc5\xa1 nokompil\xc4\x93tais kods. T\xc4\x81d\xc4\x93j\xc4\x81di pirmoreiz lapa veras l\xc4\x93n\xc4\x81k, bet n\xc4\x81kam\xc4\x81s reizes \xc4\x81tr\xc4\x81k. Ja pirmkods tiek main\xc4\xabts, tad to no jauna kompil\xc4\x93. JSP pirmkods var ar\xc4\xab tikt uzreiz interpret\xc4\x93ts, net\xc4\x93r\xc4\x93jot laiku kompil\xc4\x93\xc5\xa1anai, kas ir izdev\xc4\xabgi izstr\xc4\x81des laik\xc4\x81.\n_START_SECTION_\nPiem\xc4\x93rs\n_START_PARAGRAPH_\nJSP pirmkoda fragments:_NEWLINE_ <%@ page errorPage="myerror.jsp" %>_NEWLINE_ <%@ page import="com.foo.bar" %>_NEWLINE_ _NEWLINE_ <html>_NEWLINE_ <head>_NEWLINE_ <%! int serverInstanceVariable = 1;%>_NEWLINE_ _NEWLINE_ <% int localStackBasedVariable = 1; %>_NEWLINE_ <table>_NEWLINE_ <tr><td><%= toStringOrBlank( "expanded inline data " + 1 ) %></td></tr>_NEWLINE_Izveidotais servlets:_NEWLINE_ package jsp_servlet;_NEWLINE_ import java.util.*;_NEWLINE_ import java.io.*;_NEWLINE_ import javax.servlet.*;_NEWLINE_ import javax.servlet.http.*;_NEWLINE_ import javax.servlet.jsp.*;_NEWLINE_ import javax.servlet.jsp.tagext.*;_NEWLINE__NEWLINE_ import com.foo.bar; // Imported as a result of <%@ page import="com.foo.bar" %>_NEWLINE_ import \xe2\x80\xa6_NEWLINE__NEWLINE_ class _myservlet implements javax.servlet.Servlet, javax.servlet.jsp.HttpJspPage {_NEWLINE_    // Inserted as a_NEWLINE_    // result of <%! int serverInstanceVariable = 1;%>_NEWLINE_    int serverInstanceVariable = 1;_NEWLINE_    \xe2\x80\xa6_NEWLINE__NEWLINE_    public void _jspService( javax.servlet.http.HttpServletRequest request,_NEWLINE_    javax.servlet.http.HttpServletResponse response )_NEWLINE_    throws javax.servlet.ServletException,_NEWLINE_    java.io.IOException_NEWLINE_    {_NEWLINE_        javax.servlet.ServletConfig config = \xe2\x80\xa6; // Get the servlet config_NEWLINE_        Object page = this;_NEWLINE_        PageContext pageContext = \xe2\x80\xa6;            // Get the page context for this request_NEWLINE_        javax.servlet.jsp.JspWriter out = pageContext.getOut();_NEWLINE_        HttpSession session = request.getSession( true );_NEWLINE_        try {_NEWLINE_            out.print( "<html>\\r\\n" );_NEWLINE_            out.print( "<head>\\r\\n" );_NEWLINE_            \xe2\x80\xa6_NEWLINE_            // From <% int localStackBasedVariable = 1; %>_NEWLINE_            int localStackBasedVariable = 1;_NEWLINE_            \xe2\x80\xa6_NEWLINE_            out.print( "<table>\\r\\n" );_NEWLINE_            out.print( " <tr><td>" );_NEWLINE_            // From <%= toStringOrBlank( "expanded inline data " + 1 ) %>_NEWLINE_            out.print( toStringOrBlank( "expanded inline data " + 1 ) );_NEWLINE_            out.print( " </td></tr>\\r\\n" );_NEWLINE_            \xe2\x80\xa6_NEWLINE_        } catch ( Exception _exception ) {_NEWLINE_            // Clean up and redirect to error page in <%@ page errorPage="myerror.jsp" %>_NEWLINE_        }_NEWLINE_    }_NEWLINE_ }'