开发者

Exception encountered with fiji charts even after including all the required jars

开发者 https://www.devze.com 2023-01-10 16:04 出处:网络
My requirement is to dynamically populate graphs on the basis of data retrieved from the database. The jars included are as follows:

My requirement is to dynamically populate graphs on the basis of data retrieved from the database. The jars included are as follows:

flamingo-service-jsf-1.6.1-SNAPSHOT.jar
amf-serializer-1.6.1-SNAPSHOT.jar
common-annotations.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
el-api-1.0.jar
el-impl-1.0.jar
fiji-api-1.0.0.jar
fiji-ui-1.0.0.jar
j开发者_如何学JAVAsf-api-1.2_09.jar
jsf-facelets-1.1.14.jar
jsf-impl-1.2_09.jar
jstl-1.2.jar
laguna.jar
richfaces-api-3.2.2.CR3.jar
richfaces-impl-3.2.2.CR3.jar
richfaces-ui-3.2.2.CR3.jar
standard.jar

My Bean is as follows:

import java.util.ArrayList; 
import java.util.Date; 
import java.util.LinkedHashMap; 
import java.util.Map; 
import java.util.Random; 


public class GraphBean { 

    private Integer data; 
    private  Map<String, Integer> monthMap = new LinkedHashMap<String,Integer>(); 
    private ArrayList<String> names = new ArrayList<String>(); 
    private ArrayList<String> colors = new ArrayList<String>(); 
    Random rnd = new Random(new Date().getTime()); 

    public GraphBean() { 
        super(); 
        generateData(); 
    } 

    private void generateData() { 
        monthMap.put("January", getData()); 
        monthMap.put("February", getData()); 
        monthMap.put("March", getData()); 
    } 

    public Map<String, Integer> getMonthMap() { 
        return monthMap; 
    } 

    public ArrayList<String> getNames(){ 
        names.add("Motherboards"); 
        return names; 
    }  

    public ArrayList<String> getColors(){ 
        colors.add("#5db2c2"); 
        return colors; 
    }  

    public Integer getData() { 
        data = rnd.nextInt(50); 
        return data; 
    } 
} 

My jsp page is as follows:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> 
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> 
<%@ taglib uri="http://exadel.com/fiji" prefix="fiji" %> 

<html> 
     <head> 
      <title>enter your name page</title> 
     </head> 
     <body>  <f:view> 
            <fiji:columnChart id="columnChartOne" value="#{GraphBean.monthMap}" title="One-series Column Chart" barCaption="none" 
                              barColors="#{GraphBean.colors}" captionX="Months" captionY="Amount" toolTipValue="{y} {name} are sold in {x}" 
                              subtitle="Hardware sales per month" width="400" height="400"> 
                <fiji:chartData type="name" value="#{GraphBean.names}" /> 
            </fiji:columnChart> 
       </f:view>  
    </body> 
    </html>

On execution of the page following either of the execption is encountered.

1. org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP
2. org.apache.jasper.JasperException: The absolute uri: http://exadel.com/fiji cannot be resolved in either web.xml or the jar files deployed with this application

Please suggest me a solution. I am trying for dynamic chart in my jsp page using jsf tags for the last 2 weeks.


From this article:

...
In the next step you are going to copy JAR files from lib folder to fiji/web/WEB-INF/lib directory
1. If running Tomcat 5.5, copy all files
2. If you are running Tomcat 6, copy all files except:
* el-api.1.0.jar
* el-impl-1.0.jar

Have you configured the taglib in your web.xml file? Like:

<taglib>
    <taglib-uri>http://exadel.com/fiji</taglib-uri>
    <taglib-location>/WEB-INF/lib/jstl-1.2.jar</taglib-location>
</taglib>

If so, try to comment it, as indicated in the article "nothing else is needed":

...
That's it. Nothing else is needed, not even changes to web.xml

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号