Url location of dynamically created file...

I have a web app war that I have deployed to weblogic. This war generates some images which I want to point to from my web app browser.
1. Is there a specific directory ( like the default root of the web app ) that I can get access to create these files ?
2. Then what is the relative url to use to access these images ? ie, after creating the file in step (1), what relative url should I pass to the RequestDispatcher to access these images ?
I can do this in Tomcat because I can create "/webapp/images" directory, and create the image files under this directory and then access them using the same url. But in weblogic, I dont know what the default directory is.
Thanks
-- pady

Hi Pady,
we have to place all imaze files or jsps or html files under webapplication directory(resides WEB-INF directory of the webapp).
then the container automatically reads those files.
we can access these files with RequestDispatcher Interface as given below.
RequestDispatcher dispatcher =      request.getRequestDispatcher("/template.jsp");
     if (dispatcher != null) dispatcher.forward(request, response);
suppose if you placed imaze files under myimazes folder then we can acces those files like this
RequestDispatcher dispatcher =      request.getRequestDispatcher("/myimazes/imaze.jpeg");
dispatcher.forward(request, response);
----Anilkumar kari

Similar Messages

  • AutoScrolling of PanelLayout and setting Location of dynamically created controls

    Hi, I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up.
    So basically I have wrote a code that lets me drag on control over other other and replace their's locations.
    So I wanted to add possibility for user to dynamically add new controls (every new control is suppose to be 200px below previous) - everything is fine as long as I add them from upper section of my LayoutPanel (without scrolling) but when I try to add
    them while I'm half dawn scrolled they are placed based on CURRENT left upper corner which is NOT a upper left corner of LayoutPanel therfore they are placed with wrong padding based on current scrolled position.
    So my question is how can I avoid it and always add new controls based on LayoutPanel upper left corner? (I have already tried disabling AutoScroll while adding new control and enabling it back after adding - it works but I want to find PROPER way because
    I'm sure there must be some kind of solution to it)
    Thanks in advance.

    Hi darekg11,
    >> I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up
    I am wondering what the PanelLayout was, was it a “flowLayoutPanel” or “tableLayoutPanel”?
    >> basically I have wrote a code that lets me drag on control over other other and replace their's locations
    Did you mean you drag the control at runtime or at design time?
    >> how can I avoid it and always add new controls based on LayoutPanel upper left corner
    I could not reproduce your issue, and could you share us some key code or a simple demo to reproduce your issue?
    I made a research about “scrolling panel”, and I think the link below might be useful to you:
    # Scrolling Panel
    http://www.codeproject.com/Articles/226381/Scrolling-Panel
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Dynamically creating file using variable

    HI, i am facing an issue in creating file on run time using variable.
    i have a variable FileName. In refresh tab i have written a query like SELECT TO_CHAR(SYSDATE,'YYYY,MM,DD') || 'TEST' FROM DUAL. i tested the variable and its value is correct.
    i have created an interface to extract the data from table and store it in file. i have assigned variable FileName to the file.
    Now when i run the interface...the file is created but the header is created in different file and its name is ambiguous e,g(19) and the data is placed in other file with the name which is the value of variable FileName.....
    ISSUE is two ODI creates two files one for header only and other for data....
    when i run my interface in a package the file created perfectly ..... but i dun want to use package i want to create file through running interface only

    one file name is some number like 19.txt and other filename is 20121211_TEST.txt (this name is coming from variable).....
    however when i create a package with variable and interface,only one file is created 20121211_TEST.txt (header and data are not created in separate files.)
    create header     (ID,
         NAME,
         DEPT)
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=TARGET_FILESNP$CRLOAD_FILE=*E:\tempProj/19*SNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=0x007eSNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=IDSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=NAMESNP$CRTYPE_NAME=STRINGSNP$CRORDER=2SNP$CRLINE_OFFSET=51SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=DEPTSNP$CRTYPE_NAME=STRINGSNP$CRORDER=3SNP$CRLINE_OFFSET=101SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CR$$SNPS_END_KEY*/
    Edited by: 975356 on Dec 11, 2012 10:57 PM
    Edited by: 975356 on Dec 11, 2012 10:58 PM

  • Delete File from URL located on HTTP Server.

    Hello All, could you anybody help me with my Problem. I need to delete some File in URL located on HTTP Server. The File was created via using of the Function 'DP_CONTROL_SEND_STREAM_TO_URL'. Any Times I need to delete this File from the url Location, but I cann't find any Functions or Method of any Class (GUI 6.20) to realise that. I read lot of very good Blogs from Thomas Jung about HTTP classes, but I cann't find somthing relevant for me...
    Sincerely Yours,
    Lubomir

    Hi,
    You can try with GUI_DELETE_FILE and give http location in FILE_NAME
    or WS_FILE_DELETE.
    I am not getting any CNDP function module for your purpose.
    Hope you will get sucess..
    Thanks,
    Chetan Shah

  • How to display a dynamic image file from url?

    Hey,I want to display a dynamic image file from url in applet.For example,a jpg file which from one video camera server,store one frame pictur for ever.My java file looks like here:
    //PlayJpg.java:
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    public class PlayJpg extends Applet implements Runnable {
    public static void main(String args[]) {
    Frame F=new Frame("My Applet/Application Window");
    F.setSize(480, 240);
    PlayJpg A = new PlayJpg();
    F.add(A);
    A.start(); // Web browser calls start() automatically
    // A.init(); - we skip calling it this time
    // because it contains only Applet specific tasks.
    F.setVisible(true);
    Thread count = null;
    String urlStr = null;
    int sleepTime = 0;
    Image image = null;
    // called only for an applet - unless called explicitely by an appliaction
    public void init() {
                   sleepTime = Integer.parseInt(getParameter("refreshTime"));
              urlStr = getParameter("jpgFile");
    // called only for an applet - unless called explicitely by an appliaction
    public void start() {
    count=(new Thread(this));
    count.start();
    // called only for applet when the browser leaves the web page
    public void stop() {
    count=null;
    public void paint(Graphics g) {
    try{
    URL location=new URL(urlStr);
    image = getToolkit().getImage(location);
    }catch (MalformedURLException mue) {
                   showStatus (mue.toString());
              }catch(Exception e){
              System.out.println("Sorry. System Caught Exception in paint().");
              System.out.println("e.getMessage():" + e.getMessage());
              System.out.println("e.toString():" + e.toString());
              System.out.println("e.printStackTrace():" );
              e.printStackTrace();
    if (image!=null) g.drawImage(image,1,1,320,240,this);
    // called each time the display needs to be repainted
    public void run() {
    while (count==Thread.currentThread()) {
    try {
    Thread.currentThread().sleep(sleepTime*1000);
    } catch(Exception e) {}
    repaint(); // forces update of the screen
    // end of PlayJpg.java
    My Html file looks like here:
    <html>
    <applet code="PlayJpg.class" width=320 height=240>
    <param name=jpgFile value="http://Localhost/playjpg/snapshot0.jpg">
    <param name=refreshTime value="1">
    </applet>
    </html>
    I only get the first frame picture for ever by my html.But the jpg file is dynamic.
    Why?
    Can you help me?
    Thanks.
    Joe

    Hi,
    Add this line inside your run() method, right before your call to repaint():
    if (image != null) {image.flush();}Hope this helps,
    Kurt.

  • How can I locate my iTunes library files. When I click on my itunes icon the message appears, "The file iTunes Library.itl." cannot be found because it was created by a newer version of iTunes."

    How can I locate my iTunes library files?  When I click on my iTunes icon rather than my iTunes files I receive, " The file iTunes Library.itl." cannot be read because it was created by a newer version of iTunes."  I have already tried to update my iTunes program.

    Had same problem and solved it without having to reinstore any music or movies:
    1. Delete old Library file
    2. Go to the 'Previous iTunes Libraries' folder and copy one of the earlier files - note, they have a date extension, e.g. 'iTunes Library 2011-11-01'.
    3. Paste this file in your iTuners folder and rename file by removing the date extension -  'iTunes Library'
    You should have all your music and paylists in tact, unless it was a really old previous file.

  • Error when inserting into dynamically created filename-file

    Howry
    Am am receiving the following error when i am trying to insert into a file that have a dynamic filename (through declared variable, as date etc.).
    I presume it is trying to look for the target file with the same name as the dynamic value passed through by the variable, but cannot find it- can anyone tell me how i can rather create the file as appose to insert into an already created file..?
    Your help in this regard is much appreciated.
    Here is the error:
    ODI-1217: Session SAPO_hlr_suburbs (1577001) fails with return code 7000.
    ODI-1226: Step 6_Ins_final fails after 1 attempt(s).
    ODI-1240: Flow 6_Ins_final fails while performing a Integration operation. This flow loads target table #l_date.unl.
    ODI-1228: Task 6_Ins_final (Integration) fails on the target FILE connection SAPO_HLR_SUBURBS.
    Caused By: java.sql.SQLException: File C:\Files\Gero work\ODI In Files\SAPO_HLR_SUBURBS/2012-01-24 12:06:13.463.unl was not found
         at com.sunopsis.jdbc.driver.file.FileConnection.prepareForWriting(FileConnection.java:339)
         at com.sunopsis.jdbc.driver.file.impl.commands.CommandInsert.execute(CommandInsert.java:50)
         at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
         at com.sunopsis.jdbc.driver.file.FilePreparedStatement.executeUpdate(FilePreparedStatement.java:138)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java:665)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3218)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java:1785)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2805)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java:68)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:619)

    What operating system are you using?
    The name of your file has the time within it , you cant have a filename with ':' in it on Windows.
    Try using ALPHANUMERIC datatype for the variable and pull the current datetime as a char with something like :
    select to_char( sysdate ,'YYYY-MM_DD HHMISS') from dual

  • Uploading data from excel file to a dynamically created internal table

    Hi,
    I have a requirement where i have to upload data from an excel file into a database table. I would be able to determine the structure of the table only at runtime based on the user input.. so i have created an internal table dynamically.
    Could you please tell me if its possible to upload data from an excel file to the dynamically created internal table using any function modules?
    I thought of doing this by declaring a generic internal table of one field and then uploading the *.csv file into it and then splitting it based on "," and then assigning it to the field symbol referencing the internal table.. but my file length exceeds 132 characters and i'm only able to get data of lenght 132 char's in my internal table ( generic one).
    Could anyone please show me a way around this.
    Thanks in advance,
    Harsha

    Sure, check this out.
    report zrich_0002.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: it_fldcat type lvc_t_fcat,
          wa_it_fldcat type lvc_s_fcat.
    type-pools : abap.
    data: new_table type ref to data,
          new_line  type ref to data.
    data: iflat type table of string.
    data: xflat type string.
      data: irec type table of string with header line.
      data: tabix type sy-tabix.
    data: file type string.
    selection-screen begin of block b1 with frame title text .
    parameters: p_file type  rlgrap-filename default 'c:Test.csv'.
    parameters: p_flds type i.
    selection-screen end of block b1.
    start-of-selection.
    * Add X number of fields to the dynamic itab cataelog
      do p_flds times.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = sy-index.
        wa_it_fldcat-datatype = 'C'.
        wa_it_fldcat-inttype = 'C'.
        wa_it_fldcat-intlen = 10.
        append wa_it_fldcat to it_fldcat .
      enddo.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
      file = p_file.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = file
        changing
          data_tab                = iflat
        exceptions
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          others                  = 17.
      loop at iflat into xflat.
        clear irec. refresh irec.
        split xflat at ',' into table irec.
        loop at irec.
          tabix = sy-tabix.
          assign component tabix of structure <dyn_wa> to <dyn_field>.
          <dyn_field> = irec.
        endloop.
        append <dyn_wa> to <dyn_table>.
      endloop.
    * Write out data from table.
      loop at <dyn_table> into <dyn_wa>.
        do.
          assign component  sy-index  of structure <dyn_wa> to <dyn_field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <dyn_field>.
          else.
            write: <dyn_field>.
          endif.
        enddo.
      endloop.
    Regards,
    Rich Heilman

  • I have LR 4 and now I cannot open the software because I get this warning: light room cannot start because it cannot create files in the temp file location.. C:/windows/temp. How do I fix this? I have removed and downloaded LR and even used by disc and st

    I have LR 4 and now I cannot open the software because I get this warning: "light room cannot start because it cannot create files in the temp file location. C:\windows\temp\". I think I need to have LR open in a different place but I have no idea how to do that. Any help is most appreciated.
    Alex

    Jim
    Thank you for your prompt reply. Unfortunately I am not that tech oriented and
    cannot easily find that folder. I did notice when I was booting up the LR software
    that I could accept the site where LR usually is set up or choose a place. I am
    thinking that the standard location for LR software is corrupted and that if I
    chose a different place it would work. I say this because whether I use my
    original disc or download from adobe I get the same warning. I have 100GB of
    memory on the hard drive and I have cleaned the computer with Mcaffee and free
    software. What should I do next? I can't use this software and I doubt LR 5
    would open up with my current problem.
    Alex

  • Creating dynamical flat file name in mapping?

    Hi.
    I know about the variations on how to use an input parameter and/or sysdate to create a dynamic output file name in a mapping.
    My challenge is nearly the same, but I cannot make OWB generate the correct code.
    Problem:
    - got a one column table that holds an identifier in a string field
    - got a function that reads and returns said identifier
    - imported function into OWB
    - trying to use the function call in the Flat File Operator's Target Data File Name, e.g. fixedfilename||fn_get_id()||sysdate||'.ext
    OWB creates the code:
    UTL_FILE.FOPEN(
    'my_location',
    'fixedfilename'||fn_get_id()||'_'||SYSDATE||'.ext',
    'w',
    32767
    However, when compiling the package code, it returns the warning:
    ORA-06550: PACKAGE BODY, line 2214, column 29: PLS-00201: identifier 'FN_GET_ID' must be declared
    which results in an error when trying to execute the mapping.
    I've tried substituting the function call in the FOPEN call:
    myId := fn_get_id();
    UTL_FILE.FOPEN(
    'my_location',
    'fixedfilename'||myId||'_'||SYSDATE||'.ext',
    'w',
    32767
    and this works fine, the mapping creates a file with the desired filename. But obviously not a good solution rewriting the generated code all the time....
    Anyone solved something similar?
    Could I use an input parameter and the autogenerated function GET_<PARAMETER>?
    But can I set the value of an input parameter inside the very same mapping?
    Regards,
    -Haakon-

    (It always helps writing out one's problems...)
    I managed to get it working :-)
    Added an input parameter to the mapping, and gave the outgroup variable a default value by calling my imported function.
    Then concatenated the implicitly generated function (GET_PARAMETER) in the Target Data flat file name.
    I now have a target file name that changes according to a departement id stored in a parameter table.
    Regards,
    -Haakon-

  • Is anyone know how to create dynamic pdf file from a JSP page or Servlet ?

    Hi
    Is any one know how to create a dynamic PDF file from JSP or servlet. I need to have standard form format needs to be created and want to send the info to that form dynamically.
    Is there any libraries available?
    Thanks

    I posted a link in this thread to a lib that lets you create PDFs from an app. They have a Java version. I have not used it but I know someone who used it with Microsoft ASP and they liked it.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=287285
    -S-

  • How to dynamically create sqlldr control file using stored procedure

    I am trying to dynamically create the control file (.ctl) and execute the same using a stored procedure.I would be passing the file name as a parameter to this procedure. How do I go about doing this?
    The control file has the following structure. The file name (mktg) varies and is passed as an input to the stored procedure.
    SPOOL mktg.ctl
    LOAD DATA
    INFILE 'mktg.csv'
    INTO TABLE staging
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (COMPANY_NAME,
    ADDRESS,
    CITY,
    STATE,
    ZIP)
    SPOOL OFF ;
    sqlldr scott/tiger CONTROL= mktg.ctl LOG=mktg.log BAD=mktg.bad

    We are using oracle 9i rel 2.
    I have not had much success with the creation of log and bad files using external tables when they are being used within a dynamic sql.
    Plz check this:
    Re: problems related to data loads from excel, CSV files into an oracle 9i db

  • How to dynamically create header record in a file

    Hi All,
    how can we create custom header in data file. i have interface that creates file dynamically and Generate Header is set to true. The file header contains the column names. i want to create different file header like FileName_noOfrows_currentDate .how can i do this
    example... header_15_20121213
    Thanks
    Edited by: huny on Dec 19, 2012 4:53 AM

    Hi
    Please refer to this post :
    How to Add Header and Footer in Flat file
    You should find some advices and clues to create your custom header.

  • Create file with URL

    Hi,
    I want to create one file. It is ok when i give hard coded path like "C:\Temp..." but i do not want this way - can i specify the file path as URL ?
    I am having a Constants file - where base URL is being stored as variable "localhost:8080". I want to create file in localhost:8080/documents/ folder.
    how can i do that ?
    regards
    Manisha

    HTTP does not support the creation of a file.
    You need to know the root directory and have access to it.
    e.g. say the too directory is C:\MyWeb , to write to localhost:8080/documents/ folder. you need to write to C:\MyWeb\documents\folder\

  • Is there an ADOBE plugin for MS Project 2010 to create Dynamic PDF files?

    I wonder if there exist any ADOBE plugin for MS Project 2010 to create Dynamic PDF files?

    We are not going to use form fields. An employee is going to create large projects in MS Project 2010 and want to share his projects with other employees. So the need is just a viewer. So I guess we need to check out all the third part MS Project Viewers which is out there. Thanks for your answers guys!

Maybe you are looking for