Outputting an ASP page using cfdocument

I have an ASP page (which values are being passed to in the
URL) that I want to make printable for the user.
Cold Fusion shows the below example which makes web page
printable.
<cfhttp url="
http://www.yahoo.com/"
resolveurl="yes"></cfhttp>
<cfdocument
format="flashpaper"><cfoutput>#cfhttp.filecontent#</cfoutput>
However if I replace "
http://www.yahoo.com/" with
"mypage.asp?reqid=123" I get an error.
What would be the correct way to do this?
Thanks!
Carl

Yes, the server-side technology is irrelevent to the MIDlet, as long as it supports HTTP 1.1.

Similar Messages

  • Multi page recordset output from ASP page on Spry Tabbed Panel Widget

    I am using a simple Spry Tabbed panel set on my asp page to show the output from different ASP pages, inside the tabbed panels. The tabbed panels on the page under consideration (destination page) display the output from different asp pages (source pages). The source asp pages generate multi page outputs which are paginated on the source page itself and pagination links are displayed on the source page itself.
    However, we dont want to display the source page outside of the tabbed panel, but instead the output content from the source asp pages should show inside the tabbeed panels only. The first page generated by the source asp page displays correctly inside the tabbed panel. However, when the user clicks on the links for the next page generated by the source asp page, but which is being displayed inside the destination page tabbed panel, they dont display the next page inside the tabbed panel. Instead the source asp page displays the output outside the tabbed panel destination  page.
    Please advise on how to ensure that the user can page through the recordset generated by the source asp page by clicking on the pagination links at the bottom of the records, while ensuring that the output displays within the tabbed panels on the destination asp page.
    I am enclosing the source code being used to generate the spry tabbed panel widget and also updating it with the output from the source asp page. In this case, the code given below is from the main page containing the widget and the source asp page is "sample.asp", which generates multi page output.
    Please note that I am not too keen on using xml data sets output from the source asp page, but would be more comfortable with directly using the asp pages to fill the tabbed panel content.
    Please help
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <script language="javascript" src="/SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="/SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="/SpryAssets/SpryData.js" type="text/javascript"></script>
    <link href="/SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="TabbedPanels1" class="TabbedPanels">
      <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0" onclick="Spry.Utils.updateContent('two','sample.asp?page=' <%=i%>); Spry.Data.initRegions();" >Tab 1</li>
           <li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
      </ul>
      <div class="TabbedPanelsContentGroup">
        <div id=two class="TabbedPanelsContent">Content 1</div>
        <div class="TabbedPanelsContent">Content 2</div>
      </div>
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
    </body>

    I fully agree that the problem does not lie with tthe tabbed panels.
    The solution would probably be first required to be tried using ajax on any div tab.
    Then the same code would have to be used on Sprytabbed panel. Hence, the following may be advised:
    1. Sample code for server side pagination and displaying inside any div tag and refreshing it using ajax. the update link would also lie inside the div tag which would show the next/ previous page without reloading the page.
    2. Then adapting the refresh technique using ajax in the Spry Tabbed panel using the inbuilt updatecontent method of the Spry Tabbed panels.
    In order to achieve the above, I am getting the recordset output in the tab content as expected. The recordset is also getting the pagination links from server side asp as required.
    However, it is also generating the following error.
    Webpage error details
    Message: Unterminated string constant
    Line: 9
    Char: 56
    Code: 0
    URI: http://localhost/test/test5.asp
    The sourcecode is as given below. If you can help with the error indicated above, my problem would probably get solved.
    <html><head>
    <title>Untitled Document</title>
    <link href="/SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
    <script src="/SpryAssets/SpryURLUtils.js" type="text/javascript"></script>
    <script src="/SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="/SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="/SpryAssets/xPath.js" type="text/javascript"></script>
    </head>
    <body>
    <div id="TabbedPanels1" class="TabbedPanels">
      <ul class="TabbedPanelsTabGroup">
        <li class="TabbedPanelsTab" tabindex="0" onclick="Spry.Utils.updateContent('one','untitled-5.asp');">Tab 1</li>
        <li class="TabbedPanelsTab" tabindex="0" >Tab 2</li>
      </ul>
      <div class="TabbedPanelsContentGroup">
        <div id=one class="TabbedPanelsContent">Content 1</div>
        <div id ="two" class="TabbedPanelsContent">Content 2</div>
      </div>
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
    </body>
    </html>

  • Can we call an ASP page using J2Me

    hi, I want to know whether there is a way of calling an ASP page which is for sending mass emails through my J2ME application using HTTP connection

    Yes, the server-side technology is irrelevent to the MIDlet, as long as it supports HTTP 1.1.

  • Error in ASP page using storedprocedure which contain cursor

    Hi All,
    I am updating connection string perviously used MSDAOR.1 provider, Now updating ORAOLEDB.ORACLE provider. The ASP page executing storedprocedure which using cursor. Error message is "OraOLEDB error '80040e14'
    ORA-06550: PLS-00201: identifier 'CURINVCUR' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored "
    remaining PL/SQL query are working fine.
    if any boby facing simillar kind of issue. please post your answer.
    Thanks in advance,
    Ranjith kumar S

    Hi All,
    I am updating connection string perviously used MSDAOR.1 provider, Now updating ORAOLEDB.ORACLE provider. The ASP page executing storedprocedure which using cursor. Error message is "OraOLEDB error '80040e14'
    ORA-06550: PLS-00201: identifier 'CURINVCUR' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored "
    remaining PL/SQL query are working fine.
    if any boby facing simillar kind of issue. please post your answer.
    Thanks in advance,
    Ranjith kumar S

  • Output a web page using the slice tool

    I have an attached psd file. I want to create a web site. This is what I want to do, I want to click on "Home", and I want a web site to appear on the body or "slice 8", but whenever I click on "Home" the whole page is replaced by the link and the menu is gone. I guess, I'm doing something wrong. I hope you folks get my idea.
    I really appreciate it, if you can look into my file and show me the way.
    Thank you,

    Is it possible to create frames on photoshop or I will do it manually using hard coding. I want to do something like this using the slices and the save for the web option. however, it always ends up in tables. so does photoshop support this or no.
    <FRAMESET ROWS="15%,*">
       <FRAME SRC="tfetitle.html" NAME=TITLE SCROLLING=NO MARGINHEIGHT=1>
       <FRAMESET COLS="20%,*">
          <FRAME SRC="tfesidebar.html" NAME=SIDEBAR>
          <FRAME SRC="tfemain.html" NAME=MAIN>
       </FRAMESET>
    <NOFRAMES>NOFRAMES stuff
    </NOFRAMES>
    </FRAMESET>

  • Using Two asp Page into Master-Page

    Hi All,
    I Have Master-Page and I want tow assign two Different Asp Page into the "div" tag in master Page , however
    I have different "div" tag in my master-Page , and I focus Assign in one "Div"  the Home-page by suing "ContentplaceHolder",
    and i Assign to another "div" different asp page using "Contentplaceholder" , but when i assign the second asp page to the "div" it give me
    nothing on that "div",  while the "div" which i assign the Home-page it works fine.
    I just think that the Master-page already know the Home-page by setting  it as "Home-Page" while the other page is do nothing.
    So could you please help to assign different asp page to different "div" in master Page.
    thanks all .

    Hi,
    According to your description, my understanding is that you want to insert two asp pages to mater page in SharePoint 2010.
    You can use <!– #include file=”[filename].aspx” –> to include the pages in the master page.
    More information are provided in the link below:
    http://triaslama.wordpress.com/2008/11/19/how-to-include-file-in-aspnet-pages/
    I recommend to use User Controls to include the asp pages in master page.
    http://blog-sharepoint.blogspot.com/2011/10/sharepoint-2010-add-user-control-to.html
    http://pankaj-sharepoint2010part12.blogspot.com/2011/10/add-custom-user-control-to-sharepoint.html
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • ASP pages

    Hi,
    I'd like to know how I can work with Oracle in classical ASP pages considering security problems like SQL injection. If possible I'd like code example.
    Thank you,
    Teo

    Sure, you can.
    The easiest way to avoid SQL injection attacks is simply to avoid building SQL statements. At a minimum, all SQL statements should be defined when you build the page other than bind variables which you supply at runtime. Ideally, you'd go even further and wrap up all your interaction with the database in stored procedures (again, passing in appropriate bind variables) so that the account that your ASP pages use to connect to the database doesn't have the permission to modify any table data.
    Justin

  • Error Editing an ASP Page

    When I try to edit an ASP page using a webDAV connection I
    get an error in creating lock on that page with a message to try
    again later. If I change the extension to .htm it downloads and
    allows me to edit the file. The user does have script editing
    privilidges in IIS and contribute administration. Any ideas?

    There was another thread about a mystery crash and someone
    posted the link to this known bug:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=kb402776&sliceId=2
    That fixed my problem!!

  • Migrating Content from a Custom ASP Page to a SharePoint Page Layout. Includes object tags to flash CSS images

    Hi Guys,
    I'm currently getting issues when trying to migrate content from ASP Pages used in a custom intranet developed by a client to SharePoint Pages.
    My current strategy to do so is as per below:
    a. Create ASPX Pages in Page Library with SharePoint Designer
    b. Copy all common resource files needed by the pages within the Pages library. Includes folders for Javascript, CSS, images etc. This way relative address of resources in pages will pick up pages library as default folder
    for resources.
    c. Copy Source Code of Page from Browser by right-clicking ‘View Page Source’/ Copy code from .asp file
    d. Clean the code to remove unnecessary codes from SharePoint Pages.
    At this point page renders without SharePoint Branding.
    However if I apply SharePoint Master Page onto the ASPX page by using Style > Attach > Default Master Page, this generates an Error when the page renders.
    What is missing in this approach or what would be the best approach to migrate the page to SharePoint without code solution?
    Grateful if you could help.
    Thanks 
    Rhyan.

    Hi Rhyan,
    As I understand, you want to create a custom application page in SharePoint 2013.
    If you copy the code in the asp page to aspx page, it cannot work. You should write the new code that can work in the asp file for the SharePoint aspx page.
    There is a similar case:
    https://social.technet.microsoft.com/forums/sharepoint/en-US/0a97820a-59b9-4430-a98c-d2941803c38e/classic-asp-pages-to-sharepoint-pages-migration
    You can create a web application page in the visual studio. You also can explicitly change which master page is used by the application page by setting the MasterPageFile attribute of the application Page element. (For example: MasterPageFile="~/_layouts/applicationv4.master").
    The articles below are about creating application Pages for SharePoint.
    https://msdn.microsoft.com/en-us/library/ee231581.aspx
    http://nikpatel.net/2012/01/20/custom-sharepoint-pages-site-pages-vs-application-pages/
    Best regards,
    Sara Fan
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • ADOBE AIR USING ASP PAGES??

    Hi all,
    does anyone know if I can use adobe air with ASP pages? I
    want to create a app using my websit at
    MovieRepliCars. It run
    using asp pages. Please email me at
    [email protected]
    thanks

    You
    can write an AIR app that
    accesses those ASP pages. AIR/Flash/Flex come with several
    classes for accessing web services. If your site isn't already
    factored out to provide generic web services, it's a good thing to
    do anyway. Then your ASP pages and your AIR app both get their data
    from the same source. This also lets you choose to open up the API
    you've created to outside users, potentially increasing the
    popularity of your site.

  • Calling the ASP page through a BSP application

    Hi,
    We are in the process of implementing Digital signature for SRM cFolders.
    BSP application : CFX_RFC_UI
    Pages with flow logic : doc_de_download
    The digitally signed files are uploaded to the cFolders.On click of a
    particular file in cFolders, the 'ASP' page residing on the server in IIS
    vertual directory i.e. 'verifyfile.asp' should get called.This ASP page has
    the logic to verify the signed file.
    The signed file resides on the file system in the same vertual directory.
    As a result we want to post a message on the screen which
    will be the output of the ASP page logic.
    Please suggest the way to achieve this.
    Regards,
    Nilesh
    Message : ---
    <b>Verification Successful</b>
      Certificate Details
    The certificate is valid
    CRL Status: Certificate Revocation Status is Unknown: CRL Not checked
    Email Id: [email protected]
    Issuer Name: ock Demo Certification Authority
    Serial Number: 15 65 7a 0a  00 00 0d d9
    Subject Name: Email Address = [email protected] | Country = US
    | StateOrProvince = VA | Locality = McLean | Organization = Technologies Corporation | Organizational Unit = ock Demo | Common Name = Valid ock |
    ThumbPrint: 16 00 c1 f4 76 aa 57 f2 20 27 0f 21 44 9e 08 9d 61 ca dd 95
    Valid From: Monday, April 10 2006,02:19:58
    <i><b>The code in OnInitialization event handler is as follows :----</b></i>
    * doc_de_download.htm
    DATA lp_root_exception   TYPE REF TO cx_root.
    DATA lp_doc              TYPE REF TO cl_cfx_document.
    DATA l_cur_ver_id        TYPE guid_32.
    DATA lp_col_app          TYPE REF TO cl_cfx_col_application.
    DATA lp_col              TYPE REF TO cl_cfx_collaboration.
    DATA : icontent type table of  sdokcntbin.
    data :  w_tmpcontent TYPE sdokcntbin.
    **** Data declaration
    data : g_folder_path TYPE btcxpgpar value 'usrsapDigitally signed files',
          g_md(100)      TYPE c,
          g_file_path    TYPE string,
          g_system       TYPE rfcdisplay-rfchost,
          g_os           TYPE sxpgcolist-opsystem,
          g_file_size    TYPE string,
          g_mime_type    TYPE string,
          g_file_ext     TYPE string,
          g_len1         TYPE i,
          g_var          TYPE c,
          g_out_file     TYPE c LENGTH 600,
          g_file_count   TYPE p,
          g_table_lines  TYPE p,
          g_counter      TYPE p VALUE 1,
          g_flag         TYPE c.
    DATA : i_doc_id TYPE sysuuid_c.
    CONSTANTS : c_dot TYPE c VALUE '.'.
    TRY.
        IF NOT p_refresh IS INITIAL.
          cl_cfx_ui_application=>delete_instance( ).
        ENDIF.
        TRANSLATE p_col_id TO UPPER CASE. "Just in case...
        TRANSLATE p_area_id TO UPPER CASE. "Just in case...
        TRANSLATE p_topic_id TO UPPER CASE. "Just in case...
        TRANSLATE p_doc_id TO UPPER CASE. "Just in case...
        TRANSLATE p_ver_id TO UPPER CASE. "Just in case...
        TRANSLATE p_save TO UPPER CASE. "Just in case...
    *   initialize in case of server state timeout
        IF ( NOT p_col_id IS INITIAL ) AND
           ( NOT p_area_id IS INITIAL ) AND
           ( NOT p_topic_id IS INITIAL ).
          CALL METHOD cl_cfx_context_ui=>initialize
            EXPORTING
              i_col_id      = p_col_id
              i_area_id     = p_area_id
              i_topic_id    = p_topic_id
              i_doc_id      = p_doc_id
              i_object_type = cfxf1_sc_doc_type_document.
        ENDIF.
        IF NOT p_col_id IS INITIAL.
          lp_col_app = cl_cfx_col_application=>get_instance( ).
          lp_col = lp_col_app->get_collaboration( p_col_id ).
        ENDIF.
    *   Do we need to prepare to checkout this document?
        cl_cfx_doc_ui=>get_docref_safe(
          EXPORTING
            i_guid        = p_doc_id
          IMPORTING
            ep_docref     = lp_doc ).
        IF ( NOT p_filepath IS INITIAL ) AND ( p_do_lock = 'X' ).
          l_cur_ver_id = lp_doc->if_cfx_versioning~get_current_version( ).
          IF l_cur_ver_id = p_ver_id.
    *       OK, prepare checkout
            TRY.
                lp_doc->if_cfx_document~lock( ).
              CATCH cx_root.
            ENDTRY.
          ENDIF.
        ENDIF.
    data: lt_formfields type TIHTTPNVP,
          l_formfield   type IHTTPNVP,
          l_request     type STRING.
    data: lt_headerfields type TIHTTPNVP,
          l_headerfield   type IHTTPNVP.
    CALL METHOD request->get_form_fields
      CHANGING
        fields = lt_formfields.
    CALL METHOD request->get_header_fields
      CHANGING
        fields = lt_headerfields.
    *    CALL METHOD cl_cfx_doc_ui=>retrieve_content
    *      EXPORTING
    *        ip_navigation = navigation
    *        ip_response   = response
    *        ip_runtime    = runtime
    *        i_col_id      = p_col_id
    *        i_area_id     = p_area_id
    *        i_topic_id    = p_topic_id
    *        i_doc_id      = p_doc_id
    *        i_ver_id      = p_ver_id
    *        i_save        = p_save.
    *   Do we need to checkout this document?
        cl_cfx_doc_ui=>get_docref_safe(
          EXPORTING
            i_guid        = p_doc_id
          IMPORTING
            ep_docref     = lp_doc ).
        IF ( NOT p_filepath IS INITIAL ) AND ( p_do_lock = 'X' ).
    *      l_cur_ver_id = lp_doc->if_cfx_versioning~get_current_version( ).
          IF l_cur_ver_id = p_ver_id.
    *       OK, do checkout
            TRY.
                CALL METHOD cl_cfx_doc_ui=>mark_doc_as_checked_out
                  EXPORTING
                    ip_doc     = lp_doc
                    i_filepath = p_filepath.
              CATCH cx_root.
            ENDTRY.
          ENDIF.
        ENDIF.
    i_doc_id = p_ver_id.
    CALL FUNCTION 'CFX_API_DOC_DOCUMENT_READ'
    Exporting
        i_doc_version_id = i_doc_id
      IMPORTING
        e_file_path      = g_file_path
        e_file_size      = g_file_size
        e_mime_type      = g_mime_type
        e_file_ext       = g_file_ext
      TABLES
        et_content       = icontent.
    ******  Download document
    IF NOT icontent[] IS INITIAL.
    ***  PERFORM sub_download_file USING g_file_path.
      CONCATENATE g_folder_path g_file_path
      INTO g_out_file.
      OPEN DATASET g_out_file FOR OUTPUT IN BINARY MODE.
      IF sy-subrc = 0.
        LOOP AT icontent INTO w_tmpcontent.
          TRANSFER w_tmpcontent TO g_out_file.
        ENDLOOP.
      ENDIF.
      CLOSE DATASET g_out_file.
      CLEAR g_out_file.
    ENDIF.
        CLEAR: p_area_id, p_col_id, p_doc_id, p_save,
               p_topic_id, p_ver_id, p_filepath.
    ** handle other standard exceptions
      CATCH cx_root INTO lp_root_exception.
        CALL METHOD cl_cfx_exception_ui=>handle
          EXPORTING
            ip_exception  = lp_root_exception
            ip_navigation = navigation.
    ENDTRY.

    Hi,
    Something like this should work:
    REPORT  zggar_http_client.
    PARAMETERS: p_host  TYPE char100 DEFAULT 'http://www.google.fr',
                p_port  TYPE char20.
    DATA: wcl_client TYPE REF TO if_http_client.
    DATA: w_content    TYPE string,
          w_host       TYPE string,
          w_port       TYPE string,
          w_proxy_host TYPE string,
          w_proxy_port TYPE string,
          w_path       TYPE string.
    w_host = p_host.
    w_port = p_port.
    CALL METHOD cl_http_client=>create
      EXPORTING
        host          = w_host
        service       = w_port
        proxy_host    = w_proxy_host
        proxy_service = w_proxy_port
      IMPORTING
        client        = wcl_client.
    wcl_client->request->set_header_field( name  = '~request_uri'
                                       value = w_path ).        "#EC *
    wcl_client->request->set_header_field( name  = '~request_method'
                                       value = 'GET' ).         "#EC *
    * send and receive
    wcl_client->send( ).
    wcl_client->receive( ).
    * display content
    w_content = wcl_client->response->get_cdata( ).
    Best regards,
    Guillaume

  • How to loop and add multiple records from db in .pdf using cfdocument

    I have a query that pulls a users information (Id, FirstName,
    LastName, Title,etc). I then use cfdocument to output a person's
    biography into a pdf. This is great, because we no longer have to
    manually create bios, as they are now all dynamically generated.
    The problem I have now is that we want to be able to select
    multiple users and create a .pdf with each of their bios included
    in the one pdf.
    How do I loop thru records from a sql database in a
    cfdocument that includes a header and footer in cfdocument items,
    and ensure that one persons bio doesn't continue on the page with
    anothers.
    Here's the code I have so far for the cfdocument:

    Put the query around just the body of your cfdocument not
    around the whole cfdocument tag. Also, move any query information
    out of the header and put that in the body of the document. Lastly,
    put a cfdocumentitem pagebreak after each bio...you will need to
    check the recordcount of the query against the row you are on so
    that you don't add an empty page break at the end.

  • Accessing a tab of a specific web page using cfhttp

    Hello, CFers!
    I need to access a remote page using the cfhttp. To be more specific, I need to access this page: https://sistemas.dnpm.gov.br/SCM/Extra/site/admin/dadosProcesso.aspx?numero=861738&ano=2013 (Sorry, Brazilian government sites works better only in the I.E.)
    This is a site of the Brazillian government that supervises mining areas all over the country. Each mining area has its own "numero" (number) and the "ano" (year) when it was registered at the National Department of Mineral Production - DNPM agency. As you can see (if you clicked the link to the DNPM website) there's a tab "Poligonal" at the top of it. Clicking on it will start a function created probably by the ASP.NET and it will generate a PNG image showing the area and some other processes near it. Example of the link above:
    So here is the problem: Can I get the data from the "poligonal" tab using the CFHTTP, knowing the poligonal page doesn't have a direct link? I tried all I could to find a way to get this image, checked I the sourcecode, but I couldn't find any way to solve my problem. That's why I came here to see if somebody can help me with this.
    Sorry for my bad English. I hope you guys undertand me.
    Being sure of your pacience and attention, since now I thank you.

    Aegis Kleais, I have tried contacting the developer, but I got no answer from him so far.
    I tried something and now I can access the content that the tab shows me (with a little help of a library of Ben Nadal):
    <!--- 
    Função escrita pelo Ben Nadel
    Detalhe de funcionamento em http://www.bennadel.com/blog/779-Parsing-HTML-Tag-Data-Into-A-ColdFusion-Structure.htm
    --->
    <cffunction name="ParseHTMLTag" access="public" returntype="struct" output="false" hint="Parses the given HTML tag into a ColdFusion struct.">
    <cfargument name="HTML" type="string" required="true" hint="The raw HTML for the tag."/>
        <cfset var LOCAL = StructNew() />
    <cfset LOCAL.Tag = StructNew() />
    <cfset LOCAL.Tag.HTML = ARGUMENTS.HTML />
    <cfset LOCAL.Tag.Name = "" />
    <cfset LOCAL.Tag.Attributes = StructNew() />
    <cfset LOCAL.NamePattern = CreateObject("java","java.util.regex.Pattern").Compile("^<(\w+)")/>
    <cfset LOCAL.NameMatcher = LOCAL.NamePattern.Matcher(ARGUMENTS.HTML) />
        <cfif LOCAL.NameMatcher.Find()>
    <cfset LOCAL.Tag.Name = UCase(LOCAL.NameMatcher.Group( 1 )) />
    </cfif>
    <cfset LOCAL.AttributePattern = CreateObject("java","java.util.regex.Pattern").Compile("\s+(\w+)(?:\s*=\s*(""[^""]*""|[^\ s>]*))?")/>
    <cfset LOCAL.AttributeMatcher = LOCAL.AttributePattern.Matcher(ARGUMENTS.HTML) />
    <cfloop condition="LOCAL.AttributeMatcher.Find()">
    <cfset LOCAL.Name = LOCAL.AttributeMatcher.Group( 1 ) />
    <cfset LOCAL.Tag.Attributes[ LOCAL.Name ] = "" />
    <cfset LOCAL.Value = LOCAL.AttributeMatcher.Group( 2 ) />
    <cfif StructKeyExists( LOCAL, "Value" )>
    <cfset LOCAL.Value = LOCAL.Value.ReplaceAll("^""|""$","") />
    <cfset LOCAL.Tag.Attributes[ LOCAL.Name ] = LOCAL.Value />
    </cfif>
    </cfloop>
        <cfreturn LOCAL.Tag />
    </cffunction>
    <cfset urlDestino = "https://sistemas.dnpm.gov.br/SCM/Extra/site/admin/dadosProcesso.aspx?numero=861738&ano=201 3"/>
    <!--- Primeira chamada, com o objetivo de obter os cabeçalhos e os campos ocultos para dar continuidade à navegação aqui você poderá dinamizar o resultado de acordo com o que você precisar --->
    <cfhttp url="#urlDestino#" method="get" charset="utf-8" result="gResult" timeout="900"/>
    <!---//OBTER O CABEÇALHO DA PÁGINA //--->
    <!---capturo o cabeçalho da página  e delimito em uma lista apenas os que quero passar para as páginas seguintes --->
    <cfset requestHeaders = getHttpRequestData().headers/>
    <cfset rhList              = 'accept,accept-encoding,accept-language,cookie,cache-control,connection,pragma,user-agent '/>
    <!---//OBTER OS CAMPOS OCULTOS DA PÁGINA //--->
    <!--- expressão regular para localizar todos os inputs do html da página
       que pode ser aprimorada para localizar apenas os hiddens --->
    <cfset hiddenFields = reMatchNoCase("(?i)<input [^>]*[^>]*?>",gResult.fileContent)/>
    <!--- A partir da função do Ben, eu extraio o nome e os valores dos inputs
       que serão postados para a página seguinte, excluindo os valores que desviam do resultado esperado --->
    <cfset formFields     = []/>
    <cfloop index="input" from="1" to="#arrayLen(hiddenFields)#">
    <cfset inputResult = ParseHTMLTag(hiddenFields[input])/>
        <cfif  NOT findNoCase('btnConsultarProcesso',inputResult.ATTRIBUTES.name)
        AND NOT findNoCase('btnDadosBasicos',inputResult.ATTRIBUTES.name)>
    <cfset formFields[input]["name"]  = inputResult.ATTRIBUTES.name/>
            <cfset formFields[input]["value"] = inputResult.ATTRIBUTES.value/>
    </cfif>
    </cfloop>   
    <!---//NAVEGAR PARA PÁGINA POLIGONAL //--->
    <cfhttp url="#urlDestino#" method="post" charset="utf-8" result="fResult" timeout="900">
         <!--- injeta os form fields --->  
        <cfloop array="#formFields#" index="key">
            <cfhttpparam type="formfield" name="#key.name#" value="#key.value#"/>
        </cfloop>
        <!--- injeta o cabeçalho--->
        <cfloop collection="#requestHeaders#" index="key">
             <cfif listFind(rhList,key)>
             <cfhttpparam type="header" name="#key#" value="#requestHeaders[key]#"/>
            </cfif>
        </cfloop>
    </cfhttp>        
    <!---//VISUALIZA A PÁGINA POLIGONAL //--->
    <cfoutput>#fResult.fileContent#</cfoutput>
    That's it.
    And thanks for helping me!

  • Unable get complete filepath from jsp page using request.getParameter()

    Hey all,
    i am actually trying to get the selected file path value using request.getParameter into the servlet where i will read the (csv or txt) file but i dont get the full path but only the file name(test.txt) not the complete path(C:\\Temp\\test.txt) i selected in JSP page using browse file.
    Output :
    FILE NAME : TEST
    FILE PATH : test.txt
    Error : java.io.FileNotFoundException: test.txt (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileReader.<init>(FileReader.java:55)
    at com.test.TestServlet.processRequest(TestServlet.java:39)
    at com.test.TestServlet.doPost(TestServlet.java:75)
    JSP CODE:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>DEMO SERVLET</title>
    </script>
    </head>
    <body>
    <h2>Hello World!</h2>
    <form name="myform" action="TestServlet" method="POST"
    FILE NAME : <input type="text" name="filename" value="" size="25" /><br><br>
    FILE SELECT : <input type="file" name="myfile" value="" width="25" /><br><br>
    <input type="submit" value="Submit" name="submit" />
    </form>
    </body>
    </html>
    Servlet Code :
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException, FileNotFoundException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    try {
    String filename = request.getParameter("filename");
    out.println(filename);
    String filepath = request.getParameter("myfile");
    out.println(filepath);
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Servlet TestServlet</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Servlet TestServlet at " + request.getContextPath() + "</h1>");
    if (filepath != null) {
    File f = new File(filepath);
    BufferedReader br = new BufferedReader(new FileReader(f));
    String strLine;
    String[] tokens;
    while ((strLine = br.readLine()) != null) {
    tokens = strLine.split(",");
    for (int i = 0; i < tokens.length; i++) {
    out.println("<h1>Servlet TestServlet at " + tokens[i] + "</h1>");
    out.println("----------------");
    out.println("</body>");
    out.println("</html>");
    } finally {
    out.close();
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    Needed Output :
    FILE NAME : TEST
    FILE PATH : C:\\Temp\\test.txt
    Any suggestions Plz??

    As the [HTML specification|http://www.w3.org/TR/html401/interact/forms.html] states, you should be setting the enctype to multipart/form-data to be able to upload files to the server. In the server side, you need to process the multipart/form-data binary stream by parsing the HttpServletRequest#getInputStream(). It is a lot of work to get it to work flawlessly. There are 3rd party API's around which can do that for you, such as [Apache Commons FileUpload|http://commons.apache.org/fileupload] (carefully read the User Guide how to use it).
    You can also consider to use a Filter which makes use of the FileUpload API to preprocess the request so that you can continue writing the servlet code as usual. Here is an example: [http://balusc.blogspot.com/2007/11/multipartfilter.html].

  • You do not have permission to view this directory or page using the credentials that you supplied.You do not have permission to view this directory or page using the credentials that you supplied.

    Hi,
    I update recently my OS to Yosemite and decided to use Safari again as my web browser (I was using Chrome). Some of the sites I need to access for professional reasons are not available with safari. I receive the message: "403 - Forbidden: Access is denied.You do not have permission to view this directory or page using the credentials that you supplied.". I believe there is a pattern here, they are all sites publish with IIS with SSL and build with ASP.NET.
    I can access them with Chrome (on OS X) or with Internet Explorer (with my Windows VMs).
    I've already cleared all saved passwords, cookies, history, etc...the problem remains. I'm sure this is a known problem, but all the answers I've found on the internet were for things like DNS and unavailability of the site. The sites are working fine and I can access them with Chrome.
    Can anybody help me? An explanation would also be nice :-) Something to do with Microsoft Authentication methods ?
    Thanks,

    Some websites require a special client certficate for access. If you don't have that certficate, you'll have to contact the site operator to find out how to get one.
    Sometimes the problem is caused by a web server that is configured to request an optional client certificate. Safari treats the request as mandatory. In that case, other browsers such as Firefox and Chrome may be able to connect to the site, because they ignore the request.
    The first time you were prompted for a certificate, you may have clicked through a dialog that requested access to the Apple certificate in your keychain that is used to secure the iMessage service. In that case, you may be able to regain access to the site in Safari by doing as follows.
    Back up all data.
    Double-click anywhere in the line below on this page to select it:
    com.apple.idms.appleid.prd
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Paste into the search field in the Keychain Access window by clicking in it and pressing the key combination command-V. An item may appear in the list of keychain items. The Name will begin with string you searched for, and the Kind will be "certificate."
    Delete the item by selecting it and pressing the delete key. It will be recreated automatically the next time you launch the Messages or FaceTime application.
    The next time you visit a site that prompts for an optional client certificate, cancel out of the prompt. You may have to do this several times before the server stops asking.
    Credit for this idea to Christian Braukmueller of SAP.

Maybe you are looking for

  • Bitmap images have grayscale settings

    I'm creating pdfs using Acrobat Standard 6.0 from Word documents. The documents contain images in color, grayscale and bitmap mode. For some reason the bitmap images in the final pdfs are not appearing as bitmaps but appear with the settings for the

  • BPM condition: Compare Payload with Constant

    Hi everybody, if I like to compare the payload with a constant, do I have to User a) MYCONSTANT b) 'MYCONSTANT'. Thanks, Ragards Mario

  • Server does not respond my Activacion! Server is Broken!

    Hi every one, i cant activate my iphone 5 and server does not respond my Activacion

  • Calling API in PLSQL

    Hi all, I need to call existing API from pl/sql. And i also need to know how can i create my own API. My backend is oracle. If u have any idea pls reply to [email protected] Thanks in advance. Sujatha

  • How many fields can be added in va01

    Hello All, I'm trying to add new fields in the additional data B tab of the header but I noted that I can't add as much fields as I want even if in the dynpro 83909/SAPMV45A still have space. Is there any limitiation of number of fields to be added?