> 
> I'm getting an error...
> 
> HTTP Status 500 -
> 
> -----------------------------------------------------------------------------
---
> 
> type Exception report
> 
> message
> 
> description The server encountered an internal error () that prevented it 
> from fulfilling this request.
> 
> exception
> 
> javax.servlet.ServletException: javax.servlet.jsp.JspException: Rhino 
> encountered an error while evaluating the JavaScript in the <twod:canvas> 
> tag with id 'polygon': null
>       org.apache.jasper.runtime.PageContextImpl.doHandlePageException
(PageContextImpl.java:821)
>       org.apache.jasper.runtime.PageContextImpl.handlePageException
(PageContextImpl.java:758)
>       org.apache.jsp.index_jsp._jspService(index_jsp.java:81)
>       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>       javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>       org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:324)
>       org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:292)
>       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>       javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>       com.sun.faces.context.ExternalContextImpl.dispatch
(ExternalContextImpl.java:322)
>       com.sun.faces.application.ViewHandlerImpl.renderView
(ViewHandlerImpl.java:130)
>       com.sun.faces.lifecycle.RenderResponsePhase.execute
(RenderResponsePhase.java:87)
>       com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
>       com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
>       javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
> 
> root cause
> 
> javax.servlet.jsp.JspException: Rhino encountered an error while evaluating 
> the JavaScript in the <twod:canvas> tag with id 'polygon': null
>       org.apache.jsp.index_jsp$index_jspHelper.invoke(index_jsp.java:1356)
>       org.ditchnet.jsp.taglib.tabs.handler.TabPaneTag.renderComponent
(TabPaneTag.java:92)
>       org.ditchnet.jsp.taglib.tabs.handler.TabPaneTag.doTag
(TabPaneTag.java:64)
>       org.apache.jsp.index_jsp._jspx_meth_tab_tabPane_0(index_jsp.java:451)
>       org.apache.jsp.index_jsp.access$000(index_jsp.java:7)
>       org.apache.jsp.index_jsp$index_jspHelper.invoke0(index_jsp.java:763)
> --
> James Mitchell
> Software Engineer / Open Source Evangelist
> Consulting / Mentoring / Freelance
> EdgeTech, Inc.
> http://www.edgetechservices.net/
> 678.910.8017
> AIM:   jmitchtx
> MSN:   jmitchell <at> apache.org
> Skype: jmitchtx
> 
> ----- Original Message ----- 
> From: "Todd Ditchendorf" <todd <at> ditchnet.org>
> To: <user <at> struts.apache.org>
> Sent: Sunday, July 10, 2005 10:49 PM
> Subject: JSP 2D Taglib Released -- Script Java 2D API from your JSP with 
> JavaScript
> 
> > I'm proud to announce a JSP taglib that I thought the Struts mailing list 
> > might like to hear about.
> >
> > http://ditchnet.org/2d
> >
> > JSP 2D Taglib Released -- Script Java 2D API from your JSP with JavaScript
> >
> > With the Ditchnet JSP 2D Taglib, your web applications now have full 
> > access to the Java 2D API for dynamically rendering beautiful graphics 
> > primitives directly in your web page without limitation. Yes, the web page 
> > itself becomes a canvas on which you can leverage the full power of the 
> > Java 2D API for graphics. Literally all browsers are supported... no 
> > Applets, JavaScript, Ajax, Flash, Plug-Ins, Cookies, Lazlo, Ruby on Rails 
> > or any other hackery required on the client! (We keep our hackery on the 
> > server, thank you.)
> >
> > The 2D taglib is similar in concept to the <canvas> tag pioneered by Apple 
> > in Safari 2 and later accepted by the WHATWG in one of their specs... it 
> > allows web page authors to script graphics primitives directly in the HTML 
> > source of a page using JavaScript (although the user need not have 
> > JavaScript enabled in her browser).
> >
> > Web page authors can use all of the nice scripting features of the 
> > familiar JavaScript language (native collection types like Arrays and 
> > Object dictionaries, and dynamic typing) to harness the massively powerful 
> > Java 2D API -- and the result renders directly in the web page!
> >
> >
> > http://ditchnet.org/
> > http://ditchnet.org/2d
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe <at> struts.apache.org
> > For additional commands, e-mail: user-help <at> struts.apache.org
> >
> > 
> 
Hi, I'm getting exactly the same error, using tomcat 5.5.12 under windows XP. 
I've tried to set full rights to the dichnet's jar, and it seems to be good 
since it created its folder. I did the same thing for rhino's jar (js.jar)
I'm trying to make it work with the following example from his website

<%@ taglib prefix="twod" uri="http://ditchnet.org/jsp-2d-taglib"; %>
<twod:canvas id="polygon" width="200" height="200" alt="A polygon">
        
        // create red gradient paint
        var color1 = new java.awt.Color(0xC80021);
        var color2 = new java.awt.Color(0x711928);
        var x1 = 20; var y1 =   0;
        var x2 = 20; var y2 = 190;
        var grad = new java.awt.GradientPaint(x1,y1,color1,x2,y2,color2);
        
        // create pentagon
        var xPoints   = [101,180,150, 52, 20];
        var yPoints   = [24 , 81,177,177, 81];
        var numPoints = xPoints.length;                
        var pentagon  = new java.awt.Polygon(xPoints,yPoints,numPoints);
        
        // create stroke with rounded corners
        var endCap = java.awt.BasicStroke.CAP_ROUND;
        var join   = java.awt.BasicStroke.JOIN_ROUND;
        var stroke = new java.awt.BasicStroke(20,endCap,join);

        // draw polygon on the current graphics context (g)
        g.setPaint(grad);
        g.fill(pentagon);
        g.setStroke(stroke);
        g.draw(pentagon);

</twod:canvas>

Perhaps I did a stupid thing with the uri ...

Thanks for your help if you've got ideas


Olivier

James Mitchell <jmitchell <at> apache.org> writes:






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to