How to check if the requested server is the same server?

Hi,
I am building a request using URL connection. Before making a connection to the server I need to check if the URL requested server is same server. If it is same then I need to call locally Instead of making URL connection.
Please help me.
Thanks in advance.
Arthik
Edited by: TNKarthikBabu on Jun 29, 2009 3:07 PM

Check what methods the HttpServletRequest you provides.
Here is its API doc: [http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html].

Similar Messages

  • How to check whether the Application Server directory exits or not

    Hi,
    I have a selection screen in which I give the Application server file name(UNIX file) as input. Here, I would like to check whether the Server directory exists or not.
    Let us say, the path I gave in the selection screen is /usr/sap/tmp/testfile.txt . Here, the file name is testfile.txt and the server directory is /usr/sap/tmp . I would like to check whether this directory /usr/sap/tmp exists in the server or not. I am not bothered about the file name as I am going to write data into the file. I am mainly concerned about whether the directory exists in the server or not. and one more thing... this is the Application Server path not the Local path.
    Can anyone help me on the same how to check whether the server directory exists or not.
    Thanks in advance.
    Best Regards,
    Pradeep.

    Also you can use the FM EPS_GET_DIRECTORY_LISTING for this purpose.
      Store the directory name
        l_dpath = p_file+0(l_no).
      Validate the directory of the application server
        CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
          EXPORTING
            dir_name               = l_dpath
          TABLES
            dir_list               = l_i_dlist
          EXCEPTIONS
            invalid_eps_subdir     = 1
            sapgparam_failed       = 2
            build_directory_failed = 3
            no_authorization       = 4
            read_directory_failed  = 5
            too_many_read_errors   = 6
            empty_directory_list   = 7
            OTHERS                 = 8.
      If any problem occurs with the directory then display proper
      error message
        IF sy-subrc <> 0.
        Display error message
          MESSAGE e018 WITH 'Problem with directory entered'(008).
        ENDIF. " sy-subrc <> 0
    Regards,
    Joy.

  • How to check Whether the File is in Progress or used by some other resource

    Hi All,
    I am retrieving a file from the FTP server using Apache commons FTP.
    I need to check whether the file is fully retrieved or in progress.
    for now i can able to use the file which is partially retrieved. it is not throwing any file sharing exception or i am unable to find whether it is in progress.
    How to check whether the file is in progress ? or The file is accessed by some other resource ?
    Pls Help me.
    Thanks,
    J.Kathir

    Hi Vamsi,
    Explicitly such kind of requirement has not been catered and i dont think you would face a problem because any application that is writing to a file will open the file in the read only mode to any other simultaneous applications so i think your concerns although valid are already taken care off .
    In the remote case you still face a problem then as a work around. Tell the FTP administrator to set the property to maximum connections that can be made to ftp as one. I wonder if you have heard of the concept of FTP handle , basically the above workaround is based on that concept itself. This way only one application will be able to write.
    The file adapter will wait for its turn and then write the files.
    Regards
    joel
    Edited by: joel trinidade on Jun 26, 2009 11:06 AM

  • R12.1.1 staging complete! How to check whether the stage is Good

    Hi Gurusl,
    I have completed staging R12.1.1 for Hp unix B.11.31. I want to know how to check whether the stage is good for installation or whether it is corrupted. Is there any metalink note or script from where we can check it. Ur help will be highly appreciated. Thanks in advance
    regards,

    Hi,
    Please refer to (Note: 802195.1 - MD5 Checksums for R12.1.1 Rapid Install Media).
    Regards,
    Hussein

  • How to check if the retro period is from 01 or earlier in PCR

    Dear All,
    How to check in the PCR if the retro for the employee is starting from the previous year or from the period 01 of this year. The PCR in the system is as below:
    I wanted to execute some PCR only if the retro period is from 01 of current year or from the previous year. How do i check this condition in PCR.. Can you please send some sample code of PCR..
    Regards,
    Vidya..

    Hi Vidya,
    Please check us out to get answers to all your SAP knowledge needs. We are launching shortly.
    http://www.linkedin.com/e/gis/889747
    http://www.twitter.com/spinact
    Best,
    Monty

  • How to check for the sub folder in the document library Is already Exist using CSOM?

    Hi,
    My requirement is to create the  folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
    I able to check for the parent folder.
    But cant able to check the subfolder in the document library.
    How to check for  the sub folder in the document library?
    Here is the code for the folder
    IsFolder alredy Exist.
    private
    string IsFolderExist(string InputFolderName)
    string retStatus = false.ToString();
    try
    ClientContext context =
    new ClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
                context.Credentials =
    CredentialCache.DefaultCredentials;
    List list = context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
    FieldCollection fields = list.Fields;
    CamlQuery camlQueryForItem =
    new CamlQuery();
                camlQueryForItem.ViewXml =
    string.Format(@"<View  Scope='RecursiveAll'>
    <Query>
                                            <Where>
    <Eq>
    <FieldRef Name='FileDirRef'/>
    <Value Type='Text'>{0}</Value>
                                                </Eq>
    </Where>
    </Query>
                                </View>",
    @"/sites/test/hcl/"
    + InputFolderName);
                Microsoft.SharePoint.Client.ListItemCollection listItems = list.GetItems(camlQueryForItem);
                context.Load(listItems);
                context.ExecuteQuery();
    if (listItems.Count > 0)
                    retStatus =
    true.ToString();
    else
                    retStatus =
    false.ToString();
    catch (Exception ex)
                retStatus =
    "X02";
    return retStatus;
    thanks
    Sundhar 

    Hi Sundhar,
    According to your description, you might want to check the existence of sub folder in a folder of a library using Client Object Model.
    Please take the code demo below for a try, it will check whether there is sub folder in a given folder:
    public static void createSubFolder(string siteUrl, string libName, string folderServerRelativeUrl)
    ClientContext clientContext = new ClientContext(siteUrl);
    List list = clientContext.Web.Lists.GetByTitle(libName);
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =
    @"<View Scope='RecursiveAll'>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name='FSObjType' />
    <Value Type='Integer'>1</Value>
    </Eq>
    </Where>
    </Query>
    </View>";
    //camlQuery.FolderServerRelativeUrl = "/Lib1/folder1";
    camlQuery.FolderServerRelativeUrl = folderServerRelativeUrl;
    ListItemCollection items = list.GetItems(camlQuery);
    clientContext.Load(items);
    clientContext.ExecuteQuery();
    Console.WriteLine(items.Count);
    if (0 == items.Count)
    //create sub folder here
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to check/find the size of current ROLLBACK segment in oracle 10g

    How to check/find the size of current ROLLBACK segment in oracle 10g ? Kindly help

    A rollback segment name like "_SYSSMU231$" is used when you have Automatic Undo Management enabled.
    The only relevant parameters are :
    1. UNDO_MANAGEMENT=AUTO
    2. UNDO_RETENTION=n minutes ==> this is what everyone should be interested in
    3. The sizes of the Undo Tablespace datafiles and whether AUTOEXTEND is ON or OFF
    No one should be interested in the size of a single undo segment when Automatic Undo Management is enabled.
    Possible causes of ORA-01555 errors in Automatic Undo Management
    a. UNDO_RETENTION is too low
    b. Undo tablespace is too small
    Hemant K Chitale

  • How to check if the user has only the display authority of a message

    hi,
    How to check if the user has only the display authority of a message but does not have the change authority for a certain message?
    Best regards,

    hi blake
    though i am an application consultant and for authorisation u need to have help of BASIS person if u r not the one but still i can guide u regarding the same,
    Basically Authorization Management 
    Use
    You can use the following authorization objects to control the authorizations for maintaining business partner data:
    •        Authorization objects for the Business Partner:
    •     &#61601;        B_BUPA_GRP
    •     &#61601;        B_BUPA_ATT
    •     &#61601;        B_BUPA_FDG
    •     &#61601;        B_BUPA_RLT•       
    Authorization objects for relationships:
    •     &#61601;        B_BUPR_BZT
    •     &#61601;        B_BUPR_FDG
    In addition, you can assign an authorization group to a business partner in the dialog. The authorization group controls which users may maintain data for this business partner.
    You can also define authorizations for fields and field groups using the Business Data Toolset (BDT). Depending on the settings you have made, the system carries out the relevant authorization checks.
    In the dialog in the SAP GUI, you can display an overview of the authorizations assigned to you by pressing the button Settings.
    For more information on authorization management, see the Implementation Guide (IMG) of the Business Partner, as well as in the Developer’s Handbook for the BDT under  Authorizations.
    IntegrationAuthorization management for the Business Partner forms part of the  SAP authorization concept.
    Prerequisites
    You have made the necessary settings in Customizing of the Business Partner under Basic Settings--> -Address Management.
    Moving over
    AS ABAP Authorization Concept 
    The ABAP authorization concept protects transactions, programs, and services in SAP systems from unauthorized access. On the basis of the authorization concept, the administrator assigns authorizations to the users that determine which actions a user can execute in the SAP system, after he or she has logged on to the system and authenticated himself or herself.
    To access business objects or execute SAP transactions, a user requires corresponding authorizations, as business objects or transactions are protected by authorization objects. The authorizations represent instances of generic authorization objects and are defined depending on the activity and responsibilities of the employee. The authorizations are combined in an authorization profile that is associated with a role. The user administrators then assign the corresponding roles using the user master record, so that the user can use the appropriate transactions for his or her tasks.
    Authorization Checks 
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    The following actions are subject to authorization checks that are performed before the start of a program or table maintenance and which the SAP applications cannot avoid:
    •        Starting SAP transactions (authorization object S_TCODE)
    •        Starting reports (authorization object S_PROGRAM)
    •        Calling RFC function modules (authorization object S_RFC)
    •        Table maintenance with generic tools (S_TABU_DIS)
    Checking at Program Level with AUTHORITY-CHECK
    Applications use the ABAP statement AUTHORITY-CHECK, which is inserted in the source code of the program, to check whether users have the appropriate authorization and whether these authorizations are suitably defined; that is, whether the user administrator has assigned the values required for the fields by the programmer. In this way, you can also protect transactions that are called indirectly by other programs.
    AUTHORITY-CHECK searches profiles specified in the user master record to see whether the user has authorization for the authorization object specified in the AUTHORITY-CHECK. If one of the authorizations found matches the required values, the check is successful.
    Starting SAP Transactions
    When a user starts a transaction, the system performs the following checks:
    •        The system checks in table TSTC whether the transaction code is valid and whether the system administrator has locked the transaction.
    •        The system then checks whether the user has authorization to start the transaction.
    The SAP system performs the authorization checks every time a user starts a transaction from the menu or by entering a command. Indirectly called transactions are not included in this authorization check. For more complex transactions, which call other transactions, there are additional authorization checks.
    •     &#61601;        The authorization object S_TCODE (transaction start) contains the field TCD (transaction code). The user must have an authorization with a value for the selected transaction code.
    •     &#61601;        If an additional authorization is entered using transaction SE93 for the transaction to be started, the user also requires the suitable defined authorization object (TSTA, table TSTCA).
    If you create a transaction in transaction SE93, you can assign an additional authorization to this transaction. This is useful, if you want to be able to protect a transaction with a separate authorization. If this is not the case, you should consider using other methods to protect the transaction (such as AUTHORITY-CHECK at program level).
    •        The system checks whether the transaction code is assigned an authorization object. If so, a check is made that the user has authorization for this authorization object.
    The check is not performed in the following cases:
    You have deactivated the check of the authorization objects for the transaction (with transaction SU24) using check indicators, that is, you have removed an authorization object entered using transaction SE93. You cannot deactivate the check for objects from the SAP NetWeaver and HR areas.
    This can be useful, as a large number of authorization objects are often checked when transactions are executed, since the transaction calls other work areas in the background. In order for these checks to be executed successfully, the user in question must have the appropriate authorizations. This results in some users having more authorization than they strictly need. It also leads to an increased maintenance workload. You can therefore deactivate authorization checks of this type in a targeted manner using transaction SU24.
    •     &#61601;        You have globally deactivated authorization objects for all transactions with transaction SU24 or transaction SU25.
    •     &#61601;        So that the entries that you have made with transactions SU24 and SU25 become effective, you must set the profile parameter AUTH/NO_CHECK_IN_SOME_CASES to “Y” (using transaction RZ10).
    All of the above checks must be successful so that the user can start the transaction. Otherwise, the transaction is not called and the system displays an appropriate message.
    Starting Report Classes
    You can perform additional authorization checks by assigning reports to authorization classes (using report RSCSAUTH). You can, for example, assign all PA* reports to an authorization class for PA (such as PAxxx). If a user wants to start a PA report, he or she requires the appropriate authorization to execute reports in this class.
    We do not deliver any predefined report classes. You must decide yourself which reports you want to protect in this way. You can also enter the authorization classes for reports with the maintenance functions for report trees. This method provides a hierarchical approach for assigning authorizations for reports. You can, for example, assign an authorization class to a report node, meaning that all reports at this node automatically belong to this class. This means that you have a more transparent overview of the authorization classes to which the various reports are transported.
    You must consider the following:
    •     •         After you have assigned reports to authorization classes or have changed assignments, you may have to adjust objects in your authorization concept (such as roles (activity groups), profiles, or user master records).
    •     •         There are certain system reports that you cannot assign to any authorization class. These include:
    •     •         RSRZLLG0
    •     •         STARTMEN (as of SAP R/3 4.0)
    •     •         Reports that are called using SUBMIT in a customer exit at logon (such as SUSR0001, ZXUSRU01).
    •     •         Authorization assignments for reports are overwritten during an upgrade. After an upgrade, you must therefore restore your customer-specific report authorizations.
    Calling RFC Function Modules
    When RFC function modules are called by an RFC client program or another system, an authorization check is performed for the authorization object S_RFC in the called system. This check uses the name of the function group to which the function module belongs. You can deactivate this check with parameter auth/rfc_authority_check.
    Checking Assignment of Authorization Groups to Tables
    You can also assign authorization groups to tables to avoid users accessing tables using general access tools (such as transaction SE16). A user requires not only authorization to execute the tool, but must also have authorization to be permitted to access tables with the relevant group assignments. For this case, we deliver tables with predefined assignments to authorization groups. The assignments are defined in table TDDAT; the checked authorization object is S_TABU_DIS.
    You can assign a table to authorization group Z000. (Use transaction SM30 for table TDDAT) A user that wants to access this table must have authorization object S_TABU_DIS in his or her profile with the value Z000 in the field DICBERCLS (authorization group for ABAP Dictionary objects).
    please See also:
    •        SAP Notes 7642, 20534, 23342, 33154, and 67766
    guess this info will help you,there is one graphic which actually explain the hierarchy of authorisation,i will find some time out to let u know more info about the authorisation
    but if u sit with ur BASIS guy then u can learn lot of things in PFCG
    i guess u r a basis guy,then its not a problem
    best regards
    ashish

  • How to check was the object bound or not without exception handling?

    context.lookup("someName");throws NameNotFoundException in case object was not bound to someName.
    How to check was the object bound or not without exception handling?

    context.lookup("someName");throws NameNotFoundException in case object was not bound to someName.
    How to check was the object bound or not without exception handling?

  • How to check, when the Maintenance Order was deleted

    Hello Experts,
                          Can you please tell me of how to check for the maintenance order that when it was deleted and who has deleted that.
    If any T-Code is there or at the Table level also to check the requirement.
    Regards,
    Yawar Khan

    If you want to track when you have put deletion flag, you can track it using above mentioned techniques.
    If you archived (deleted) permanently, then using archival history only, you can check I guess.
    Check these links. While deleting maintenance order, we can hisorical order with same number. Using that creation date, you can track.
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/3e6552462a11d189000000e8323d3a/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/3e4d2f462a11d189000000e8323d3a/frameset.htm

  • How to check if the directory is created using create or replace directory

    Hello,
    I have create a directory as below:
    Create or Replace Directory TEST_DIR AS 'C:\ABCD'
    How to check if the directory is created or not? Is there any query for that?
    Thanks in advance.
    PK

    This command does create a directory object inside the database. It does not mean that a directory is created outside the database (e.g. the file system).
    You can check if this oracle directory exists with:
    untested
    select * from user_directories;To check if the directory in the OS exists and if the database has the appropriate permissions to read/write to this directory you need to connect as user "oracle" (default installation) and try to get to this folder.
    Edited by: Sven W. on Jun 16, 2010 4:20 PM - Typo corrections

  • How to check wheather the project is having 'AUC' or not.

    Hi friends,
    How to check wheather the project is having 'AUC' or not.
    Regards,
    Safiq.

    Hi Basha ,
    as per my knowledge , WBS will have AUC ,Settlement rules  etc, so u need to check asset tables based on the WBS element .
    regards
    Prabhu

  • How to Check when the user is connected to different desktop.

    How to Check when the user is connected to different desktop.Sometimes the user maynot see the theme in the personalize theme list. In that case the person must be using different kind of desktop.How to check, I need a path.And how to apply the theme to that user?
    Thanks,
    Paturi

    Hi,
    you can create the new portal desktop from
    System Administration => Portal display => Desktop and Display Themes
    Select your folder from Portal Content and from its context create new Desktop.
    Add The Framework page and the theme to this desktop page.
    Go to your folder from Portal Content and from the context of the framework page select add framework page to portal desktop.
    Adding Theme to desktop
    From Portal content select Theme folder and select the theme right click it and select Add theme to Portal Desktop.
    Create rule for the Desktop.
    Navigate to System Administration => Portal Display => Desktop and Display Themes Portal Content => Portal Administrators => Super Administrators =>main_rules.
    Click Add IF Expression.
    create the expression if user = xyz then click on apply
    Select the then clause of the if and navigate to your folder where Desktop is created ,Add it and Click Apply.
    Save the Changes to the rule.
    Hope it helps you.
    (reward points if its helpful)
    Thanks,
    Gunjan

  • Does anybody know how to check if the business partner has the authority

    Does anybody know how to check if the business partner has the authority to change business partner relationship?
    Best regards?
    Blake Le

    Hi,
    Do you mean that you would like to check if the user has the authorization to create a relationship, or change the validity of the relationship?
    As per SAP architecture, authorizations are assigned to users, not business partners.
    Business partners, could be assigned to users, who in turn have authorizations. This is typically seen for business partners, with the role, Employee.
    Hope this helps,
    Regards,
    Nelson.

  • How do you apply the same password policy to every PDF document you create with inDesign?

    All,
    Adobe peeps!,
    I don't know if this is really supported with inDesign 5.5, but here is my my use case:
    I constantly create more than 10 PDFs a day using inDesign
    On  all PDF's I create, i want to apply password security to protect them
    But in order to do so, within inDesign, I am   always forced to go to the "security dialogue" pane to set up the same permission  and passwords over and over again
    This gets tiring :/
    So what I am hoping to do is  the following:
    Like acrobat, I want to create a password policy within inDesign
    I want all PDFs created to have such a password policy  be automatically applied
    I know acrobat supports something like this (http://help.adobe.com/en_US/acrobat/pro/using/WS58a04a822e3e50102bd615109794195ff-7d68.w.h tml), but, unless I may have missed something, the Acrobat feature is limited. That is, the help link  does not tell me how to automatically do this with Acrobat either (the link does not explain to me how to "automatically apply the same password security policy to every PDF document I save within the application). I think the only way to do so is via "Adobe LiveCycle Rights Management ES", but for non server users, I am hoping there is another way.
    So my questions are:
    Is it possible to create password security policies in inDesign?
    Is it possible to apply the same password security policy to every PDF i create in inDesign?
    If not, can I change default settings within Acrobat ProX to automatically apply a password security policy everytime I save a PDF?
    If all fails, do you guys know of any extensions that can support this?
    Any help would be great. Thanks!

    Steve,
    Thanks for your notes. To follow up on your response.
    Bummer. I kinda had a hunch at this inDesign limitation.
    I have been aware of the method for setting up of a security policy within Acrobat. While this feature does cut down some of the work involved in creating and applying password policies to pdfs, what I am looking for with Acrobat is to apply the same password policy to every document I save from the app. Automatically. Without having to manualy select a policy.
    I think my solution will have to lie in me creating some sort of script to help support this need. I don't think Acrobat Pro X has the capabilities to allow me to tinker with, say, creating a save PDF preset that will allow me to automatically apply a password policy.
    PS. I am using acrobat pro x.

  • How can I use the same "I Tunes" on two different computers

    I’m using two different kinds of Personal Computer: One is Desktop PC And the other one is Notebook .
    In each computer there are the same songs and when I get the new ones to the Desktop I want them to be placed on the Notebook or reverse.
    Where does the I Tunes save the playlist on the hard drive ?
    I have prepared a playlist on my Notebook and want it to be seen on the Desktop but I dont want to fallow the steps File > Library > Export Playlist on the Notebook. Is there any other way to make this issue instead of the mentioned steps.
    How can I see the same Playlists and songs on two different computers ( notebook and desktop) including the updating processes.
    Operating systems of the computers:
    Desktop: XP Pro
    Notebook: Vista Bussiness

    I use SyncToy 2.0 to keep two instances of my library in sync. SyncToy's preview will show which files it is about to update giving you a chance to spot unexpected changes and during the run only the changed files will be copied saving lots of time.
    As long as I sync after making updates at one instance of the library before making any updates at the other then everything works just fine. I periodically run iTunes Folder Watch to check for any orphaned entries or new items that haven't been imported into the active library. If your machines are regularly networked together this process is fairly straightfoward. Mine are in disparate locations so I use one of the (physically) small WD My Passport host powered drives which I take between home & work, synchronising at either end. This gives me three complete copies of my library so I'm covering backup & synchronisation in the same operation.
    When connecting my iPod at either location iTunes recognises itself as the "home" library for the iPod so I'm able to use the sync with selected playlists option without getting warning messages about the iPod being synced with a different library.
    tt2

Maybe you are looking for

  • Mac and Windows shared external hard drive - possible?

    Our set up is a Windows XP pc and iMac 20" and I hoped that we could back up both computers using one external hard drive - that way if the Mac failed we could still use the pc to access the files and vice versa. But having looked into buying one I'm

  • Why does my hyperlink change to text in ES?

    I am trying to create a PDF form in LiveCycle ES. My goal is to have a company form that Employee A can fill out in Adobe Reader, save and post to our intranet site where Employee B can retrieve it. I want Employee A to be able to copy a Google map l

  • Problem with Javadoc gen'in two instances of a sourcefile in the class list

    Hallo, I have a set of source files that I'm gen'ing with the ant task javadoc. sourcefiles="javadocs/PTConfigServer-root/src/com/palantir/config/util/SshUtils.java, javadocs/PTConfigServer-root/src/com/palantir/config/util/StafUtils.java, javadocs/P

  • Special Stock E not supported for movement 313

    HI, I would like to use movement type 313 (Transfer posting SLoc to SLoc - remove from storage) with special strock E. System shows message: "Special Stock E not supported ..." for movement 313. Could you tell me if it is possible to change this move

  • Keyword database

    Due to a virus attack my hardisk has been replaced by a new one, and my Adobe Design Premium CS3 has been replaced by CS4. My Photpshop picture gallery was fortunately stored on an external harddrive. A big effort has been put down in giving keywords