How to get the specified serarch term from the complete url? - Help

Hello,
I have a table in which some columns. One of the column is storing the complete url for the search given by the user.
For Example:
1.
I give search like "oracle" on the Google, the column will store the complete url as
"http://www.google.com/search?hl=en&q=oracle".
I want the search word "oracle" to be returned from the column.
2.
I give search like "new + features + in + oracle + 10g", the column will store the url as
"http://www.google.com/search?hl=en&lr=&q=new+%2B+features+%2B+in+%2B+oracle+%2B+10g"
I want "new + features + in + oracle + 10g" search word to returned from the column.
Can anyone tell me how to achieve this task? I have tried for a long time also I tried the sys.utl_url.unescape() function, but could not got the desired result.
Please help, its really urgent!!!
Thanks in advance.

Hi,
you can have a look into this code:SET ESCAPE ON
DECLARE
        ref1 VARCHAR2(1000 CHAR) := 'http://www.google.com/search?hl=en\&q=oracle';
        ref2 VARCHAR2(1000 CHAR) := 'http://www.google.com/search?hl=en\&lr=\&q=new+%2B+features+%2B+in+%2B+oracle+%2B+10g';
        FUNCTION hextodec( h IN VARCHAR ) RETURN NUMBER
        AS
                h2 VARCHAR2( 150 );
                i NUMBER( 10 );
                j NUMBER( 2 );
                d NUMBER;
        BEGIN
                h2 := LTRIM( h, '0' );
                d := 0;
                FOR i IN 1 .. LENGTH( h2 )
                LOOP
                        SELECT DECODE( SUBSTR( h2, i, 1 )
                                , '0', 0, '1', 1, '2', 2, '3', 3, '4', 4, '5', 5
                                , '6', 6, '7', 7, '8', 8, '9', 9, 'A', 10
                                , 'B', 11, 'C', 12, 'D', 13, 'E', 14, 'F', 15 )
                                INTO j
                                FROM DUAL;
                        d := 16 * d + j;
                END LOOP;
                RETURN d;
        END hextodec;
        FUNCTION strip(samplevalue IN VARCHAR2) RETURN VARCHAR2
        AS
                finalvalue VARCHAR2(1000 CHAR) := samplevalue;
                decimalvalue NUMBER(2);
                pospct NUMBER;
                extract VARCHAR2(2 CHAR);
        BEGIN
                finalvalue := SUBSTR(finalvalue ,INSTR(finalvalue ,'\&q='));
                finalvalue := SUBSTR(finalvalue ,4);
                if (INSTR(finalvalue ,'\&')-1 > 0) then
                        finalvalue := SUBSTR(finalvalue ,1,INSTR(finalvalue ,'\&')-1);
                end if;
                finalvalue := REPLACE(finalvalue ,'+',' ');
                LOOP
                        pospct := INSTR(finalvalue ,'%');
                        EXIT WHEN pospct = 0;
                        extract := SUBSTR(finalvalue ,pospct+1,2);
                        finalvalue  := SUBSTR(finalvalue ,1,pospct-1) || chr(hextodec(extract)) || SUBSTR(finalvalue ,pospct+3);
                END LOOP;
                RETURN finalvalue;
        END;
BEGIN
        DBMS_OUTPUT.PUT_LINE( hextodec('2B'));
        DBMS_OUTPUT.PUT_LINE(strip(ref1));
        DBMS_OUTPUT.PUT_LINE(strip(ref2));
END;
/Regards,
Yoann.

