How to get previous tag name from a xml in java

Hai
      I need to get the previous tag name from a xml in java.
     I got the current tagname , i need to get the previous tagname
    NodeList parentactionList = lParentRule.getElementsByTagName(
"parentactiondetails");
i use this way of getting the the current tag name, i need to get the previous tag name ie.. before "parentactiondetails"
for sample
</parentruledetails>
</Parentrule>
</SingleParentRule>
<parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/>
<ParentCompliance>
i have xml like this i am getting the "parentactiondetails " ...  now i need to get the previous tag name </SingleParentRule> in java
Can any one help me,

still i am not able to get the correct value...
i used the way wat u said it is not even going inside the if condition
below is my actual xml as before i asked i need the before tag name of <parentactiondetails>
ie  the closing tag of </Singleparentrule>
i have attached the xml also
pl reply me as soon as possible
<?xml version="1.0" encoding="UTF-8"?>
<GRC>
<ParentInventory>
<Vendor comment="" createdBy="root" vendorCode="1001" vendorName="Cisco">
<DeviceType createdBy="root" devTypeCode="1001" devTypeName="Router" vendorCode="1001">
<Series createdBy="root" devTypeCode="1002" seriesCode="1110" seriesName="2800" vendorCode="1001">
<Model createdBy="root" devTypeCode="1002" modelCode="1459" modelName="4506" seriesCode="1110" vendorCode="1001">
<Sub createdBy="root" devTypeCode="1002" modelCode="1459" seriesCode="1110" subCode="1695" subName="CAT4500-SUP4" vendorCode="1001">
<CodeVersion createdBy="root" devTypeCode="1002" modelCode="1459" seriesCode="1110" startCode="2207" startName="12.2(25)EWA2" subCode="1695" vendorCode="1001">
<ImageName createdBy="root" devTypeCode="1002" endCode="5508" endName="Standard" modelCode="1459" seriesCode="1110" startCode="2207" subCode="1695" vendorCode="1001"/>
</CodeVersion>
<CodeVersion createdBy="root" devTypeCode="1002" modelCode="1459" seriesCode="1110" startCode="2225" startName="12.2(5)T" subCode="1695" vendorCode="1001"/>
</Sub>
</Model>
</Series>
</DeviceType>
</Vendor>
</ParentInventory>
<Parentrule>
<parentruledetails COMMENTS="1PARENT_RULEFILT_AUDITPASS" CREATED_BY="root" DEVICE_LEVEL_FLAG="Configuration" PARENT_RULE_CODE="PR626" PARENT_RULE_TYPE="SPR_AP" RULE_NAME="1PARENT_RULEFILT_AUDITPASS">
<parentscope DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" PARENT_RULE_CODE="PR626" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
<parentmultiscope COLUMN_INDEX="0" DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" MULTI_SCOPE_CODE="{1=1001~1002~ 1010~ 1131~ 1190~ 2041~E~5255}" MULTI_SCOPE_NAME="{1=Cisco~Switch~3750~3750-24PS~3750~12.2(25)SEE2~E~Standard}" OPERATOR="E" PARENT_RULE_CODE="PR626" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
<SingleParentRule CHILD_TYPE="ALL" COLUMN_INDEX="0" FILT_CONDN="PA" PARENT_RULE_CODE="PR626" RULE_CODE="PR625[AND]," RULE_TYPE_FLAG="singleparentrule">
<Parentrule>
<parentruledetails COMMENTS="1CUSTRULE_PARENT_CROSSREF_FAIL" CREATED_BY="root" DEVICE_LEVEL_FLAG="Configuration" PARENT_RULE_CODE="PR625" PARENT_RULE_TYPE="PCR_CR" RULE_NAME="1CUSTRULE_PARENT_CROSSREF_FAIL">
<parentscope DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" PARENT_RULE_CODE="PR625" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
<parentmultiscope COLUMN_INDEX="0" DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" MULTI_SCOPE_CODE="{1=1001~1002~ 1010~ 1131~ 1190~ 2041~E~5255}" MULTI_SCOPE_NAME="{1=Cisco~Switch~3750~3750-24PS~3750~12.2(25)SEE2~E~Standard}" OPERATOR="E" PARENT_RULE_CODE="PR625" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
<ParentCommand>
<Command ChildType="Console" cmdCode="37135" cmdName="login authentication &lt;string&gt;"/>
</ParentCommand>
<parentcustomdetails CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="login authentication " COLUMN_INDEX="0" CONDN_OPER="exists" CONDN_VALUE="True" PARENT_RULE_CODE="PR625" RULE_TYPE_FLAG="Customrule"/>
<parentcustomdetails CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="string" COLUMN_INDEX="1" CONDN_OPER="equalsto" CONDN_VALUE="cisco" PARENT_RULE_CODE="PR625" RULE_TYPE_FLAG="Customrule"/>
<parentcustomconsole CHILD_TYPE="Console" CONSOLE_NUM="Any" PARENT_RULE_CODE="PR625"/>
<parentactiondetails ACTION_FLAG="CrossRef" PARENT_RULE_CODE="PR625"/>
<parentcrossrefdetails ACTION_FLAG="CrossRef" CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="login authentication " COLUMN_INDEX="0" CONDN_OPER="exists" CONDN_VALUE="True" PARENT_RULE_CODE="PR625"/>
<parentcrossrefdetails ACTION_FLAG="CrossRef" CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="string" COLUMN_INDEX="1" CONDN_OPER="equalsto" CONDN_VALUE="AAAAAA" PARENT_RULE_CODE="PR625"/>
<parentcrossrefconsole ACTION_FLAG="CrossRef" CHILD_TYPE="Console" CONSOLE_NUM="Any" PARENT_RULE_CODE="PR625"/>
<ParentCompliance>
<PRComp comments="Group Policy is an important and useful addition to your Active Directory deployment. Managing your internal network and ensuring compliance .Group Policies are a set of &quot;rules&quot; that are applied to different parts of a Windows-based network" compCode="1006" compName="INTERNAL GROUP POLICY" createdBy="root" url="http://www.INTERNAL GROUP POLICY.com"/>
<PRComp comments="This is the compliance for the department of Security agency" compCode="1012" compName="DISA" createdBy="root" url="http://iase.disa.mil/stigs/checklist/"/>
<PRComp comments="This is the compliance from the National Security Agency" compCode="1013" compName="NSA" createdBy="root" url="http://checklists.nist.gov/chklst_detail.cfm?confi"/>
<PRComp comments="he Center for Internet Security (CIS) is a not-for-profit organization that helps enterprises reduce the risk of business and e-commerce disruptions resulting from inadequate technical security controls, and provides enterprises with resources for measuring information security status and making rational security investment decisions" compCode="1020" compName="CIS" createdBy="root" url="http://www.cisecurity.org/"/>
<PRComp comments="This is a Cisco document. It outlines the key security elements identified for Network Security Baseline, along with implementation guidelines to assist in their design, integration, and deployment in production networks. " compCode="1022" compName="Cisco Secuirty Baseline" createdBy="root" url="http://www.cisco.com/en/US/docs/solutions/Enterpri"/>
<PRComp comments="This is the best practices from industry experts to help make audit recommendations in a customers environment. " compCode="1023" compName="360 GRC Best Practice" createdBy="root" url="http://www.360grc.com"/>
</ParentCompliance>
<parentriskrecommendationdetails ACTION_FLAG="CrossRef" AUDIT_RESULTS="Both_pass_fail_result" CHILD_TYPE="ALL" CMD_CODE="fdg" COMMAND_REF="dfs" DEFINITION="dfgd" DEVICE_RECOM_CATEGORY_CODE="IP - Addressing Services" DEVICE_RISK_CATEGORY_CODE="IP - Addressing Services" DISP_LEVEL="Parent and child result" PARENT_RULE_CODE="PR625" RATING1="2" RATING1_NAME="DISA" RATING2="2" RATING2_NAME="NSA" RATING3="2" RATING3_NAME="Cisco Secuirty Baseline" RATING4="2" RATING4_NAME="CIS" RATING5="2" RATING5_NAME="360 GRC Best Practice" RATING6="2" RATING6_NAME="INTERNAL GROUP POLICY" RATING_IMPACT="Low" RATING_PRIORITY="Low" RATING_URGENCY="Low" RECOMENDATION="ss" WEB_REF="sfs" WEIGHTING1="10" WEIGHTING1_NAME="DISA" WEIGHTING2="10" WEIGHTING2_NAME="NSA" WEIGHTING3="10" WEIGHTING3_NAME="Cisco Secuirty Baseline" WEIGHTING4="10" WEIGHTING4_NAME="CIS" WEIGHTING5="10" WEIGHTING5_NAME="360 GRC Best Practice" WEIGHTING6="10" WEIGHTING6_NAME="INTERNAL GROUP POLICY"/>
</parentruledetails>
</Parentrule>
</SingleParentRule>
<parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/>
<ParentCompliance>
<PRComp comments="Group Policy is an important and useful addition to your Active Directory deployment. Managing your internal network and ensuring compliance .Group Policies are a set of &quot;rules&quot; that are applied to different parts of a Windows-based network" compCode="1006" compName="INTERNAL GROUP POLICY" createdBy="root" url="http://www.INTERNAL GROUP POLICY.com"/>
<PRComp comments="This is the compliance for the department of Security agency" compCode="1012" compName="DISA" createdBy="root" url="http://iase.disa.mil/stigs/checklist/"/>
<PRComp comments="This is the compliance from the National Security Agency" compCode="1013" compName="NSA" createdBy="root" url="http://checklists.nist.gov/chklst_detail.cfm?confi"/>
<PRComp comments="he Center for Internet Security (CIS) is a not-for-profit organization that helps enterprises reduce the risk of business and e-commerce disruptions resulting from inadequate technical security controls, and provides enterprises with resources for measuring information security status and making rational security investment decisions" compCode="1020" compName="CIS" createdBy="root" url="http://www.cisecurity.org/"/>
<PRComp comments="This is a Cisco document. It outlines the key security elements identified for Network Security Baseline, along with implementation guidelines to assist in their design, integration, and deployment in production networks. " compCode="1022" compName="Cisco Secuirty Baseline" createdBy="root" url="http://www.cisco.com/en/US/docs/solutions/Enterpri"/>
<PRComp comments="This is the best practices from industry experts to help make audit recommendations in a customers environment. " compCode="1023" compName="360 GRC Best Practice" createdBy="root" url="http://www.360grc.com"/>
</ParentCompliance>
<parentriskrecommendationdetails ACTION_FLAG="RulePass" AUDIT_RESULTS="Both_pass_fail_result" CHILD_TYPE="ALL" CMD_CODE="dfg" COMMAND_REF="dfgdf" DEFINITION="dfgdf" DEVICE_RECOM_CATEGORY_CODE="IP - Addressing Services" DEVICE_RISK_CATEGORY_CODE="IP - Addressing Services" DISP_LEVEL="Parent and child result" PARENT_RULE_CODE="PR626" RATING1="3" RATING1_NAME="DISA" RATING2="3" RATING2_NAME="NSA" RATING3="3" RATING3_NAME="Cisco Secuirty Baseline" RATING4="3" RATING4_NAME="CIS" RATING5="3" RATING5_NAME="360 GRC Best Practice" RATING6="3" RATING6_NAME="INTERNAL GROUP POLICY" RATING_IMPACT="Low" RATING_PRIORITY="Low" RATING_URGENCY="Low" RECOMENDATION="dfgdf" WEB_REF="dfgdf" WEIGHTING1="10" WEIGHTING1_NAME="DISA" WEIGHTING2="10" WEIGHTING2_NAME="NSA" WEIGHTING3="10" WEIGHTING3_NAME="Cisco Secuirty Baseline" WEIGHTING4="10" WEIGHTING4_NAME="CIS" WEIGHTING5="10" WEIGHTING5_NAME="360 GRC Best Practice" WEIGHTING6="10" WEIGHTING6_NAME="INTERNAL GROUP POLICY"/>
</parentruledetails>
</Parentrule>
</GRC>

