How to call the Jsp file in JspDynpage

Hello,
I am using the following jsp code. I saved it as Thumbnail1.jsp.
<%@page import ="com.sun.image.codec.jpeg.*" %>
<%@page import ="java.awt.*" %>
<%@page import ="java.awt.image.*" %>
<%@page import ="java.io.*"%>
<%
    // load image from INFILE
         Image image = Toolkit.getDefaultToolkit().getImage("C:/kasturi/sap1.jpg");
     MediaTracker mediaTracker = new MediaTracker(new Container());
        mediaTracker.addImage(image, 0);
         mediaTracker.waitForID(0);
    // determine thumbnail size from WIDTH and HEIGHT
         int newImageWidth = Integer.parseInt("100");
         int newImageHeight = Integer.parseInt("100");
         double newImageRatio = (double)newImageWidth / (double)newImageHeight;
         int oldImageWidth = image.getWidth(null);
          int oldImageHeight = image.getHeight(null);
          double oldImageRatio = (double)oldImageWidth / (double)oldImageHeight;
          if (newImageRatio > oldImageRatio)
                newImageWidth = (int)(newImageHeight * oldImageRatio);
      else
          newImageHeight = (int)(newImageWidth / oldImageRatio);
    // draw original image to thumbnail image object and
    // scale it to the new size on-the-fly
         BufferedImage newThumbImage = new BufferedImage(newImageWidth, newImageHeight, BufferedImage.TYPE_INT_RGB);
          Graphics2D graphics2D =newThumbImage.createGraphics();
             graphics2D.drawImage(image, 0, 0, newImageWidth, newImageHeight, null);
    // save thumbnail image to OUTFILE
           BufferedOutputStream outFile = new BufferedOutputStream(new  FileOutputStream("C:/kasturi/ssa.jpg"));
          JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(outFile);
          JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(newThumbImage);
            encoder.setJPEGEncodeParam(param);
          encoder.encode(newThumbImage);
          outFile.close();
          System.out.println("Successfully Saved.");
%>
I want to call this thumnail1.jsp file JspDynpage. Can any help me how to make that?
Thanks in advance.

hello,
<?xml version="1.0" encoding="utf-8"?>
<application>
  <application-config>
    <property name="SharingReference" value="com.sap.portal.htmlb"/>
  </application-config>
  <components>
    <component name="Test">
      <component-config>
        <property name="ClassName" value="kasturi.Test"/>
        <property name="ComponentType" value="jspnative"/>
        <property name="JSP" value="pagelet/Thumbnail1.jsp"/>
        <property name="SecurityZone" value="high_safety"/>
        <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
      </component-config>
      <component-profile/>
    </component>
  </components>
  <services/>
</application>
this is my portalapp.xml file. Still i am getting error.
i don't know the exact error. i think it may be java code problem.
can you tel me what is that? thanks in advance.
Message was edited by: kasturi ramalingam