Similar Messages

  • How to get the complete abap help file

    hi
    how to get the complete abap help file i mean F1 file.
    please provide some me links to download that file.

    Hi Kiran,
       If u want complete help for particular topic ; for that SAP has provided in built Transaction for help.
    Transaction is ABAPDOCU.
    I have certain link which will help u.
    SAP, ABAP interview question and answers
    http://www.geocities.com/sap_interviewquestions/
    IMP Link for All
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    Common Links
    http://www.sappoint.com/abap.html
    http://www.sap-img.com/abap-function.htm
    http://www.easymarketplace.de/online-pdfs-q-s.php
    http://help.sap.com/
    http://sapassist.com/groups/groups.asp?v=sap-r3-dev&m=3&y=2004
    http://training.saptechies.com/sap-basis-certification-sample-questions/
    http://www.geocities.com/mpioud/Abap_programs.html
    http://cma.zdnet.com/book/abap/index.htm
    http://www.sapdevelopment.co.uk/
    http://www.sap-img.com/
    http://juliet.stfx.ca/people/fac/infosys/abap.htm
    http://help.sap.com
    http://www.sap-img.com
    http://www.thespot4sap.com
    http://www.sap-basis-abap.com/
    http://www.sapdevelopment.co.uk/
    http://www.sap-img.com/
    http://juliet.stfx.ca/people/fac/infosys/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d6/0db357494511d182b70000e829fbfe/frameset.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://www.sapgenie.com/abap/example_code.htm
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://www.sap-img.com/abap-function.htm
    http://www.sapgenie.com/abap/code/abap19.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://help.sap.com/saphelp_40b/helpdata/ru/d6/0dc169494511d182b70000e829fbfe/applet.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
    http://www.henrikfrank.dk/abapexamples/index.html
    http://sap.ittoolbox.com/documents/document.asp?i=752
    http://members.aol.com/_ht_a/skarkada/sap/
    http://sappoint.com/abap/
    http://members.tripod.com/abap4/SAP_Functions.html
    http://members.ozemail.com.au/~anmari/sap/index.html
    http://www.planetsap.com/Userexit_List.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://www.kabai.com/abaps/q.htm
    http://www.planetsap.com/Userexit_List.htm
    http://help.sap.com/saphelp_bw21c/helpdata/en/c4/3a8090505211d189550000e829fbbd/frameset.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
    http://www.sap-basis-abap.com/index.htm
    http://help.sap.com/saphelp_40b/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/frameset.htm
    http://www.geocities.com/ResearchTriangle/1635/system.html
    http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
    http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
    http://www.sapfans.com/sapfans/repos/saprep.htm
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_util464/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
    http://www.sapgenie.com/abap/smartforms_detail.htm
    http://www.sap-img.com/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    http://www.geocities.com/victorav15/sapr3/abap.html
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://abap4.tripod.com/Other_Useful_Tips.html
    http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://www.sap-basis-abap.com/sapmm.htm
    http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
    http://sapfans.com/
    http://cma.zdnet.com/book/abap/ch03/ch03.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapuk.html
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://www.sapgenie.com/abap/index.htm
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
    http://www.thespot4sap.com/
    http://www.kabai.com/abaps/q.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapgenie.com/abap/tips_and_tricks.htm
    http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
    Mark Helpfull answrs
    Regards
    Manoj

  • How to get the customize url of an portlet using PLSQL

    How to get the customize url of an portlet using PLSQL.

    Are you trying to call the portlet Customization form directly from the browser?

  • How to get the complete definition of a table using SQL?

    How to get the complete definition code of a table using SQL?

    Something like this ?
    SQL> set long 10000
    SQL> set pages 200
    SQL> select dbms_metadata.get_ddl('TABLE','EMP') from dual;
    DBMS_METADATA.GET_DDL('TABLE','EMP')
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
            "JOB" VARCHAR2(9),
            "MGR" NUMBER(4,0),
            "HIREDATE" DATE,
            "SAL" NUMBER(7,2),
            "COMM" NUMBER(7,2),
            "DEPTNO" NUMBER(2,0),
             CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"  ENABLE,
             CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
              REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
    SQL>Amardeep Sidhu

  • How to get the complete Stack-Trace ?

    Hi,
    I'm getting the following error on the screen.
    oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement " INSERT INTO OTA.OTA_QUESTIONS(QUESTION_ID,TEXT,ALLOW_HTML_FLAG,OBJECT_VERSION_NUMBER,BUSINESS_GROUP_ID,START_DATE_ACTIVE) VALUES (:1,:2,:3,:4,:5,:6)".
    I want to get the complete stack-trace. I turned on the screen log, but still not getting the error-stack. Can anyone lemme know, how to get the complete error-stack ? This error is raised from a seeded page.
    Thanks,
    Guna.

    This is a developer raised exception and not a standard expection(depends on a profile), that is why you cannot see the error stack.You have to put system.out.println, to debug.You get such errors when there is some fundamental mistake and not framework exception.
    As the error says look into the query and see all bind variables are setting properly.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Not able to get the complete URL in mail content

    Hi All,
    I want to give the below link in mail which is sent from workflow, so on click of it, the user will be able to open the particular opportunity directly.
    https://<sys_host>%3Fcrm-object-type%3DBT111_OPPT%26crm-object-action%3DB%26crm-object-keyname%3DGUID%26crm-object-value%3DXXXXXXXXXXXX
    XXXXX here is GUID of the Opportunity of 32 character.
    For this, I have created a attribute of type BAPITGB-LINE. When inserting this expression into the mail activity of the WF, I have chosen the data to be exported as "All lines as cont. text".
    In this attribute, when I concatenate the values and the guid, I get only part of the link as below which is 133 characters.
    https://<sys_host>%3fcrm-object-type%3dbt111_oppt%26crm-object-action%3db%26crm-object-keyname%3dguid%26cr
    When I try to append it in a internal table of type BAPITGB, I am getting the complete URL but with a space between every line in the internal table as below.
    https://<sys_host>%3Fcrm-object-type%3DBT111_OPPT[SPACE]%26crm-object-action%3DB[SPACE]
    %26crm-object-keyname%3DGUID[SPACE]%26crm-object-value%3D
    DFD60A8AD0E53DF1918F0050569F0324
    Please let me know, how to avoid this space in append statements. Also, the concatenate is taking only 132 characters, after which it cuts the URL, leaving it incomplete.Kindly correct me if I was wrong somewhere.
    Thanks,
    Ramya
    Edited by: Gali Kling Schneider on Jul 11, 2011 9:47 AM

    Hi Sanjay,
    As suggested, I have split the URL into 3 links in WF container having the initial values as below.
    Link1 -> <sys_host>.%3Fcrm-object-type%3DBT111_OPPT
    Link2 -> %26crm-object-action%3DB %26crm-object-keyname%3DGUID
    Link3 -> %26crm-object-value%3D
    In the mail activity, I have given the link as: &LINK1&&LINK2&&LINK3&&GUID&
    &GUID&-> GUID of the opportunity.
    When I tested this in log-> List with technical details-> mail, it had the correct value without space as below.
    https://<sys_host>.%3Fcrm-object
    -type%3DBT111_OPPT%26crm-object-action%3DB
    %26crm-object-keyname%3DGUID%26crm-object-value%3DDFD60A8AD0E53DF1918F00505
    69F0324
    But in SOST, when I checked for the link it is having spaces as below:
    https://<sys_host>%20%3Fcrm-object-type%3DBT111_OPPT%20%26crm-object-action%3DB%26crm-object-keyname%3DGUID%20%26crm-object-value%3D%20DFD60A8AD0E53DF1918F0050569F0324
    Kindly advice.
    Thanks,
    Ramya
    Edited by: Gali Kling Schneider on Jul 11, 2011 9:48 AM

  • How to get the complete explain plan stored in a particular OUTLINE

    Hi,
    How do I get the complete text of the explain plan stored in a particular outline? I have the name of the outline.
    I can't run the query which has this outline as it is on production.I want to know which tables/views will have the explain plan text?
    Thanks,
    Sach
    Edited by: user631085 on Mar 29, 2009 11:27 PM
    Edited by: user631085 on Mar 29, 2009 11:29 PM
    Edited by: user631085 on Mar 29, 2009 11:29 PM

    You can access the _OUTLINES views.
    Pelase refer the following and look for 'Viewing Outline Data':
    http://youngcow.net/doc/oracle10g/server.102/b14211/outlines.htm

  • How to get the current URL in UIX

    I've tried:
    ${pageContext.request.requestedURL}
    ${uix.bajaContex.servletRquest.requestURL} (works but returns .uix, I want .do links)
    They didn't work.
    Thanks,
    Eduardo

    Eduardo,
    I guess that this has to do with the way that Struts and UIX controllers work together. My assumption is that though you see .do in teh URL, its actually .uix that is processed at last.
    Can't you get the request URL from the findForward method in the Struts DataAction ?
    Frank

  • How to get the complete file name?

    Good day!
    My task is to upload files to the database and also save its path. I am already through with the Blob files but I have a problem with its filename. My boss wants me to get the complete path/location of the file that I am uploading. I mean, she wants to get where it is saved first before I upload it.
    Ex.
    C:/My Documents/User Files/WebApps/myWebApps/test.txt
    currently I am using the following codes:
    CODE 1:
         File tempFileRef  = new File(fi.getName());
         System.out.println("Field = "+tempFileRef);It only outputs:
    Field = test.txt
    which is not complete
    CODE 2:
         File tempFileRef  = new File(fi.getName());
         System.out.println("Field = "+tempFileRef.getAbsolutePath());which also gives this wrong output:
    Field = C:\Tomcat 5.5.23\bin\test.txt
    Can someone please help me?
    Thanks so much.
    God bless.

    Thank you for your reply.
    I am using Apache Commons File Upload. Here is the code where I got the "fi".
         DiskFileUpload fu = new DiskFileUpload();
              fu.setSizeMax(1000000000);
              List fileItems = fu.parseRequest(request);
             Iterator itr = fileItems.iterator();
              FileItem fi = (FileItem)itr.next();
              if(!fi.isFormField())
                File tempFileRef  = new File(fi.getName());
         System.out.println("Field = "+tempFileRef.getAbsolutePath());
         }

  • How to get the complete data from Webdynpro using a RFC

    hi guys,
    A form is created in the webdynpro, when that pdf form is called the user have to provide the key field ie the employee number in the form and then when he press the 'go' button a rfc is called and it gives all the details of the employee in the form. Then the user have to input some fields in the form and he have press the submit button. My problem is here, when the user is going to press the submit button that form will be converted to a stream (binary) of data and it is sent to one of the import parameter used in the RFC.
    I have created a RFC and created a import parameter of data type XSTRING, since i want to see what exactly R3 is receiving from web dynpro i am writing this contant in the sever as a text file. When i saw that text file i cant see the complete data.
    And when i searched in R3 the capacity of xstring is 1024 CHAR, so i dont know how to capture the entire data from webdynpro into my R3.
    I give the code what i worte please tell me am i missing anything in my code, or is there any data type which can hold more than 500kb of data which is coming from webdynpro.
    FUNCTION ZSEND_MAIL_ATTACHMENT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(OUT_PLACE_LEVEL) TYPE  XSTRING OPTIONAL
    *"     VALUE(BIN_DATA) TYPE  INDX_CLUST OPTIONAL
    *"  TABLES
    *"      IT_MESSAGE STRUCTURE  SOLISTI1
    Data Declaration
      DATA: gd_cnt TYPE i,
          gd_sent_all(1) TYPE c,
          gd_error TYPE sy-subrc,
          tab_lines LIKE sy-tabix.
    Structure Declaration
      DATA : BEGIN OF it_file OCCURS 0,
              row(255),
             END OF it_file.
      DATA : BEGIN OF i_split OCCURS 0,
      row(50),
      END OF i_split.
    Internal Table Declaration
      data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
      DATA : objbin LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE. "sOLIX
      DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
      data : wa_receiver like table of SOMLRECI1 with header line.
      data : it_receiver like table of SOMLRECI1 with header line.
      data : v_bin_data like SOLISTI1 occurs 0 with header line.
      DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
    *data bin_data1 like table of solix with header line.
      REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
      CLEAR   : objbin, it_packing_list, wa_receiver, it_receivers.
      DATA V_SUBJECT(255) VALUE 'HI'.
      gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SENDFILE'.
      gd_doc_data-obj_descr = v_subject.
      gd_doc_data-sensitivty = 'O'.
      APPEND GD_DOC_DATA.
    Appending The Internal Table it_packing_list
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'RAW'.
      it_packing_list-body_num = tab_lines.
      APPEND it_packing_list.
    *CALL FUNCTION 'GUI_UPLOAD'
    *EXPORTING
    *filename = V_FILE_PATH
    *filetype = 'BIN'
    *TABLES
    *data_tab = BIN_DATA.
      move bin_data to v_bin_data.
      append v_bin_data.
    *move soli to bin_data.
      LOOP AT V_BIN_DATA into objbin.
    MOVE v_bin_data TO objbin-line.
        APPEND objbin.
      ENDLOOP.
      CLEAR it_packing_list.
      DESCRIBE TABLE objbin LINES tab_lines.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'PDF'.
      it_packing_list-body_num = tab_lines.
      it_packing_list-doc_size = tab_lines * 255.
      APPEND it_packing_list.
    data file(255) value '/tmp/bali.txt'.
    *Appending The Internal Table it_receivers
    close dataset '/tmp/bali.txt'.
    open dataset '/tmp/bali.txt' for output in text mode encoding default.
    if sy-subrc = 0.
    loop at objbin.
    transfer objbin to '/tmp/bali.txt'.
    endloop.
    else.
    write 'hi'.
    close dataset '/tmp/bali.txt'.
    endif.
      it_receiver-receiver = '[email protected]'.
      it_receiver-rec_type = 'U'.
      it_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
      append it_receiver.
    *Move wa_receiver[] to it_receivers[].
    Clear it_receivers.
    if i_OUT_PLACE_LEVEL NE 0.
    loop at it_receivers into wa_receiver.
       loop at it_receivers into wa_receiver.
    **Function Module To Post The Message To Externa Mail
         CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
             document_data              = gd_doc_data
             put_in_outbox              = 'X'
             commit_work                = 'X'
           TABLES
             packing_list               = it_packing_list
             CONTENTS_TXT               = objbin
             receivers                  = it_receivers
           EXCEPTIONS
             too_many_receivers         = 1
             document_not_sent          = 2
             document_type_not_exist    = 3
             operation_no_authorization = 4
             parameter_error            = 5
             x_error                    = 6
             enqueue_error              = 7
             OTHERS                     = 8.
         clear wa_receiver.
    ENDFUNCTION.

    You have to convert your long string to a table of shorter strings.
    There may be other ways, but one possibility is to use a loop to process you string.
    while (there is something left)
       put the next e.g. 1024 characters in a new row of your table
    endwhile
    If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
    Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right

  • How to get the complete path name when uploading a file from servlet

    Hi,
    I write a servlet to upload a file from html page
    <intput type=file name=fileupload>I am using
    import org.apache.commons.fileupload.to upload file. i want to get the all fields in the form and file name and content of the file also.
    It give the file name only
    String filename= fileItem.getName();
    o/p krish.jpgBut i want complete path naem like
    d:/krishna/images/funny/krish.jpgI serach the API org.apache.commons.fileupload.*
    But i did nt find the method to get it.
    plz help me , which api or method to use here..

    Krishna_Rao_chintu wrote:
    But i need path and have to do some calculations on it.No, you don't. If you have requirements which say you do then the requirements are wrong. You couldn't do anything useful with the path on the client system even if you could get it.
    is there any alternatives in java
    I need path and have to calculate MD5, Presumably you need to calculate MD5 on the contents of the file and not on the name of the file.
    and convert the file to binary format.... etc oprations on itSorry, "convert a file to binary format" is basically meaningless.
    but we can get the content of the file using
    byte [] get()/ getString() methods
    If i get content is there any performance degrades?
    ie if the content is lengthy is it take more time?Take more time than what? Degrading performance from what? It's certainly true that it would be quicker to not upload the file, but that's a pointless comparison. If you have some other process to compare with, let us know what it would be.

  • How to get the complete path of the file that is selected using FormFile

    i m working on struts..
    i hv used FormFile like
    <html:file property="xsdpath" value="Browse" />
    need to get the whole path that i will select using browse button
    for example d:\foldername\filename.java
    but FormFile Api has a method getFileName(); which returns the filename, for getting the absolute path wat has to be done.
    please reply bak soon
    thanks in advance

    here i use formfile <html:file> just to allow the
    user to select a xml file .
    so i need to get the whole path of the selectedfile
    to parse the xml file.No you dont.
    You would definitely benefit from further reading on
    file upload.
    <html:file> tag renders an HTML <input> element of
    type file.
    When a user uploads a file, this file is sent as a
    stream of data, which a program (jsp/servlet) on the
    server, reads and stores the data back in the form
    of a file on the server.
    Any server program that needs to parse the file,
    should do so on the file stored on the server.
    There's no point in knowing the absolute path of the
    file on the client machine. If a server program can
    parse a file on the client machine, why upload the
    file in first case ? Get the drift ?
    i also want to show my user the path he hadselected.
    If you have such a requirement, then yes.
    But it sounds weird to me. If you see my response
    above, you will realize that the server has a copy of
    the client's file uploaded and then parsed. What if
    the client has changed his file after upload ?
    cheers,
    ram.I also have a requirement to get the whole filepath of the file selected and place this information into a table. From FormFile I can only retreive the absolute filename
    Any suggestions would be helpful.
    Thanks, dam

  • How to get the server URL?

    I am running WLS server on my machine to host a web app in ADF. How can I get the server name in my manged bean. I dont want to hardcode. The URL is something like this
    http://<my-machine-name>:<port>/epmos/faces/myapp/MyPage.jspx
    How can I retrieve the part
    http://<my-machine-name>:<port>

    In JSFUtils there is a getPageURL method. it will give the whole URL of your page. you can play with the URL string to get the part you need.
       * Method to create a redirect URL. The assumption is that the JSF servlet mapping is
       * "faces", which is the default
       * @param view the JSP or JSPX page to redirect to
       * @return a URL to redirect to
      public static String getPageURL(String view)
        FacesContext facesContext = getFacesContext();
        ExternalContext externalContext = facesContext.getExternalContext();
        String url =
          ((HttpServletRequest) externalContext.getRequest()).getRequestURL().toString();
        StringBuffer newUrlBuffer = new StringBuffer();
        newUrlBuffer.append(url.substring(0, url.lastIndexOf("faces/")));
        newUrlBuffer.append("faces");
        String targetPageUrl = view.startsWith("/")? view: "/" + view;
        newUrlBuffer.append(targetPageUrl);
        return newUrlBuffer.toString();
      }

  • How to get the base url

    Hi,
    when configure the BPM, we set the base url (http://host:port/), which will be used in the default notification sent by bpm.
    now we want to include that url in our notification step. is there a way to get that url?
    Best regards,
    John

    Hi John,
    Would you please share the solution you found for this problem, maybe the EJB source codes or something like that? It would really help the ones like me who have the same problem and looking for a solution.
    Thanks in advance...
    Best regards,
    Utku.

  • CodeActivity, how to Get the OrganizationService URL?

    Hello,
    I'm developing a CodeActivity and I need to know which environment I'm using. To acomplish this task I need to know what is the Server URL that the IOrganizationService is using. Do you know how to do this in a CodeActivity?, is the URL in some place inside
    the CodeActivityContext?, this is my code:
    protected override void Execute(CodeActivityContext executionContext)
    try
    IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
    IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();//String orgURL = ...
    Just Programming

    function () {
    ///<summary>/// Returns the URL for the SOAP endpoint using the context information available in the form/// or HTML Web resource.///</summary>var OrgServicePath = "/XRMServices/2011/Organization.svc/web";
    var serverUrl = "";
    if (typeof GetGlobalContext == "function") {
    var context = GetGlobalContext();
    serverUrl = context.getServerUrl();
    else {
    if (typeof Xrm.Page.context == "object") {
    serverUrl = Xrm.Page.context.getServerUrl();
    else
    { thrownew Error("Unable to access the server URL"); }
    if (serverUrl.match(/\/$/)) {
    serverUrl = serverUrl.substring(0, serverUrl.length - 1);
    return serverUrl + OrgServicePath;
    Theres a SDK function that grabs the URL ...not sure if it can be called in that context but figured i'd throw it out there just in case.

Maybe you are looking for

  • Automatic deletion of Line item at GR level

    Hi All, I have a requirement, The client will hire security service from the vendor, they will create service PO with 12line item and each line item cost will distribute to 5 cost center. they want a report which shows the pending quantity month wise

  • Error message 0xc000021a - every day after a boot of notebook W8

    Hi, I have the following issue. I have a Windows 8 notebook from MSI. Since the last couple of days, I'm facing an issue when I try to boot the notenbook. It returns with a 0c000021A error. When I open SrtTrail.txt, I see the following message: Test

  • TIME_OUT in VK13 / VK33 on IDES system

    We are receiving the following timeout when running VK13 and VK33 on our IDES system. This is standard code, and there is no notes regarding this TIME_OUT. The  Termination occurred in the ABAP program "SAPLV12A" - i "ACCESS_REPORT_GENERATE". The mai

  • How do I get bookmarks toolbar to reappear?

    the toolbar has vanished and is needed so it can be used. I've seen this question asked, but have not seen any helpful answer.

  • Is there a way to disable user groups?

    Just curious if there is a way to disable user groups in Essbase rather than the indevidual users?Thanks!