JFreeChart JSP 显示图片路径问题

 

1、配置文件

    public class MeetingConfig  extends AppConfig {

 

                 public static String WEB_CONTENT_PATH= "http://127.0.0.1:8080/meeting";
 
                public static String IMAGE_PATH="E:\\ZDQ\\project\\workspace\\jboss-                                                                      4.0.5.GA\\server\\default\\deploy\\meeting.war";
 
   }

 

 

2、java 文件,生成jpg文件的方法

     public String getMeetingStatistic() {

 

                path = MeetingConfig.IMAGE_PATH+ "\\meetingRoomCountImageZhu.jpg";
                //设置生成jpg的路径

                meetingRoomCountTopStatistic();//生成jpg方法
              

               path="/meetingRoomCountImageZhu.jpg";//返回给jsp的路径

 

   }

 

3、jsp 设置:

 

      <img src="<%=MeetingConfig.WEB_CONTENT_PATH %>${path }">

 

 

奶奶的整了我一晚上,郁闷!!好歹给解决了,不明原理

 

 

 

 

你可能感兴趣的:(Web,jsp,jboss,jfreechart)