import java.sql.*; import java.lang.*; import*; import javax.servlet.*; import javax.servlet.http.*; public class BarConfigServlet extends HttpServlet { // // This simple servlet is designed to demonstrate how a servlet can be used // to return configuration information to either the graphing applet or servlet. // // For further information visit, // // //----------------------------------------------------------------------------- public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType("text/html"); ServletOutputStream out = res.getOutputStream(); // Return the Data out.println(ConfigData()); } // End doGet //----------------------------------------------------------------------------- public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {doGet(request, response);} //----------------------------------------------------------------------------- public static String ConfigData() { String rsltStr = " \n"+ "3D: true \n"+ "grid: true \n"+ "axis: true \n"+ "ylabels: true \n"+ "outline: true \n"+ "legend: true \n"+ "autoscale: false \n"+ "gradientfill: true \n"+ " \n"+ "width: 450 \n"+ "height: 440 \n"+ "nCols: 6 \n"+ "nRows: 6 \n"+ "ndecplaces: 0 \n"+ "nSeries: 3 \n"+ "chartScale: 10000 \n"+ "chartStartY: 0 \n"+ "labelOrientation: 0 \n"+ "labelsY: 390 \n"+ "labelsY_offset: 15 \n"+ "bar_spacing: 6 \n"+ "barwidth: 20 \n"+ "depth3D: 15 \n"+ "linkcursor: hand \n"+ "BackgroundColor: White \n"+ "barOutlineColor: black \n"+ " \n"+ "gridxpos: 70 \n"+ "gridypos: 375 \n"+ "vSpace: 30 \n"+ "gridStyle: 2 \n"+ "gridColor: 50,50,50 \n"+ "axisColor: 0,0,255 \n"+ "floorColor: 50,50,50 \n"+ "gridbgcolor: #EEEEFF \n"+ "gridbgimage: \n"+ " \n"+ "xlabel_font: Arial,N,12 \n"+ "ylabel_font: Arial,I,10 \n"+ "popupfont: Arial,N,10 \n"+ "labelColor: 75,75,125 \n"+ "popupbgcolor: 255,255,200 \n"+ "popup_pre: $ \n"+ "popup_post: \n"+ "ylabel_pre: $ \n"+ "ylabel_post: \n"+ "thousandseparator: , \n"+ " \n"+ "label1: January \n"+ "label2: February \n"+ "label3: March \n"+ "label4: April \n"+ "label5: May \n"+ "label6: June \n"+ " \n"+ "legendfont: Arial,N,10 \n"+ "legendposition: 285,50 \n"+ "legendtitle: Product Range \n"+ "LegendBackground: 240,240,240 \n"+ "LegendBorder: 125,125,125 \n"+ "LegendtextColor: 50,50,50 \n"+ " \n"+ " \n"+ "title: Sales by Month|50,25|Arial,BI,18|130,130,180 \n"+ "xtitle: Month|200,435|Arial,B,16|130,130,180 \n"+ "ytitle: Sales Value|5,200|Arial,B,16|130,130,180 \n"+ " \n"+ " \n"+ "series1: 199,199,199|left|Product X|./images/productX.gif|X \n"+ "series2: 200,100,100|left|Product Y|./images/productY.gif|Y \n"+ "series3: 100,100,200|left|Product Z|./images/productZ.gif|Z \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ "text1: Note :|125,60|Arial,N,12|0,0,175 \n"+ "text2: New product range|125,75|Arial,N,12|50,50,50 \n"+ "text3: launched during|125,90|Arial,N,12|50,50,50 \n"+ "text4: quarter 2.|125,105|Arial,N,12|50,50,50 \n"+ " \n"+ " \n"+ "image1: ./images/productY.gif,375,85 \n"+ "image2: ./images/productX.gif,375,110 \n"+ "image3: ./images/productZ.gif,375,135 \n"; return(rsltStr); } //----------------------------------------------------------------------------- } // End class