001    package jsp.jsp2.jspx;
002    
003    import javax.servlet.*;
004    import javax.servlet.http.*;
005    import javax.servlet.jsp.*;
006    
007    public final class basic_jspx extends org.apache.jasper.runtime.HttpJspBase
008        implements org.apache.jasper.runtime.JspSourceDependent {
009    
010      private static java.util.List _jspx_dependants;
011    
012      static {
013        _jspx_dependants = new java.util.ArrayList(1);
014        _jspx_dependants.add("/WEB-INF/tags/xhtmlbasic.tag");
015      }
016    
017      private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_fmt_formatDate_value_pattern_nobody;
018    
019      public Object getDependants() {
020        return _jspx_dependants;
021      }
022    
023      public void _jspInit() {
024        _jspx_tagPool_fmt_formatDate_value_pattern_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
025      }
026    
027      public void _jspDestroy() {
028        _jspx_tagPool_fmt_formatDate_value_pattern_nobody.release();
029      }
030    
031      public void _jspService(HttpServletRequest request, HttpServletResponse response)
032            throws java.io.IOException, ServletException {
033    
034        JspFactory _jspxFactory = null;
035        PageContext pageContext = null;
036        HttpSession session = null;
037        ServletContext application = null;
038        ServletConfig config = null;
039        JspWriter out = null;
040        Object page = this;
041        JspWriter _jspx_out = null;
042        PageContext _jspx_page_context = null;
043    
044    
045        try {
046          _jspxFactory = JspFactory.getDefaultFactory();
047          response.setContentType("text/html;charset=UTF-8");
048          pageContext = _jspxFactory.getPageContext(this, request, response,
049                            null, true, 8192, true);
050          _jspx_page_context = pageContext;
051          application = pageContext.getServletContext();
052          config = pageContext.getServletConfig();
053          session = pageContext.getSession();
054          out = pageContext.getOut();
055          _jspx_out = out;
056    
057          out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
058          if (_jspx_meth_tags_xhtmlbasic_0(_jspx_page_context))
059            return;
060        } catch (Throwable t) {
061          if (!(t instanceof SkipPageException)){
062            out = _jspx_out;
063            if (out != null && out.getBufferSize() != 0)
064              out.clearBuffer();
065            if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
066          }
067        } finally {
068          if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
069        }
070      }
071    
072      private boolean _jspx_meth_tags_xhtmlbasic_0(PageContext _jspx_page_context)
073              throws Throwable {
074        PageContext pageContext = _jspx_page_context;
075        JspWriter out = _jspx_page_context.getOut();
076        HttpSession session = _jspx_page_context.getSession();
077        ServletContext application = _jspx_page_context.getServletContext();
078        HttpServletRequest request = (HttpServletRequest)_jspx_page_context.getRequest();
079        //  tags:xhtmlbasic
080        org.apache.jsp.tag.web.xhtmlbasic_tag _jspx_th_tags_xhtmlbasic_0 = new org.apache.jsp.tag.web.xhtmlbasic_tag();
081        _jspx_th_tags_xhtmlbasic_0.setJspContext(_jspx_page_context);
082        _jspx_th_tags_xhtmlbasic_0.setJspBody(new basic_jspxHelper( 0, _jspx_page_context, _jspx_th_tags_xhtmlbasic_0, null));
083        _jspx_th_tags_xhtmlbasic_0.doTag();
084        return false;
085      }
086    
087      private boolean _jspx_meth_fmt_formatDate_0(javax.servlet.jsp.tagext.JspTag _jspx_parent, PageContext _jspx_page_context)
088              throws Throwable {
089        PageContext pageContext = _jspx_page_context;
090        JspWriter out = _jspx_page_context.getOut();
091        //  fmt:formatDate
092        org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag _jspx_th_fmt_formatDate_0 = (org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag) _jspx_tagPool_fmt_formatDate_value_pattern_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag.class);
093        _jspx_th_fmt_formatDate_0.setPageContext(_jspx_page_context);
094        _jspx_th_fmt_formatDate_0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) _jspx_parent));
095        _jspx_th_fmt_formatDate_0.setPattern("MMMM d, yyyy, H:mm:ss");
096        _jspx_th_fmt_formatDate_0.setValue((java.util.Date) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${now}", java.util.Date.class, (PageContext)_jspx_page_context, null, false));
097        int _jspx_eval_fmt_formatDate_0 = _jspx_th_fmt_formatDate_0.doStartTag();
098        if (_jspx_th_fmt_formatDate_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
099          _jspx_tagPool_fmt_formatDate_value_pattern_nobody.reuse(_jspx_th_fmt_formatDate_0);
100          throw new SkipPageException();
101        }
102        _jspx_tagPool_fmt_formatDate_value_pattern_nobody.reuse(_jspx_th_fmt_formatDate_0);
103        return false;
104      }
105    
106      private class basic_jspxHelper
107          extends org.apache.jasper.runtime.JspFragmentHelper
108      {
109        private javax.servlet.jsp.tagext.JspTag _jspx_parent;
110        private int[] _jspx_push_body_count;
111    
112        public basic_jspxHelper( int discriminator, JspContext jspContext, javax.servlet.jsp.tagext.JspTag _jspx_parent, int[] _jspx_push_body_count ) {
113          super( discriminator, jspContext, _jspx_parent );
114          this._jspx_parent = _jspx_parent;
115          this._jspx_push_body_count = _jspx_push_body_count;
116        }
117        public boolean invoke0( JspWriter out ) 
118          throws Throwable
119        {
120          HttpSession session = _jspx_page_context.getSession();
121          ServletContext application = _jspx_page_context.getServletContext();
122          HttpServletRequest request = (HttpServletRequest)_jspx_page_context.getRequest();
123          out.write("<head>");
124          out.write("<title>");
125          out.write("JSPX - XHTML Basic Example");
126          out.write("</title>");
127          out.write("</head>");
128          out.write("<body>");
129          out.write("<h1>");
130          out.write("JSPX - XHTML Basic Example");
131          out.write("</h1>");
132          out.write("<hr/>");
133          out.write("\n    This example illustrates how to use JSPX to produce an XHTML basic\n    document suitable for use with mobile phones, televisions, \n    PDAs, vending machines, pagers, car navigation systems,\n    mobile game machines, digital book readers, smart watches, etc.\n    ");
134          out.write("<p/>");
135          out.write("\n    JSPX lets you create dynamic documents in a pure XML syntax compatible\n    with existing XML tools.  The XML syntax in JSP 1.2 was awkward and\n    required &lt;jsp:root&gt; to be the root element of the document.\n    This is no longer the case in JSP 2.0.\n    ");
136          out.write("<p/>");
137          out.write("\n    This particular example uses a tag file to produce the DOCTYPE and\n    namespace declarations to make the output of this page a valid XHTML\n    Basic document.\n    ");
138          out.write("<p/>");
139          out.write("\n    Just to prove this is live, here's some dynamic content:\n    ");
140          java.util.Date now = null;
141          synchronized (_jspx_page_context) {
142            now = (java.util.Date) _jspx_page_context.getAttribute("now", PageContext.PAGE_SCOPE);
143            if (now == null){
144              now = new java.util.Date();
145              _jspx_page_context.setAttribute("now", now, PageContext.PAGE_SCOPE);
146            }
147          }
148          if (_jspx_meth_fmt_formatDate_0(_jspx_parent, _jspx_page_context))
149            return true;
150          out.write("</body>");
151          return false;
152        }
153        public void invoke( java.io.Writer writer )
154          throws JspException
155        {
156          JspWriter out = null;
157          if( writer != null ) {
158            out = this.jspContext.pushBody(writer);
159          } else {
160            out = this.jspContext.getOut();
161          }
162          try {
163            switch( this.discriminator ) {
164              case 0:
165                invoke0( out );
166                break;
167            }
168          }
169          catch( Throwable e ) {
170            if (e instanceof SkipPageException)
171                throw (SkipPageException) e;
172            throw new JspException( e );
173          }
174          finally {
175            if( writer != null ) {
176              this.jspContext.popBody();
177            }
178          }
179        }
180      }
181    }