Dynamic GIF Creation thru JSP

Hi All,
I am able to create .bmp file by using the following code.But I need to create a GIF instead of BMP.
The code follows as
<%
BufferedImage image =new BufferedImage(1000,1000,BufferedImage.TYPE_INT_RGB);
Graphics graphics = image.getGraphics();
graphics.setColor(Color.black);
graphics.fillRect(0,0,1000,1000);
graphics.setColor(Color.red);
graphics.setFont(new Font("arial",80,80));
graphics.drawLine(20,980,980,980);//Horizontal Line
graphics.drawLine(100,20,100,990);//Vertical Line
graphics.dispose();
ServletOutputStream sos = response.getOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
encoder.encode(image);
%>
How can I create GIF file.Please help me.
Thanks in advance.

You may want to have a look at this...
http://www.acme.com/java/software/Acme.JPM.Encoders.GifEncoder.html

Similar Messages

  • Dynamic menu creation in JSP treating source as dynamic xml

    Hi Everyone,
    I have a XML file which is a dynamic one..It is generated from a tool..I need to parse that xml and generate a menu accordingly in a jsp.In menu the data to be displayed comes from thie hierarchical xml file which is a dynamic one..Siblings and child notes are not fixed..it all generates at rum by some other tool.
    Please help me to tell any logic to create such a dynamic menu ...i am using Dom parser to parse that..
    Regards
    Sajal

    Hi
    This is the xml...I want to display the values in a JSP menu..These values comes from this XML...Like for this XML the struscture will be like
    --Category
    |
    | IT Services
    |
    |ABC Softwares
    |
    |Application Developement
    |
    |Java
    |Mainframes
    |Production Support
    <DIMENSIONS>
    <DIMENSION NAME="CATEGORY">
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="1"/>
    <VALUE>IT Services</VALUE>
    </DVAL>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="2"/>
    <VALUE>ABC Softwares</VALUE>
    </DVAL>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="3"/>
    <VALUE>Application Development</VALUE>
    </DVAL>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="4"/>
    <VALUE>Java</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="5"/>
    <VALUE>Mainframes</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    </DIMENSION_NODE>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="6"/>
    <VALUE>Production SUpport</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    </DIMENSION_NODE>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="7"/>
    <VALUE>DEF Softwares</VALUE>
    </DVAL>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="8"/>
    <VALUE>Application Development</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    <DIMENSION_NODE>
    <DVAL>
    <DVAL_ID ID="9"/>
    <VALUE>Production SUpport</VALUE>
    </DVAL>
    </DIMENSION_NODE>
    </DIMENSION_NODE>
    </DIMENSION_NODE>
    </DIMENSION>
    </DIMENSIONS>
    So in this way i need to populate the data from XML.. there can be n number of nodes child nodes and Siblings..and siblings can also have further Child nodes...So need to populate the JSP Menu from this xml..
    Please suggest some logic or if somebody has some sample code..

  • DYNAMIC TABLE CREATION USING JSP

    I WANT TO CREATE A DATABASE TABLE IN AN INTERACTIVE WAY ie MY QUESTION IS: HOW TO CREATE A TABLE USING JSP WITH TWO ARRAYS(FIRST ARRAY CONTAINS FIELD(COLUMN) NAMES AND THE SECOND ARRAY CONTAINS ITS CORRESPONDING DATATYPE)BOTH ARRAYS ARE OF VARYING SIZE.IF THE USER ENTERS SUPPOSE '6' AS THE INPUT TO FORM A TABLE OF 6 FIELDS SO, THE QUERY SHOULD BE DYNAMICALLY FORME USING THE ARRAY NAME FOR FIELD AND THE ARRANAME FOR ITS CORRESPONDING DATATYPE.HAVE ANY IDEA ON THIS PLEASE LET ME KNOW.
    THANKS

    u need to know quite a few java technologies to make archieve your dream.
    JDBC, dynamic array and JSP.
    after reading tutorial regarding to these 3 materials, you should be able to get your job done.

  • Dynamic Tree Creation using JSP, Struts framework

    I urgently require tips/information/code snippet for creating a Dynamic Tree structure.
    Tree is the hierarchical folder structure that we see in windows operating system.
    Dynamic tree in the sense that all nodes shall be populated from database & a radio button shall be present at each node that can be selected & submitted to form.
    Tree should be done using JSP (& if required Javascript).
    I am using Struts framework .
    [email protected]

    u need to know quite a few java technologies to make archieve your dream.
    JDBC, dynamic array and JSP.
    after reading tutorial regarding to these 3 materials, you should be able to get your job done.

  • Invoking a BPEL process thru JSP.

    i've read the oracle tutorial on how to invoke the BPEL process thru JSP, but when running, it doesn't work with the following error: server error 500
    i'm not sure how i should deploy the jsp page, by selecting run in JDeveloper it gave the error specified above
    help me out,
    cheers,
    Shivek

    I got it atlast. Actually I wanted application log to see the error. I found this log file(application.log) under
    <ORACLE_AS_HOME>\j2ee\home\application-deployments\hello\home_default_group_1
    I found that since this is a JSF application, i am missing the '/faces' in the URL and because of which, it was unable to find the FacesContext.
    It's working now. Thanks a lot for your support.
    Regards

  • Dynamic Themes in mapinit.jsp

    Hi ,
    How can I pass dynamic themes using mapinit.jsp ,
    For example alongwith all the parameters like map size , basemap etc..
    I want to give a new date parameter . based on the given date I need to put a where clause in my themes like where date=parameter.date.
    I have salesperson whose location changes on daily basis and user need to see their location on date basis , for example where all the salesman were on 28-10-2006 and where all the sales man were on 25-10-2006 and so on ..
    Please help

    Thanks a lot that worked out.But still as I have my complete requirement is I need to display set of radio buttons when I click on this link.
    Can this be possible by javascript.Can anyone give me an idea of how to do this. The actual scenario is like I get the a list of 30 dates and their corresponding radio buttons from a webservice. What I do is I read all the values from that webservice and convert them into text( actually I get the codes) and need to display that as a calendar to the user and when they click on a particular date { I copied a calender from the net and placed that code in my jsp to display the calender)
    the set of radio buttons should be displayed underneath the calender.That is both the calender and the list of radio buttons should be on the same page.
    Thanks in advance.
    Pavan.

  • How can i render a dynamic html file in jsp page

    Hi everybody,
    i am trying to render a dynamic html file in jsp page with the result of querying a database.
    The response of the query is a xml document. And i have a stylesheet to transfer it to html.
    How can i render the html in a jsp file?

    I am using below code for HTML files
    private var appFile:String="index.html";
    if (StageWebView.isSupported)
                        currentState = "normal";
                        webView.stage = stage;
                        webView.viewPort = new Rectangle( 10, 130, (stage.stageWidth)-20, 750 );
                        var fPath:String = new File(new File("app:/assets/html/aboutus/"+ appFile).nativePath).url; 
                        webView.loadURL(fPath);
                        addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
                    else {
                        currentState = "unsupported";
                        lblSupport.text = "StageWebView feature not supported";
    above code is working fine for me.

  • Dynamic Table Creation & Fill Up

    Hello,
    Can anyone please guide where I can find examples for dynamic table creation (programmaticaly), with dynamic number of columns and rows, used to place inside text components (or whatever) to fill them with data.
    All programmatic.
    Using JSF, ADF BC
    JDeveloper 10.1.3.1
    Thanks
    Message was edited by:
    RJundi

    Hi,
    Meybe this article helps: http://technology.amis.nl/blog/?p=2306
    Kuba

  • Does Seeburger's SFTP adapter support dynamic filename creation

    Hi all,
    Does the SFTP adapter support dynamic filename creation.
    If yes, then do we have to use UDF's and are there any specific settings that have to be done in the SFTP communication channel.
    Please provide a blog which helps in the configuration process of the above case.
    thanks,
    younus

    Dynamic Creation of File using counter in Seeburger Variable:
    1. Configuration Needed in the Communication Channel:
    The process of dynamic creation of files can be done we have to select the following checkbox in the receiver channel:
    Dynamic Attribute in receiver Channel:
    Import the following modules:
    Localejbs/Seeburger/solution/sftp
    Localejbs/Seeburger/AttribMapper
    Localejbs/ModuleProcessorExitBean
    Enter  the desired file naming convention:
    Use the Parameter GetCounter("ID") to the place where the counter is expected to come.
    2. Configuration Needed in the SeeBurger Workbench:
    If the J2EE server is listening on a port different from 50000 (which is the standard for the SAP client 000), the port number must be configured:
    Login into the seeburger workbench using the URL
    http://<localhost>:<port number>/seeburger/index.html
    Select Property Store.
    Create or edit the following property:
    Parameter
    Value
    Namespace
    http://seeburger.com/xi/SeeFunctions
    Key
    provider.servlet.server
    Value
    http://localhost:50000/ (where the port number 50000 must be set
    accordingly to the J2EE server configuration).
    Note: The configured value (server URL) has to end with a slash (/). Otherwise,
    SeeFunctions will not work correctly.
    If we need to start the counter from any specific value , it can be configured in the SeeBurger workbench, this value can be maintained in Mapping Variables :

  • Login thru JSP not working?

    Hello
    I am trying to login thru JSP, Web Server is Tomcat & database is sqlserver2000. After filling user, password & pressing submit button,error message is as follows :
    cannot resolve symbol
    symbol : variable connection
    location: class org.apache.jsp.verifyuser_jsp
    Statement statement = connection.createStatement();
    This is the code :
    <BODY>
    <% String user = request.getParameter("user");%>
    <% String pwd = request.getParameter("pwd");%>
    <%
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection connection = DriverManager.getConnection(
    "jdbc:odbc:DEVELOPER1","sa","");
    System.out.println("database connected");
    Statement statement = connection.createStatement();
    String query1 = "SELECT Username, Password FROM login WHERE Username = '"+user+"' AND Password = '"+pwd+"'";
    ResultSet p = statement.executeQuery(query1);
    while (p.next())
    String Puser = p.getString("Username");
    String Ppass = p.getString("Password");
    if (user.equals("Puser") && pwd.equals("Ppass"))
    %>
    <jsp:forward page = "welcome.jsp"/>
    <% else { %>
    <h3>Invalid username or password</h3>
    <% }
    connection.close();
    catch (Exception e)
    out.println(e.getMessage());
    %>
    <h3>error in accessing database</h3>
    <% }
    %>
    </BODY>
    what's wrong?

    import java.sql.* package is given, even then its not working.

  • Does UCM support dynamic page creation on contributor mode.?

    Hi All,
    Does UCM support dynamic page creation on contributor mode.
    We want to create new pages and link it into the existing pages
    is that possible?
    Thanks
    ~Hari

    You can create new secondary pages in contributor mode - you would normally do this via a dynamic list fragment though technically you could also achieve it by switching region content and creating new data files. You can then use the linz wizard to link between pages.
    If you are talking about creating new primary pages and sections in your site then you would need to use something like Site Studio Manager fragment.
    Tim

  • Where a templates for creation of JSPs?

    Hi,
    with Jdev 9i it is possible to create a whole web application with jsps based on BC4J components. But the only possibility to change the layout of those created pages is to change the css file. For us this is not enough. We want to create our jsps with jdeveloper but i dont know, if there are templates for the creation of jsps.
    Can you help?
    Regards
    Dietmar

    dietmar,
    maybe you have a look at UIX/JSP (or UIX/XML). there you have pagelayouts, templates and the oracle BLAF. see the corresponding documentation in the jdev-help.
    i recommend the jdev 9.03 for using UIX layouts and templates, it is easier and has more features than 9.02.

  • Dynamic Gif Generation

    Anyone know of any good Server-side Java libraries which can generate
    dynamic Gifs? Primarily we're looking for something to generate gifs
    with complex fonts on the fly.
    Thanks.
    Yoo-Shin

    If you need a product that offers corporate licensed support:
    http://www.sitraka.com/software/jclass/
    Jclass includes Jchart.
    "Matthew L Daniel" <[email protected]> wrote in message
    news:[email protected]..
    Y Lee wrote:
    Anyone know of any good Server-side Java libraries which can generate
    dynamic Gifs? Primarily we're looking for something to generate gifs
    with complex fonts on the fly.It may interest you that the GIF file format uses a patented algorithm
    (LZW, if I am not mistaken). Thus, there are complex licensing issues
    at work there. However, a JPEG or PNG library may be more along the
    lines of what you are looking for.
    Some things I found using Freshmeat and Google to get you started:
    http://artpacks.acid.org/pub/png/pngcode.html
    http://catcode.com/pngencoder/
    HTH,
    -- /v\atthew

  • Can't create dynamic html elements with jsp????? important

    Hi All,
    I am having problem creating dynamic html elements with jsp tags, i have tried to use EL and java scriplet, both of them don't work.
    i am trying to create dynamic menu in my "rightMenu.jspf", based on, if user has logged in or not.
    some like this!
    <jsp:if test ="${validUser == null}">
    some simple text menu here
    </jsp:if>
    but it is not working. it simply loading all and images with in statement, regardless of whether user has logged in or not. i think some how if statement is not working properly.
    "validUser" is a session bean, which is not creating at this point, it will created when user will log in successfully. and also this session bean does not exist at the page, where i am trying to check that .
    Is there any way to create dynamic values in jsp. It is really important, is there any body who help me in this matter. i would be really grateful.
    zaman

    hi jaspre,
    thanks for replying me. you know what, is it not something wrong with web.xml file. i remember once, i deleted some from there, a property with "*.jsp". i can't remember what exactly was it though.
    all if statements works on files ending with extension ".jsp" but don't work only on with extension ".jspf". there must be to do with this.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
    <servlet-name>ValidateServlet</servlet-name>
    <servlet-class>ValidateServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ValidateServlet</servlet-name>
    <url-pattern>/ValidateServlet</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>pollAndCometEnabled</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    main.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    if any one can figure it out. i would be grateful.
    zaman

  • Deliver line item Creation thru Program

    Hi guys,
    please help me to create delivery creation for a ship-to party and line item creation thru any finction module when the ship-to party has different materials ordered.
    is there any standard Function module to just create a delivery line item when the delivery is not completely processed.
    Please help me in this issue.

    check
    BAPI_INB_DELIVERY_CHANGE       Change inbound delivery
    BAPI_INB_DELIVERY_CONFIRM_DEC  BAPI for inbound delivery verification from a decentralized system
    BAPI_INB_DELIVERY_SAVEREPLICA  BAPI Function Module for Replication of Inbound Deliveries
    BAPI_OUTB_DELIVERY_CHANGE      BAPI for Change to Outbound Delivery
    BAPI_OUTB_DELIVERY_CONFIRM_DEC BAPI for Outbound Delivery Verification from a Decentralized System
    BAPI_OUTB_DELIVERY_SAVEREPLICA BAPI Function Module for Replication of Outbound Deliveries
    BAPI_OUTB_DELIVERY_SPLIT_DEC   BAPI for Subsequent Outbound-Delivery Split from a Decentralized Syste
    u have to CHANGE Delivery i.e in change mode u can ADD.
    otherwise check user exits
    *        FORM-Routinen für Userexits
             include mv50afzz.
             include mv50afz1.
             include mv50afz2.
             include mv50afz3.          "Userexit neu zu Release 3.0A
             include mv50afzk.          "Userexit 4.6A (KOMKG/KOMPG)
             include mv50afzl.          "Userexit 4.6A Liefergruppen
                                                                   "n_693000
             include mv50afzp.          "Userexit for pricing screen input
    Regards
    Prabhu

Maybe you are looking for

  • Back ground job scheduling in BDC

    Hi , Can anybody explain about back groung job scheduling in BDC program.

  • Root Account

    I need serious help!!! I am a new mac user...I've had my computer for less than a year and I just found out after not being able to log into my root account that you shouldnt use it for everyday usage and I have and now I can't log into it. How do I

  • Alertbox on submit email if a subform is visible

    Hello, I'm trying to create a script that would show a alertbox reminding the user that he must join needed files to the email before sending it. But this message must only be shown if a specific subform is visible, if it is not, than it must tranfer

  • Can't open Excel in Numbers

    Hi, I have downloaded an Excel file from my internet bank, but it won't open in Numbers. I get this error message: Import Warning - This is a HTML document, not a valid Excel document. The data might look different. It opens fine in Excel on my PC th

  • Are there any apps that make it now possible to scroll with Mountain Lion ?

    I just gave up on a project that required me to be able to scroll through a Senate bill. I'll probably go back, but it just shouldn't be so difficult, so painful. and I'm not talking about the bill's language. No, it's just Apple's decision to do awa