Similar Messages

  • How to call the XML file as PrivateResourcePath in JSP

    Hi All,
    I want to call the layer-config.xml values in JSP dropdown list. How to call the XML file as PrivateResourcePath in JSP... please advise me if any solution.
    locaiton: dist/PORTAL-INF/layer-config.xml
      <?xml version="1.0" encoding="utf-8" ?>
    - <layer-config>
    - <system>
      <layer>Test</layer>
      <internal>true</internal>
      </system>
    - <system>
      <layer>Test1</layer>
      <internal>false</internal>
      </system>
    - <system>
      <layer>Test3</layer>
      <internal>false</internal>
      </system>
      </layer-config>
    Thanks in advance.

    Hi,
    The below link may help you.
    [Accessing image from dist/imgaes folder inside JSPDynpage Component;
    Regards,
    Suresh Bachimanchi

  • How to call the XML file as Private

    Hi All,
    I want to call the layer-config.xml values in JSP dropdown list. How to call the XML file as PrivateResourcePath in JSP... please advise me if any solution.
    locaiton: dist/PORTAL-INF/layer-config.xml
      <?xml version="1.0" encoding="utf-8" ?>
    - <layer-config>
    - <system>
      <layer>Test</layer>
      <internal>true</internal>
      </system>
    - <system>
      <layer>Test1</layer>
      <internal>false</internal>
      </system>
    - <system>
      <layer>Test3</layer>
      <internal>false</internal>
      </system>
      </layer-config>
    Thanks in advance.

    Hi,
    The below link may help you.
    [Accessing image from dist/imgaes folder inside JSPDynpage Component;
    Regards,
    Suresh Bachimanchi

  • How to call a .jsp file from Applet

    Could any one guide me how to call a .jsp file from a Applet using action Event.
    Thanks

    http://javaalmanac.com/cgi-bin/search/find.pl?words=URL+post

  • How to call the Jsp through BPM Obejct

    Hi,
    I have gone through the some topic, how to call the Jsp through BPM Object.
    I have followed step below,
    1. I have create the sample jsp page
    2. Import into BPM studio under webroot\custom Jsp
    3. Created the screenflow and added the "Interactive Component call" object
    4. Right Click the Object and selected Maintask and Implementation type as "BPM Object Interactive Call"
    5. Selected the use JSP presentation object option and when i click ok its showing "BPM instance object must be selected"
    But when i select the Instance Variable tab, its not showing anything.
    Can any one help me how to call the Jsp in screenflow with step by step procedure, that would be very greate help for me.
    Regards,
    Anandh P

    Hi,
    You are running a jsp report through rwservlet. In this case paper layout will be displayed. You have to deploy your jsp as web report to get the web layout. Please refer to the doc below, which describes how to deploy the web report.
    http://download-uk.oracle.com/docs/html/B10314_01/pbr_run.htm#1011901
    To run the jsp report, URL may look like
    http://www.wwt.com/reports/<jsp name>?<parameter list>
    Hope this helps
    Vinayak

  • How to call the css file and its images from our application......

    hai,
    Im uploading a .css file and some images in Apex shared components ,now how to call the css file and images from my Application.... plz tell me detailed.....
    Edited by: anoo on Nov 3, 2008 12:51 AM

    Hi Anoo,
    Sorry, didn't see that you'd started a new thread, so have answered this in 'undefined' is null (or) not an object "
    Andy

  • How to find the jsp file in iSupplier Portal

    Hi,
    I need to change a jsp page from Oracle iSupplier Portal, I got the url but I can't find the jsp file of that URL, how can I find that file?
    http://sboglx11.alpina.co:8040/OA_HTML/OA.jsp?callType=W&_ri=177&_rc=POSINQUIRIESPL&flowApplicationId=177&flowCode=POS_SUPPLIER_INQUIRIES&pageApplicationId=177&pageCode=POS_AP_INVOICE_DTL_D&whereRegionCode=POS_AP_INVOICE_DTL_D&addBreadCrumb=Y&WPARAMSINVOICE_ID=526856&_ti=1715476161&oapc=7&oas=MtxL7MgOdHAuyU8-iC7c8Q..
    Thanx,
    Ivan Loaiza.

    Hi,
    I have a custom request to add a new table on the page of that url from a custom query. I tried to make changes activating the FND_CUSTOM_OA_DEFINTION's profile, and enter to the 'Personalize Page' link, but on this opcion I couldn't find the way to enter a new query. Now I try to customized directy the jsp file and add a new table on that region asociated with custom query.
    I also try with the AK Developer responsability but I got the following error when I try to open the page "No data found for region (/oracle/apps/pos/regionMap/POS_CUSTOM_IMP)" where "POS_CUSTOM_IMP" is a new region that I created with the AK Developer responsability.
    Thanx,
    Ivan Loaiza

  • How to run the jsp file

    i am writing a simple jsp file
    i dont know how to run in the tomcat server
    for servlets first i created the dot class files by using the command prompt and then in the tomcat server we go the webapps folder and i copy the class files and due to xml file i run the program
    I have added the jsp-api.jar and el-api.jar files in the environment variables so what i do to run the jsp
    can anyone can tell me how to do that
    here is the program
    <%@page contentType="text/html" import="java.util.*" %>
    <!--
    Date.jsp
    -->
    <html>
    <body>
    <p> </p>
    <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing
    ="0" width="460" bgcolor="#EEFFCA">
    <tr>
    <td width="100%"><font size="6" color
    ="#008000"> Date Example</font></td>
    </tr>
    <tr>
    <td width="100%"><b> Current Date
    and time is: <font color="#FF0000">
    <%= new java.util.Date() %>
    </font></b></td>
    </tr>
    </table>
    </center>
    </div>
    </body>
    </html>

    i am getting an http 500 error for running the jsp file
    here is the code
    <%@ page import="java.util.Date" %>
    <% Date now = new Date(); %>
    <html>
    <body>
    <p>Hello, world! It is now <%= now.toString() %>.</p>
    </body>
    </html>

  • How to view the JSP file from JBuilder 2007?

    Hi,
    I want to know that how to preview the JSP page from jbuilder 2007. whenever i am changing the jsp code, i would like to see the reflection in preview page. but i couldn't find that tab in jbuilder. Is JBuilder not supporting the preview feature ?? :-(
    awaiting for your immediate response.
    thanks
    pannar

    it's more likely because you lack even a basic understanding about both JBuilder and JSP.
    If you have even a modicum of intelligence the documentation is enough to get you up and running, but don't expect it to be a how-to document that holds your hand every step of the way through implementing an entire application from scratch.
    And no, we're not going to write something like that for you.

  • How to call a jsp file from an servlet and access the jsp file objects??

    Hi everybody
    I have an jsp file where it contains a vector object with some data and I have a servlet that needs to access this vector object . How can my servlet call for this jsp page and get the vector object. ?
    then an applet will be calling this servlet to get some other object created with the data contained within this vector object...so each time Applet ask the servlet for the object the servlet need to call for this jsp page somehow
    My main question is the communication servlet-jsp
    please if u have any clue I will appreciate it
    thanks

    Hi
    There are several ways to share objects between JSPs/Servlets.
    You can share objects by putting them in the request-in which case the objects lifetime is limited by that of the request, Another way is to store them in the session, againg the lifetime is limited by the lifetime of the session. To have objects that have to persistent over the application life-span use the servletContext to store the objects.
    Any good tutorial should help you get started. Please see the link below for a tutorial on Servlets/JSPs
    Note: Local variables in the JSP cannot be shared with other components as their scope is limited to that particular Page/Servlet.
    Link: http://java.sun.com/docs/books/tutorial/servlets/
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc
    http://www.sun.com/developers/support

  • How to call the JSP(Web layout) instead of paper layout...

    Hi,
    Iam using Reports 10g. I have created a simple employees report. I have added a listbox in the jsp page by adding small Html and javascript code like below.
    <form action="http://www.wwt.com/reports/rwservlet?10000_reports_listing&p_extranet=p_extranet" name="First" method="post">
    <select name="p_extranet" onChange="First.submit()" >
    <rw:foreach id="RGSOURCE" src="G_SOURCE">
    <rw:getValue id="mysource" src="SOURCE"/>
    <option value=""><%= mysource %>
    </rw:foreach>
    </select>
    </form>
    When I run this report in the report builder as Web layout, Listbox is displayed with values inside.
    But when I move it to Apps server and run it through URL,
    listbox is disappeared. I think report is running the Paper layout instead of weblayout ??????????
    Could you please tell me what is the problem and How to force the Weblayout or JSP to run ?
    Thanks.

    Hi,
    You are running a jsp report through rwservlet. In this case paper layout will be displayed. You have to deploy your jsp as web report to get the web layout. Please refer to the doc below, which describes how to deploy the web report.
    http://download-uk.oracle.com/docs/html/B10314_01/pbr_run.htm#1011901
    To run the jsp report, URL may look like
    http://www.wwt.com/reports/<jsp name>?<parameter list>
    Hope this helps
    Vinayak

  • How to call the javascript file through sdk?

    I created a plugin through SDK. Now i need to call my javascript file in that plugin code(c++). Could you please advice me with some samples. This is for "Illustrator CS".
    Thanks,
    Prabudass

    I haven't the foggiest idea, except to perhaps suggest firing a script by using the AIActionManager::PlayAction command. That's assuming you can 'action' the use of a script though. If you can, it should be possible that way, if not, I have no idea.

  • Calling the Log file (Operating System)  using PL/SQL

    Hi to everybody
    i am loading the legacy data to oracle apps table through sqlloader,
    now i want to know how many data record in my legacy file,
    we get it through log file of Sqlloader,
    now my question is how to call the log file through PL/sql script
    Please solved my question

    You can define an external table on it, and read it with Sql commands.
    See External Table Example

  • How to call a .jar file in JSP

    Hi Folks,
    I would like to know how to call a .jar file in a JSP page..
    Thanks in adv.

    Any web app creating tutorial can. You know, if this doesn't ring a bell with you at all, I don't really feel inclined to explain it to you because I think you shouldn't yet be dealing with JEE in the first place.
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WebComponents3.html

  • How can i access the jsp file in a asp file

    Hi every one..
    we have two projects one is developed in ASP and one is developed in JSP both are running in two different locations.
    now i want to include a jsp file from one project to ASP file in the other project.
    please tell me how can i insert the JSP file in ASP application.
    thanx in advance.

    Wouldn't that be an ASP question for an ASP forum?

Maybe you are looking for

  • Mappings disapper randomly

    Hello, we've six new HP ProDesk 405 computer in our environment and some problems only with this new machines: DriveMapping-connections are disappearing randomly sometimes and we can't disconnect or reconnect this mappings. (red cross, not always all

  • WRT54GS v7.5 firmware

    Hi guys this is my first message here, so hi to all readers.. Ok, I'm experiencing some problem with the QoS feature of my router WRT54GS, (in practice it's not so configurable as I want, but this is my problem ...) so, I googled a lot but I didn't f

  • Subquery execution plan issue

    Hi All, Oracle v11.2.0.2 I have a SELECT query which executes in less than a second and selects few records. Now, if I put this SELECT query in IN clause of a DELETE command, that takes ages (even when DELETE is done using its primary key). See below

  • Two Assignments in InCopy's Assign Panel

    Now I'll install the workflow with InDesign CS5 and InCopyCS5 at medium  Newspaper. The problem is: I want that InCopy users (editors) to be  able put a INCX file to other assingment in InCopy's panel assignments Is it Possible? Have two assignments

  • Premier Elements 11 .vob Import?

    Can Premier Elements 11 import .vob files? (I dub home movie VHSs to DVDs w/a Samsung DVD-VR375 DVD & VCR machine.)  When I copy my DVD to my hard drive on my computer, I can play my files just fine.  But when I want to edit my video to get rid of so