XSRF-protection in BSP application with AJAX support

Dear all,
I try to call an BSP via AJAX with activated xsrf-protection. Then I receive a 500 internal server errror. I think it's because the missing security token. My code is:
$.post("set_next_status.htm", { rid: window.xxx.currId, SESSION_TOKEN: oSAPSecu.GetSessionToken() }, function() {
              window.xxx.updateTable();
            }).fail(function() {
              alert("Der Status konnte nicht gändert werden.")
How should I insert the XSRF-Token? oSAPSecu.GetSessionToken() returns null.
Thanks!

if the activate is grayed out (in SICF) check whether deactivate is enabled, if yes that means your serivce is already active.
<i>HTTP 407 Proxy Authentication Required</i>
Since you are seeing this above message, i assume that to access internet , you go via proxy - right?
in the case of bsp application the system thinks you are trying to connect to internet,
you have to set the exception to not to look for proxy authentication when accessing some urls.
this can be maintained from your browser.
tools->internet options->connections->lan settings->Advanced
in the text box "Do not use proxy server for addresses begin with"
enter your WAS host details.
it will be something like
*.<domain>.com;
Regards
Raja

Similar Messages

  • Calling a BSP application with MVC and send one start value

    Hi,
    I developed a BSP application with BSP. The application has a start page with one input field. The user gives a number and click the send button. The controller creates the modeler and gives the userinput as start parameter for the data search. After the data are read/found, the controller calls a view to show the data.
    This is very easy and does work.
    I have to call this simply application from another one: the caller application sends the start value.
    I don't know, if is better to send the start value in the URL or not. I tried it, but the controller cannot read it.
    How can I call the controller with a start value?
    Thank you!
    Bye
    Patrizia

    Hi ,
    what you need to do is
    1) for the "Send" button attach a java script.
    <htmlb:button id="myButton" text="Submit ...." onClick="sendRequestWrapper()"/>
    this javascript should take the inputfrom the field,
    then in the javascript create the URL.
    function sendReqeustWrapper(){
    sendRequest(InputField);
    function sendRequest(InputField)
    var URL;
    URL  = window.location.protocol + "//" ;
    URL += window.location.host ;
    <b>Note: its only Example link,</b>
    URL += "/sap/bc/bsp/sap/<BSPApplication>/controller.do";
    URL +="?InputFieldName=";
    URL +=InputFieldValue;
    <b>then use</b>
    Your URL will look like:
    http://ld0507.wdf.sap.corp:50007/sap/bc/bsp/sap/<bsp appl>/controller.do?InputFieldName=XXXXX
    window.open(URL,"_self","");
    so once this URL is triggered  you need to goto the respective controller and handle the input. You can see the reply from Mr. Akshaya Rao .
    regards,
    Vijaya Kumar M.
    Message was edited by: Vijaya Kumar

  • Run BSP application with IE9

    Hi,
    I want to display my BSP application in different IE9 windows each one with a different log account.
    Who can I do it?
    Regards

    Hello,
    As far as I know, only IE8 and IE9 share the same session if you open 2 different windows.
    And both versions of the browser have the "new session" functionality.
    So if you are using IE7, opening a new window should open the BSP in a new session already.
    However, you can try with URL parameter sap-sessioncmd=open as you mentionned, maybe this would work.
    Hope it helps,
    Tanguy

  • How to deploy cairngorm application with FTP support?

    Hi,
    I have a cairngorm application, it works fine in my local
    computer.
    But I need to upload it to a website in my web hosting
    company with FTP,
    but it doesn't work in the hosting server because I can not
    add the cairngorm.swc file to the application.
    Please give me a idea how to deploy the application with ftp
    software.
    Thanks a lot
    Mark

    Any opinions are welcome

  • MX Kollection 4 with Ajax support

    Hello,
    We've started the next major beta in InterAKT - the MX
    Kollection 4 beta.
    With a heavy accent on Ajax, our main focus for MX Kollection
    4 is to
    provide the perfect Dreamweaver extension for building web
    applications.
    Here is a preview of new features and improvements (you can
    also check
    out a very alpha version of Kollection 4 here):
    http://www.interaktonline.com/demos/MXKollection4/
    * Ajax-enabled NeXTensio Lists and Forms
    * NeXTensio List inline record editing "a la Access" on
    double-clicking a row.
    * NeXTensio List navigation, sort and filter-as-you-type
    without
    page refresh
    * Ajax-enabled Master/Detail support, Form Validation/Form
    Controls
    * Multiple image upload with watermark and upload progress
    bar
    * Download Counter, Captcha and Restricted Word List for
    secure forms
    * Send e-mail with attachments
    * Major performance boost in page loading and execution
    speed
    * Compatibility with MX Ajax Toolbox
    * and many others..
    Fill in the survey and apply for the beta now!
    http://iakt.rdsnet.ro/interakt/survey/survey/index.php?survey=23&from=mxk4_9_06_06
    Alexandru
    Alexandru COSTIN
    Division Manager
    http://www.interaktonline.com/
    +4021 312 5312

    Alexandru
    What language are you targeting with this example.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "Alexandru Costin" <[email protected]> wrote
    in message
    news:e6jrf3$fu$[email protected]..
    > Hello,
    >
    > We've started the next major beta in InterAKT - the MX
    Kollection 4 beta.
    >
    > With a heavy accent on Ajax, our main focus for MX
    Kollection 4 is to
    > provide the perfect Dreamweaver extension for building
    web applications.
    > Here is a preview of new features and improvements (you
    can also check out
    > a very alpha version of Kollection 4 here):
    >
    >
    http://www.interaktonline.com/demos/MXKollection4/
    >
    > * Ajax-enabled NeXTensio Lists and Forms
    > * NeXTensio List inline record editing "a la Access" on
    > double-clicking a row.
    > * NeXTensio List navigation, sort and filter-as-you-type
    without page
    > refresh
    > * Ajax-enabled Master/Detail support, Form
    Validation/Form Controls
    > * Multiple image upload with watermark and upload
    progress bar
    > * Download Counter, Captcha and Restricted Word List for
    secure forms
    > * Send e-mail with attachments
    > * Major performance boost in page loading and execution
    speed
    > * Compatibility with MX Ajax Toolbox
    > * and many others..
    >
    > Fill in the survey and apply for the beta now!
    >
    >
    http://iakt.rdsnet.ro/interakt/survey/survey/index.php?survey=23&from=mxk4_9_06_06
    >
    > Alexandru
    >
    > --
    > Alexandru COSTIN
    > Division Manager
    >
    http://www.interaktonline.com/
    > +4021 312 5312

  • BSP application with Javasript preview functionality

    Hi guys,
    I created a BSP business card application where the user can enter his data (name, address, phone...)within a form (<phtmlb:formLayoutInputField ..>).
    I added a preview button and after pressing the button a JPG of the business card appears and the values from the form
    are displayed on this JPG picture. This is realised with a javascript function.
    I have the problem that javascript works on the client side. This means when the user clicks on the preview button the abap variables from my form are not filled with  the user input.
    At the moment I added another button 'Adopt text'. In this case a ok-code is raised on the abap side and the variables are filled (the entered text from the form is adopted). If the user now clicks the preview button everything works fine and the text is displayed on the JPG, but this approach is very uncomfortable. Has anybody an idea how I could implement such a preview functionality without clicking the 'adopt text' button?
    Best regards
    Dennis

    Hi
    There is another method.
        You Can use java script code for showinng a pop window on the Preview button click event.
    JS Code For Pop Up Window.
    <script >
    function popitup(url)
         newwindow=window.open(url,'name','height=700,width=700,resizable=yes');
         if (window.focus) {newwindow.focus()}
         return false;
    </script>
    and on the layout page, use your preview button like this
               <htmlb:button id            = "VIEW_R"
                             text          = "View"
                             design        = "standard"
                             onClick       = "clkViewR"
                             onClientClick = "return popitup('Budget_Display1.htm?<b>BD=<%= data %></b>')"/>
    With the URL field of this button you can send values.
    BD is the attribute to be used on the popup page and data is the value to be set in the parent window.
    thanks and regards.
    Mithlesh

  • BSP application with large no. of concurrent end users

    We have implemented a custom version of BSP HAP_DOCUMENT for performance appraisals.The BSP is implemented as an iview using Enterprise Portal 6.0.15.0.0. On R/3 side we are on 6.20 support pack 50.
    We do not have Web Dispatcher or any other load balancing tool,everyone is therefore getting routed through one WAS and getting clogged.
    Has anyone implemented Web Dispatcher?
    Does anyone have recommendations or experience to share for load balancing?
    Thanks
    Mani

    Hi,
    You can use any HTTP load balanicng software, the only important thing is that the load balancer may not touch the Host header field.
    You can find more information on this topic in SAP note:
    #616900 -> Topic: using proxies.
    Regards,
    Dezso

  • Binding variables of application class in bsp application.

    Hi,
    I know it is possible to bind the variables of model class like "//MODEL/VARIABLE" but is it possible to bind the variables of applicaiton class?
    Thanks and regards,
    Santosh.

    You have to remember that BSP evolved over several releases.  In 6.10 BSP released with no support for MVC - just the Application class. The application class was simply the way to share values between views and store them between requests in stateful applications.  It doesn't support any data binding.  In 6.20 BSP began to support MVC with the introduction of controller classes and model classes.  You data bind UI elements directly to model attributes only.  There is no concept of context.
    WD is completely different in that you only data bind UI element to the a context. The MVC structure is much cleaner because the view layout never has visibility to the model (regardless of what you consider the model). 
    Over time the assistance class has become the defacto standard for models in WDA, because unlike WDJ there is no direct model object.  It originally was intended mostly as a way of having text elements for WDA components.  However it is still perfectly acceptible to use service calls (proxy objects, function modules, class methods) as your model. I personally prefer to always wrap calls to my service object up in an assistance class for clear design.

  • The work item linked to bsp application can not be executed in CRM webUI

    Hi all,
        1. i have configured workflow in SAP GUI. And i have linked one activity to bsp application(link to the task with bo WEBSERVICE and method PROCESSDIALOG).
        2. When i start the workflow and click the workitem in workflow inbox, then the bsp page will pop up.
        3. In CRM webUI, you can find all the workitems under CRM webUI worklist as the same as SAP GUI. And when i execute the workitem in webUI. a error appears as 'Dynamic navigation for object WEBSERVICE and action F not supported'.
    In a word i want to link my customized bsp application with wokitem in CRM webUI .
    any suggestion ? ths

    Frankly, I am not aware of CRMGUI but  in general, the way we assign is
    1. Initially we define a external service ( WF_EXTSRV).
    2. Then by using that definiton we'll create a task.
    3. The task created in the second step, we use in the workflow.
    4. Now when ever any user tries to execute the workitem then it directly opens the BSP application.
    Before doing all the above steps one should make sure that the service is ACTIVE in SICF txn, and what ever the parameters that are required to pass the BSP application must be defined in the WF_EXTSRV.
    IF you want the workitem to appear in the UWL you need to register the task in SWFVISU txn with the visualization parameters  APPLICATION. and the task as BSP standard application.

  • BSP Application Class Restart

    Hi,
    I have an BSP Application with one main controller (main.do) and two sub-controllers (control_1.do and control_2.do).
    If I enter directly in the bsp application it works, but if I'm inside of this application and if I want start a new session with the same BSP application (using an href javascript link). The state of the actual bsp application is restarted to the new application.
    ex:
    1) APP A (I entered)
    2) Inside o APP A I click in href to call again the APP A  (I Will get an APP B) but with a new session/instance (using the window.open with the sap-sessioncmd=open)
    3) The APP A (is stopped)
    4) The APP B (is started but I loosed the previous BSP application).
    The question is, It is possible get new sessions (using window.open)from the same BSP application?How? Every time a call a window.open(A) the caller bsp session is lost.
    Best Regards,
    Ricardo Soares

    You have to remember that BSP evolved over several releases.  In 6.10 BSP released with no support for MVC - just the Application class. The application class was simply the way to share values between views and store them between requests in stateful applications.  It doesn't support any data binding.  In 6.20 BSP began to support MVC with the introduction of controller classes and model classes.  You data bind UI elements directly to model attributes only.  There is no concept of context.
    WD is completely different in that you only data bind UI element to the a context. The MVC structure is much cleaner because the view layout never has visibility to the model (regardless of what you consider the model). 
    Over time the assistance class has become the defacto standard for models in WDA, because unlike WDJ there is no direct model object.  It originally was intended mostly as a way of having text elements for WDA components.  However it is still perfectly acceptible to use service calls (proxy objects, function modules, class methods) as your model. I personally prefer to always wrap calls to my service object up in an assistance class for clear design.

  • Download of a webform within a BSP application

    Hi SDN members,
    I wrote a ESS BSP application with a 3 step wizard. Within the first step the user can enter some data in some form fields.
    In the second step a webform (SMARTFORM) with the form data is displayed and in the third step the user can save the document.
    Is there any possibility to save the web form as a document when the user saves the document. It would be sufficient to save the webform to the application server and get back a link.
    Later on the webform should be linked as a kind of attachment. This means when the user calls again the saved document a link should be available where the form can be called.
    The webform is called in the following way within my BSP:
    Call the generated function module
      call function l_function_module_name
           exporting
                    archive_index        =
                    archive_parameters   =
                      control_parameters   = ls_control_parameters
                    mail_appl_obj        =
                    mail_recipient       =
                    mail_sender          =
                      output_options       = ls_output_options
                      user_settings        = space
                      customer             = lt_customer
                      bookings             = lt_bookings
                      connections          = lt_connections
           importing
                    document_output_info =
                      job_output_info      = ls_output_data
                    job_output_options   =
           exceptions formatting_error     = 1
                      internal_error       = 2
                      send_error           = 3
                      user_canceled        = 4
                      others               = 5.
      if sy-subrc <> 0.
      error handling
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      ls_xmloutput = ls_output_data-xmloutput.
      lt_html_raw  = ls_xmloutput-trfresult-content[].
    Fill HTTP request
      response->set_header_field( name = 'content-type'
                                   value = 'text/html; charset=UTF-8').
    SAP Smart Forms returns XML data island in raw data format.
    method 'set_data' of the response object needs the output
    in XSTRING. The next loop convertes the raw table into xstring.
      loop at lt_html_raw into l_xstring.
         concatenate l_html_xstring l_xstring into l_html_xstring
                                                   in byte mode.
      endloop.
      l_xlength = xstrlen( l_html_xstring ).
      response->set_data( data   = l_html_xstring
                          length = l_xlength ).
    Any ideas how to save the form in any way?
    Best regards
    Thomas

    Hi,
    thanks for your answer!
    Let me explain more in detail what I want to do.
    I am calling my BSP application from our SRM system. When the user saves the data which were entered in my BSP application, the data are transferred via OCI (Open Catalog Interface). This is already working.
    The only thing which is missing is the transfer of my webform to the SRM via OCI.
    OCI is waiting for a link to my form. Only then, the SRM can attach a document. See OCI description
    http://www.sdn.sap.com/irj/sdn?rid=/webcontent/uuid/ff03d072-0501-0010-aa88-8018506a2ebe">oci [original link is broken] [original link is broken]
    Therefore I have to download the form to get a link which can be written to the OCI interface. This could also be a temporary link.

  • BSP Application Error : Access Denied

    Hi Gurus,
    I have developed a BSP application with an input field and a search help. I am using Java script to popup the search help window and "opener.document.<form>.<field>.value=value;" to pass selected value from search help window to main page. At BSP application level I have checked "Allows Portal Integration" check box. Now, when I try to select the value from search help at runtime, I am getting an error "Access Denied". It works perfectly fine when the check box "Allows Portal Integration" is unchecked. How do I resolve this issue keeping the check box checked.
    Thanks in advance
    John
    <* Input Field *>
    <htmlb:inputField id            = "sales_order"
                       value         = "<%= controller->sale_order %>"
                       maxlength     = "30"
                       showHelp      = "TRUE"
                       onValueHelp   = "showSalesOrderHelp()"
                       submitOnEnter = "X"
                       size          = "30" />
    <* Java script routine to popup search help window *>
    function showSalesOrderHelp()
       newDialog =    window.open("salesOrderHelp.htm","_blank","resizable=no,height=500,width=475");

    The problem is that your popup windows probably do not have their domain relaxed. (Usually popp windows are implemented in an iframe, which must also be relaxed in the same way as the main page.)

  • How can I execute a query from a BSP application?

    How can I execute a query from a BSP application?
    I´m trying to execute a Query from intranet. I´ve been looking for examples, but the templates I´ve found doesn´t help me.
    does anybody has an example?
    Thanks.

    Hi
    Have you designed the BSP application ?
    design it first with one page
    page will have layout and Event handlers
    Design the layout with the fields
    in the event handler there are events
    in the event On Initiailization or ON inputprocessing write the select query similar to what we write in routine ABAp and fetch the data into ITAB and that has to be passed to the Layout
    see the doc
    BSP
    To learn how to create Web applications with Business Server Pages, you can work through the simple tutorials that build on each other. You should be able to run through all of the steps described here in your own system.
    If you want to develop Web applications with BSPs, your system must meet the following requirements: Prerequisites for Creating Web Applications.
    The following tutorials are available:
    · First Tutorial: First Steps with Business Server Pages…
    · Second tutorial: A Small BSP Application and A Small BSP Application with HTMLB
    · Third tutorial: Our First Online Bookshop
    · Fourth tutorial: Further Developing the Bookshop
    · A small Tutorial is also available for your first steps with the Model View Controller design pattern.
    · For a more complex MVC tutorial based on the third tutorial, see: Our Little Online Bookshop Using MVC and HTMLB
    When creating BSP applications, note the browser dependencies described in Note 598860.
    steps:
    1) start the transaction RZ10.
    2) now u u have to select Profile name, so select the INSTANCE Profile from the list of options given with the Profile parameter list.U may find multiple instance profile in the list, so select the profile in which ur server name is given.
    3) u will also find three options in the same window.
    Administrator data, Basic Maintenance, and Extended Maintenance. So select the last one from that.
    4) Now click on change button.
    5) here u will find parameter icm/host_name_full, so now set it as FQDN.
    6) Now copy ur settings with new version number.
    7) Activate that version.
    8) And now please restart ur WAS.
    So this will set ur FQDN, and also don't forget to login using Admin User.
    Now u also check for following service are active in your ICF setting or not,( just start transaction code SICF)
    /default_host/sap/bc/bsp/sap
    /default_host/sap/bc/bsp/sap/system
    /default_host/sap/bc/bsp/sap/public/bc
    /def ault_host/sap/public/bc
    /default_host/sap/public/bc/ur
    /default_host/sap/public/bsp/sap/public
    /default_host/sap/public/bsp/sap/public/bc
    /defaul t_host/sap/public/bsp/sap/system
    /default_host/sap/public/bsp/sap/htmlb
    if not then activate all.
    check this link
    Read this weblog...
    /people/brian.mckellar/blog/2003/09/25/bsp-in-depth-fully-qualified-domain-names
    http://www.thespot4sap.com/articles/SAP_WAS_Creating_BSP_Apps.asp
    it consists of screen shots also
    Check it.
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/bb153aab4a0c0ee10000000a114084/frameset.htm
    Regards
    Anji

  • Problem in calling BSP application through portal

    Hi All,
    We have EP 2004s and we have integrated a CRM (BSP) application with it .
    CRM application is a custom application which contains two frames . The upper frame of this application is developed using BSP and the lower frame is ICWC .
    We are calling this application (BSP) in portal using a BSP iView . When calling this application using iView it gives an error as some values needs to be initialized , though all the values have been initialized in controller.
    When we are calling the same application using a browser instead of an iView it works perfectly fine .
    Can anybody explain me how does portal treats the BSP application.
    Thanks & Regards,
    Amit Kade

    The BSP is just a URL as far as the portal is concerned. Just make sure the same URL is being generated as if you called the BSP directly.
    Cheers

  • Internal table content not retained in statefull BSP application.

    Hi Forum,
    I have a statefull BSP application with two pages.I fill an internal table ITAB in the OnInputProcessing eventhandler of first page and then transfer this ITAB to second page , but when i navigate back from second page to first page , the internal table ITAB is cleared.I need the data in ITAB when i come back to first page.
    The internal tables that i fill in the OnCreate eventhandler of the first page are intact but this  ITAB that  i fill in OnInputProcessing is cleared.
    I tried using
    runtime->keep_context = 1.
    but it is not helping either...and i have checked the code carefully to ensure that ITAB is not cleared anywhere using CLEAR ITAB.
    ITAB is declared in PAGE ATTRIBUTES using a tabletype.
    What might be the problem?
    Thanks,
    Anubhav.

    Hi Heth,
    I carried out a small test application as follwos:
    1)Filled an internal table ITAB_ZSCMG in OnCreate event of first page.
    2)Filled an internal table ITAB_MATERIALS in OnInputProcessing for the OnClick of button event.
    When my application was stateless the internal table ITAB_ZSCMG was initial in the OnInputProcessing event .
    When i switched to STATEFULL mode , it contained data in the OnInputProcessing .
    3)Crearted one more page SECOND.HTM.
    4)in the OnClick event for button in OnInputProcessing eventhandler i navigated back to FIRST.HTM .
    Found that all the internal tables were initial , although my page was statefull.
    All these ITABs were declared using Page Attributes.
    So i guess , a statefull application just means that DATA is retained between different eventhandlers of the SAME PAGE and not if we navigate from that page....
    Hence in my case i have to transfer the ITAB back to first page again using SERVER SIDE COOKIES..
    Please correct me if my derivations are wrong!!!
    But the question still remains....
    How to retain data after navigation?
    Do we have a solution in BSP or we need to use SET/GET or EXPORT/IMPORT or COOKIES?
    Thanks,
    Anubhav.
    Edited by: Anubhav Jain on Jun 19, 2008 9:04 AM

Maybe you are looking for

  • Using the Submit button to Email

    I was previously using Frontpage and I have just recently started using DW so a lot of this is still new to me. I did get the DW8 for dummies book which is helping a lot, although I know being a member on a forum like this will help much more. So any

  • Download assistant errors

    When trying to install the CS6 Master Collection trial with the Download Assistant, I get the error code 109. If I try to "reset product download" if I say "yes" I want it to attempt to continue from where it was interrupted (though it doesn't even g

  • Linked Server [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    Hi  I have SQL2012 installed on my local machine and have also installed MySQL 5.6.23 installed with a test database. I also have my SQL connector installed and MYSQL ODBC Driver 3.51.    Which happily connects to the Mysqldb. The Datasource Name : m

  • Workflow Server version conflict

    Hi All, I have installed Oracle Application Server 10.1.2 (OID, J2EE and BI). I want to install workflow schema on my database. Can you please suggest, what version of Oracle Workflow Server should I install? The reason why I am asking is, when we tr

  • How to invoke HandleFault in Handler ???

    Hi Does anyone know how to invoke handleFault(MessageContxt ctx) method in a Handler class ? The printlns for the other methods get printed out, so I know that the Handler class is being called and is correctly configured. I have tried thowing a JaxR