home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / textRotate_jspx.class (.txt) < prev    next >
Encoding:
Java Class File  |  2004-05-17  |  6.3 KB  |  151 lines

  1. package org.apache.jsp.jsp2.jspx;
  2.  
  3. import java.io.IOException;
  4. import java.util.List;
  5. import java.util.Vector;
  6. import javax.servlet.ServletConfig;
  7. import javax.servlet.ServletContext;
  8. import javax.servlet.ServletException;
  9. import javax.servlet.http.HttpServletRequest;
  10. import javax.servlet.http.HttpServletResponse;
  11. import javax.servlet.http.HttpSession;
  12. import javax.servlet.jsp.JspFactory;
  13. import javax.servlet.jsp.JspWriter;
  14. import javax.servlet.jsp.PageContext;
  15. import javax.servlet.jsp.SkipPageException;
  16. import javax.servlet.jsp.tagext.Tag;
  17. import org.apache.jasper.runtime.HttpJspBase;
  18. import org.apache.jasper.runtime.JspSourceDependent;
  19. import org.apache.jasper.runtime.PageContextImpl;
  20. import org.apache.jasper.runtime.ProtectedFunctionMapper;
  21. import org.apache.jasper.runtime.TagHandlerPool;
  22. import org.apache.taglibs.standard.tag.rt.core.SetTag;
  23.  
  24. public final class textRotate_jspx extends HttpJspBase implements JspSourceDependent {
  25.    private static Vector _jspx_dependants;
  26.    private TagHandlerPool _jspx_tagPool_c_set_var_value_nobody;
  27.    private TagHandlerPool _jspx_tagPool_c_forEach_var_end_begin;
  28.    // $FF: synthetic field
  29.    static Class class$java$lang$String;
  30.    // $FF: synthetic field
  31.    static Class class$org$apache$taglibs$standard$tag$rt$core$SetTag;
  32.    // $FF: synthetic field
  33.    static Class class$java$lang$Object;
  34.  
  35.    public List getDependants() {
  36.       return _jspx_dependants;
  37.    }
  38.  
  39.    public void _jspInit() {
  40.       this._jspx_tagPool_c_set_var_value_nobody = TagHandlerPool.getTagHandlerPool(this.getServletConfig());
  41.       this._jspx_tagPool_c_forEach_var_end_begin = TagHandlerPool.getTagHandlerPool(this.getServletConfig());
  42.    }
  43.  
  44.    public void _jspDestroy() {
  45.       this._jspx_tagPool_c_set_var_value_nobody.release();
  46.       this._jspx_tagPool_c_forEach_var_end_begin.release();
  47.    }
  48.  
  49.    public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
  50.       JspFactory _jspxFactory = null;
  51.       PageContext pageContext = null;
  52.       HttpSession session = null;
  53.       ServletContext application = null;
  54.       ServletConfig config = null;
  55.       JspWriter out = null;
  56.       JspWriter _jspx_out = null;
  57.       PageContext _jspx_page_context = null;
  58.  
  59.       try {
  60.          _jspxFactory = JspFactory.getDefaultFactory();
  61.          response.setContentType("image/svg+xml;charset=UTF-8");
  62.          pageContext = _jspxFactory.getPageContext(this, request, response, (String)null, true, 8192, true);
  63.          _jspx_page_context = pageContext;
  64.          application = pageContext.getServletContext();
  65.          config = pageContext.getServletConfig();
  66.          session = pageContext.getSession();
  67.          out = pageContext.getOut();
  68.          out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
  69.          out.write("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 450 500\" height=\"500\" width=\"450\">");
  70.          out.write("<title>");
  71.          out.write("JSP 2.0 JSPX");
  72.          out.write("</title>");
  73.          if (!this._jspx_meth_c_set_0(pageContext)) {
  74.             out.write("<g id=\"testContent\">");
  75.             out.write("<text text-anchor=\"middle\" font-size=\"15\" y=\"10%\" x=\"50%\" class=\"title\">");
  76.             out.write("\n            JSP 2.0 XML Syntax (.jspx) Demo");
  77.             out.write("</text>");
  78.             out.write("<text text-anchor=\"middle\" font-size=\"15\" y=\"15%\" x=\"50%\" class=\"title\">");
  79.             out.write("\n            Try changing the name parameter!");
  80.             out.write("</text>");
  81.             out.write("<g id=\"rotatedText\" transform=\"translate(225, 250)\" opacity=\"1.0\">");
  82.  
  83.             for(int _jspx_temp0 = 1; _jspx_temp0 <= 24; ++_jspx_temp0) {
  84.                _jspx_page_context.setAttribute("i", String.valueOf(_jspx_temp0));
  85.                out.write("\n          <g opacity=\"0.95\" transform=\"scale(1.05) rotate(15)\">\n        ");
  86.                out.write("<text id=\"words\" font-family=\"Serif\" font-size=\"40\" text-anchor=\"middle\" fill=\"DarkSlateBlue\" transform=\"scale(1.6, 1.6)\" y=\"0\" x=\"0\">");
  87.                out.write((String)PageContextImpl.proprietaryEvaluate("${name}", class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String, _jspx_page_context, (ProtectedFunctionMapper)null, false));
  88.                out.write("</text>");
  89.             }
  90.  
  91.             for(int _jspx_temp1 = 1; _jspx_temp1 <= 24; ++_jspx_temp1) {
  92.                _jspx_page_context.setAttribute("i", String.valueOf(_jspx_temp1));
  93.                out.write("</g>");
  94.             }
  95.  
  96.             out.write("<text text-anchor=\"middle\" style=\"font-size:75;font-family:Serif;fill:white\">");
  97.             out.write((String)PageContextImpl.proprietaryEvaluate("${name}", class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String, _jspx_page_context, (ProtectedFunctionMapper)null, false));
  98.             out.write("</text>");
  99.             out.write("</g>");
  100.             out.write("</g>");
  101.             out.write("</svg>");
  102.             return;
  103.          }
  104.       } catch (Throwable t) {
  105.          if (!(t instanceof SkipPageException)) {
  106.             if (_jspx_out != null && _jspx_out.getBufferSize() != 0) {
  107.                _jspx_out.clearBuffer();
  108.             }
  109.  
  110.             if (_jspx_page_context != null) {
  111.                _jspx_page_context.handlePageException(t);
  112.                return;
  113.             }
  114.          }
  115.  
  116.          return;
  117.       } finally {
  118.          if (_jspxFactory != null) {
  119.             _jspxFactory.releasePageContext(_jspx_page_context);
  120.          }
  121.  
  122.       }
  123.  
  124.    }
  125.  
  126.    private boolean _jspx_meth_c_set_0(PageContext _jspx_page_context) throws Throwable {
  127.       JspWriter out = _jspx_page_context.getOut();
  128.       SetTag _jspx_th_c_set_0 = (SetTag)this._jspx_tagPool_c_set_var_value_nobody.get(class$org$apache$taglibs$standard$tag$rt$core$SetTag == null ? (class$org$apache$taglibs$standard$tag$rt$core$SetTag = class$("org.apache.taglibs.standard.tag.rt.core.SetTag")) : class$org$apache$taglibs$standard$tag$rt$core$SetTag);
  129.       _jspx_th_c_set_0.setPageContext(_jspx_page_context);
  130.       _jspx_th_c_set_0.setParent((Tag)null);
  131.       _jspx_th_c_set_0.setValue(PageContextImpl.proprietaryEvaluate("${empty param[\"name\"] ? \"JSPX\" : param[\"name\"]}", class$java$lang$Object == null ? (class$java$lang$Object = class$("java.lang.Object")) : class$java$lang$Object, _jspx_page_context, (ProtectedFunctionMapper)null, false));
  132.       _jspx_th_c_set_0.setVar("name");
  133.       int _jspx_eval_c_set_0 = _jspx_th_c_set_0.doStartTag();
  134.       if (_jspx_th_c_set_0.doEndTag() == 5) {
  135.          return true;
  136.       } else {
  137.          this._jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0);
  138.          return false;
  139.       }
  140.    }
  141.  
  142.    // $FF: synthetic method
  143.    static Class class$(String x0) {
  144.       try {
  145.          return Class.forName(x0);
  146.       } catch (ClassNotFoundException x1) {
  147.          throw new NoClassDefFoundError(x1.getMessage());
  148.       }
  149.    }
  150. }
  151.