Similar Messages

  • How to get the tag name into javascript

    Hi,
    Is there any way to get the tag name into java script when user clicks on.
    For eg: if i use netui:anchor tag, how can I pass the tag id to the javascript when user clicks on the link using onClick attribute. This tag id needs to be evaluated at run time.
    Ex code is given below.
    function fun1(){
    // how to get the tag name;
    <%
    String st="hai";
    %>
    <netui:anchor action="x" onClick="fun1()" tagId="<%=st%>>
    I want to get this tagId (st) to the java script function fun1() when user clicks on this link. How can I do that. can you please help in this issue.
    Thanks,
    Satish.

    Hi,
    You can set the java variable as a js variable at run time:
    <script>
    var anchorName = <%=getNetuiTagName%>;
    function fun1()
    var anchorID = getNetuiTagName(anchorName);
    alert(anchorID);// this will show the rendered ID for the anchor specified
    </script>
    this works because the jsp variable will be rendered before the js.
    Thanks,
    Steve

  • How to get IDL file name from CORBA IOR string

    hi, is it possible to get IDL file name from the IOR string? how?
    regards

    Hi,
    I don't think so.
    And if it was possible, which interface should be returned if
    the referenced object implements more than one?
    Regards.
    Karl

  • How to get ther servlet name from the Httprequest / servletContext

    Hi,
    How can I get the servlet name from the Http Request / Servlet conext?
    Arthik

    I have a requirement to call the business logic either in local server / external server.
    Local / External server
    The original / main request is made to the server from the client and from the server if the main request requires some resource (second request from server side) available in the external server then I need to make a URL connection. If the requested resource is the local resource then I need to by-pass the HTTP call. So I need to verify the server name , port with the originally requested server.Then I need to check if the request servelt is available in local or not.
    Can you please help me.

  • How to get the file name from Oracle B2B 10g

    Hi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
    In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
    Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
    I tried using the b2b.filename property in the receive activity and it is not getting the file name.
    <sequence name="main">
        <receive name="Receive_Note" partnerLink="GetB2BNote"
                 portType="ns1:Dequeue_ptt" operation="Dequeue"
                 variable="Receive_Note_Dequeue_InputVariable"
                 createInstance="yes">
                 <bpelx:property name="b2b.fileName" variable="WriteFileName"/>
        </receive>
      </sequence>
    Can you help me to get the file name from Oracle b2b 10g ?
    Thanks,
    b2b user

    Hi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
    In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
    Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
    I tried using the b2b.filename property in the receive activity and it is not getting the file name.
    <sequence name="main">
        <receive name="Receive_Note" partnerLink="GetB2BNote"
                 portType="ns1:Dequeue_ptt" operation="Dequeue"
                 variable="Receive_Note_Dequeue_InputVariable"
                 createInstance="yes">
                 <bpelx:property name="b2b.fileName" variable="WriteFileName"/>
        </receive>
      </sequence>
    Can you help me to get the file name from Oracle b2b 10g ?
    Thanks,
    b2b user

  • How to get the Users Name from the SSL certificate?

    Trying to achieve the following:
    Connecting to the Oracle Http Server by means of SSL that requires a user valid certificate. Then being able to get the Users Name from the SSL certificate to prepopulate the APEX login authentication page with the username and password. Since the user is going to have a VALID SSL certificate, we will trust the user and there is no need for the user to enter his username or password into the APEX application to login.
    Does SSO do this or something else?

    Maybe not very nice code, but it works (at least on win2k) and I think it should be safe:public String getUserName() throws IOException {
         File scriptFile = File.createTempFile("script", ".js");
         FileWriter fw = new FileWriter(scriptFile);
         fw.write ("WScript.Echo(WScript.CreateObject('WScript.Network').UserName)");
         fw.flush();
         fw.close();
         BufferedReader br = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("CSCRIPT.EXE \"" + scriptFile + "\" //Nologo").getInputStream()));
         String uName = br.readLine();
         br.close();
         scriptFile.delete();
         if (scriptFile.exists()) scriptFile.deleteOnExit();
         return uName;
    }

  • How to get Universe Long Name from DataProvider from BO SDK Web XI R3

    In BO 6.5 I was able to query the repository using an Oracle query to get details about the classes, property(s) and property data value(s). I'm using the following query:
    SELECT DISTINCT u.uni_longname, c.cls_name, p.prp_name, p.property_id,
                    d.prp_datavalue
               FROM unv_universe@PRBA u,
                    unv_class@PRBA c,
                    unv_property@PRBA p,
                    unv_prop_data@PRBA d
              WHERE c.universe_id = u.universe_id
                AND c.universe_id = p.universe_id
                AND c.class_id = p.class_id
                AND p.universe_id = d.universe_id
                AND p.property_id = d.property_id
                AND d.prp_datatype = 'W'
           ORDER BY 1, 2
    where PRBA is our BO oracle repository. It would return the following, though I get multiple rows for this query, I am pasting one row only
    UNI_LONGNAME          CLS_NAME            PRP_NAME               PROPERTY_ID      PRP_DATAVALUE
    Accounting Universe   Account Details     Account Option     15                      ACCT.ACCT_ID  IN  @Prompt('ACCOUNT_OPTION','N', ['Account Details\Account ID'],multi,free)
    I'm wondering what is the equivalent methods/objects using BO Java SDK in Webi XI R3 to get the same information. I use the above information to delete the prompts for which user has not provided a value.
    Also I need to know, Is it possible to get Univers Long Name from DataProivder, then from Univers Long Name, will I be able to get the above Records Set? Is this possible in BO SDK Webi XI R3?
    My requirement is, I have BO Prompts and I need to remove certain prompts which are not supplied by the User, for example if I need to remove ACCOUNT_OPTION, I iterate the record set, as long as ACCOUNT_OPTION is there in PRP_DATAVALUE then I would remove the Filter Condition.Can anyone help me out on this? Rightnow This is a show stopper for me.
    Thanks

    Thanks for your reply, NO Java SDK means, what is it not possible? and what is possible through COM SDK?
    my requirement is, I need to remove certain Filter condition for a DataProvider, for example, ACCOUNT_OPTION is the name of the field, but through JAVA SDK, I am getting Account Option ,
    I have been trying the below code, Can anyone help me out what am I doing wrong? I could not go further.
    ACTXTRACTCon is my list of arrays, these prompts have to be removed from BO Prompts. Although I wanted to post my entire code, for some reason I could not embed the code. This code may have some compilation errors.
         // Get Providers from DocumentInstance
                   DataProviders oProviders = oDoc.getDataProviders();
                   int iDataProviderIndex = 0;
                   int iQueryCount = 0;
                   int iQueryIdx = 0;
                   Query oQuery = null;
                   // Declare ConditionContainer
                   ConditionContainer oCC = null;
                   int iCCIndex = 0;
                   FilterConditionNode oFCN = null;
                   ConditionObject oCO = null;
    String ACTXTRACTCon [] ={                    
                   "PRINTER_NAME",
                   "PARTNER_RANK",
                   "PARTNER_DOMICILE",
                   "TO_GL_CYCLE_DT",
                   "ENTITY_OPTION",
                   "LONG_MEMO",
                   "SHORT_MEMO",
                   "ENTITY_TYPE",
                   "POST_END_DT",
                   "TCODE_TYPE",
                   "ACCOUNT_OPTION",
                   "PARTNER_STATUS",
                   "ACCT_TYPE",
                   "POST_BEGIN_DT",
                   "TCODE_OPTION",
                   "FROM_GL_CYCLE_DT",
                   "PARTNER_TYPE"
    while (iDataProviderIndex <= oProviders.getCount()-1){
                        // Get DataProvider from DataProviders
                        DataProvider oProvider = oProviders.getItem(iDataProviderIndex);
                        // Get Query from DataProvider
                        QueryContainer oQuerys = oProvider.getCombinedQueries();
                        System.out.println("oProvider------->"+oProvider);
                        System.out.println("oProvider.getName().."+oProvider.getName());
                        System.out.println("oProvider.getDataSource().getLongName().."+oProvider.getDataSource().getLongName());
                        System.out.println("oProvider.getDataSource().getUniverseID().."+oProvider.getDataSource().getUniverseID());
                        iQueryCount = oQuerys.getChildCount();
                        if (iQueryCount > 0) {                         
                             // Loop through Query to get ConditionObject
                             for (iQueryIdx = 0; iQueryIdx <= iQueryCount - 1; iQueryIdx++) {
                                  oQuery = (Query)oQuerys.getChildAt(iQueryIdx);
                                  oCC = oQuery.getCondition();
                                  if (oCC != null){                              
                                       // Only Leaf object has condition
                                       if (!oCC.isLeaf()){
                                            // Loop through ConditionContainer to get all conditions
                                            int iCCCount = oCC.getChildCount();
                                            int iRevCCIndex = 0;
                                            //Removing universe level conditions
                                            for (iCCIndex = 0; iCCIndex <= iCCCount-1; iCCIndex++){
                                                 iRevCCIndex= iCCCount - iCCIndex -1;
                                                 oFCN=oCC.getFilterConditionNode(iRevCCIndex);
                                                 if (oFCN instanceof ConditionObject) {
                                                      oCO = (ConditionObject)oFCN;
                                                      FilterCondition oOperand=(FilterCondition)oCO.getOperand();
                                                      System.out.println("oOperand.."+oOperand);
                                                      for (int iRow = 0; iRow <= ACTXTRACTCon.length - 1; iRow++){     
                                                           if (oCO.getName().trim().toString().equals(ACTXTRACTCon[iRow])){
                                                                oFCN.remove(oCO);
                                                                break;
                                            // Removing report level conditions
                                            iCCCount = oCC.getChildCount();
                                            for (iCCIndex = 0; iCCIndex <= iCCCount-1; iCCIndex++){
                                                 iRevCCIndex= iCCCount - iCCIndex -1;
                                                 oFCN=oCC.getFilterConditionNode(iRevCCIndex);
                                                 if (oFCN instanceof ConditionObject){
                                                      oCO = (ConditionObject)oFCN;
                                                      FilterCondition oOperand=(FilterCondition)oCO.getOperand();
                                                      if (oOperand != null){
                                                           int iOperandCount = oOperand.getOperandCount();
                                                           int iRevOperandIdx = 0;
                                                           boolean bBreakInd = false;
                                                           for (int iOperandIdx = 0; iOperandIdx <= iOperandCount-1; iOperandIdx++){
                                                                // Removing conditions start with high index
                                                                iRevOperandIdx = iOperandCount - iOperandIdx - 1;
                                                                for (int iRow = 0; iRow <= ACTXTRACTCon.length-1 ; iRow++){                                                                 
                                                                     if (oOperand.getOperand(iRevOperandIdx).toString().equals(ACTXTRACTCon[iRow])){
                                                                          oFCN.remove(oCO);
                                                                          bBreakInd = true;
                                                                          break;
                                                                if (bBreakInd == true){
                                                                     // Exit from loop if condition has been removed
                                                                     break;
                        // fetch the changes
                        oProvider.runQuery();
                        iDataProviderIndex++;
                        System.out.println("Data Provider Index = " + iDataProviderIndex);
    Thanks
    Gokul.
    Edited by: mgggkn on Jul 11, 2011 8:18 PM

  • How to get the domain name from the System

    I need to get the domain name from the system in JDK 1.1.8
    Any Ideas?

    InetAddress.getLocalHost().getHostName() will get you the name of the computer the code is executed on. If that isn't the "domain name" then perhaps you could give more detail about what "domain" you are trying to find the name of.

  • How to get the tag name of HTMLDocument?

    I am now using JEditorPane to display and edit a html file.
    My code is like this:
    kit = new HTMLEditorKit();
    doc = (HTMLDocument) (kit.createDefaultDocument());
    editor.setEditorKit(kit);
    editor.setDocument(doc);
    editor.setContentType("text/html; charset=utf-8");
    editor.getDocument();
    [editor is the class JEditorPane,  doc is HTMLDocument,  kit is HTMLEditorKit]
    When a user clicks on the pane, it's easy to me to get the caret position. However, how can I get the tag?
    For example,
    <p><font class="book">I am a boy.</font> Hello! </p>
    On the pane, the position between "I am a boy" is clicked, I want to get the name of the tag - "font". Moreover, how can I get the class - "book" also?
    Moreover, can I get the <p> tag also?
    Many Thanks!
    Stephen

    Hi Stephen,
    is it possible to get the EditorKit from the EditorPane and then get the ViewFactory for the editor kit.
    Since u have the some tags of the elements hardcoded in the HTMLEditorKit.HTMLFactory it will be handy i guess.
    Let me know whether it helped or not so that either same method be approached or some other has to be tried.
    Cheers,
    Nagaraj

  • How to get only column names from different tables as single table columns

    Hi All,
       I have one requirement in which we want only column names from different tables.
    for example :
     I have three tables T1 ,T2, T3 having
      col1 clo2 clo3 -->  T1 , 
      col3 col5 ,clo6 --> T2 ,
      Clo6 col8 col9 --> T3
    columns i want to get only all  Column names from all table as single Resultset not any data from that how can i get that empty resultset 
    because this empty result i want to bind in datagridview(front end) as Empty resultset 
    Please tell me anyways to do this
    Niraj Sevalkar

    If I understand you want an empty result set, just with metadata. SET FMTONLY do the trick:
    SET FMTONLY ON
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    SET FMTONLY OFF
    Another alternative is to include an imposible contition
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    WHERE 1 = 0
    If you are using a SqlDataAdapter in your client application. You can use the FillSchema method. the select command may be any select statement that returns the columns you want. Under the covers FillSchema will call SET FMTONLY ON.
    If you are using SqlCommand.ExecuteReader you can pass SchemaOnly to CommandBehavior argument. SET FMTONLY ON is called under the covers. Again the select command may be any select statement that returns the columns you want.
    "No darás tropezón ni desatino que no te haga adelantar camino" Bernardo Balbuena

  • How to get the user name from Single Sign On Process?

    Post Author: sasikumar
    CA Forum: Authentication
    I am loging in Single Sign On Page. Then it goes to one JSP which lists out some links including InfoView link. While clicking InfoView link, I need to pass user name with the url for authentication. How and where can I get the user name?

    Care to be more specific what you mean with single sign-on? There are numerous ways this can be done.
    Just how you get the authenticated o/s user from within an Oracle session, depends on just how the actual authentication to Oracle was done in order to create that Oracle session.
    E.g. dealing in Oracle with a LDAP server is very different than dealing with a NT Primary/Secondary Domain Controller using o/s authentication, than dealing with a Java-based application server that does it own thing, etc.

  • How to get OTL Alternate Name From (Timekeeper or Employee) Preference

    Hi there
    In the current implementation our OTL functional consultant setup Alternate Name Definition:-
    FOR EMPLOYEE Preference as follows:-
    Definition Name = XX Employee DEF
    Alternate Name
    Leave Without Pay
    Values (DFF)
    Payroll Element (ATTRIBUTE1) “LEAVE NO PAY”
    Expenditure Type (ATTRIBUTE2) “Absence No Pay”
    System Type (ATTRIBUTE3) “SYTEM”
    ID (ATTRIBUTE4) “Employee”)
    Definition Name = XX TIME KEEPER DEF
    FOR TIME KEEPER Preference as follows:-
    Leave Without Pay
    Values (DFF)
    Payroll Element (ATTRIBUTE1) “LEAVE NO PAY”
    Expenditure Type (ATTRIBUTE2) “Absence No Pay”
    System Type (ATTRIBUTE3) “SYTEM”
    ID (ATTRIBUTE4) “Timekeeper”)
    So If employee Go Enter Leave himself he get XX Employee DEF “ALTERNATE NAME”
    AND IF Time Keeper go Enter Record for employee, he use Time Keeper “XX TIME KEEPER DEF” Setup
    My Question is how I can build a query to get the Alternate Name for that selected Leave. I am able to get the element easily, I use to do it when there is one to one relationship between ELEMENT & ALTERNATE NAME.
    Regards
    Discoverer

    Your question is not clear. Why do you want to get the alternate name?
    You can always get that from the employee OTL preference setup and yes, based on whether you check the employee or the TK , it will be different.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get iStore template name from jsp filename?

    Hi,
    We have implemented Oracle iStore R12.
    We have a requirement where we want to get template access name based on jsp file name. e.g. If jsp is ibeCCkdBHdrShip.jsp it should return STORE_CHKOUT_B2B_SHIP_HEADER.
    Is there any java API available for the same?
    We know we can get jsp filename from template access name as follows:
    String jspFilename = DisplayManager.getTemplate("STORE_CHKOUT_B2B_SHIP_HEADER").getFileName()
    However our requirement is other way round..getting access name based on jsp filename.
    Any prompt help/suggestion in this regard is appreciated.
    Thanks,
    Vivek

    Hi Vivek,
                            how about the query? can you use the query in your code ? If yes please use the query below.
    SELECT distinct I.ACCESS_NAME,
    A.FILE_NAME,i.description,I.Item_Name
      FROM JTF.JTF_AMV_ATTACHMENTS A,
      APPS.JTF_AMV_ITEMS_VL I,
      IBE.IBE_DSP_LGL_PHYS_MAP M,
      IBE.IBE_MSITES_TL S
      WHERE
      A.ATTACHMENT_ID = M.ATTACHMENT_ID
      AND I.ITEM_ID = M.ITEM_ID
      AND M.MSITE_ID = S.MSITE_ID
      AND A.File_Name like 'ibeCCtdStBlSuStI.jsp'
      Order by A.File_Name
    Thanks
    Shahzad Qamer

  • How to get userID or name from SSO, SSO Token

    How can I get the userID or name from the SSO token passed through a weblink/webtab to an external application?

    That's Simple...
    When you configure weblink or webtab you specify the custom application url along with SSO Token %%%SSO Token%%% similarly you can get User First Name, User Last Name, User Full Name and UserId from the same fashion..
    Hope this helps...
    Regards,
    Deepak H Andeli

  • How to get the Full Name from NT realm

    I need to get the full name of the logged user not just the username. I get
    the username defined in NT by request.getRemoteUser(). I need to get the
    full name defined in NT server.
    Thanks
    madhu

    Hi Madhu,
    There are no apis to do this with WebLogic.
    What I recommend is to do some JNI with Java
    Create some custom class which retrieves the nt username and then makes calls to
    microsoft libraries to return the full name.
    I have no idea what these calls to microsoft libraries will actually be --
    you'll probably have to do some research to see how to retrieve full usernames
    from NT -- what libraries you need to use, etc.
    Good luck.
    Joe Jerry
    m holur wrote:
    I need to get the full name of the logged user not just the username. I get
    the username defined in NT by request.getRemoteUser(). I need to get the
    full name defined in NT server.
    Thanks
    madhu

Maybe you are looking for