Unable to understand method of ServletRequest

Dear All,
Given a request from "*myhost.hp.com*" with an IP address of *10.0.198.12* on port: *8083* which methods of ServletRequest would give me host name (myhost.hp.com) and IP address (10.0.198.12) , port (8083)

sivaji_sun wrote:
Reason behind posting his question is to understand diff b/w
getRemoteHost() Vs getLocalName() and
getRemoteAddr() Vs getLocalAddr()..Uh, that's already explained by the method name as well as its API docs?
getRemoteHost() returns the remote hostname.
getLocalHost() returns the local hostname.
getRemoteAddr() returns the remote IP address.
getLocalAddr() returns the local IP address.
It is really not that hard to read the API and think logically.

Similar Messages

  • Unable to understand the usage of OAFM and OACORE run in OC4J in Release 12

    I have gather below details but still unable to understand that why two services are there in OC4J in Release 12. My questions are:
    [1] If OACORE is there and most of the components are based on Framework in Release 12 then what is the requirement of OAFM?
    [2] Is OAFM is only for mapviewer, ascontrol and "Oracle Transport Agent" if we use them?
    [3] Why there is seperate process for HTTP_Server as given below if OACORE is already there.
    I have gathered below details from various source but still unable to understand fully above three questions.
    * Oacore: This runs the OA Framework -based applications (Core Application Modules).
    * Forms: This runs the Forms-based applications (using Servlet Mode).
    * OAFM (Oracle Apps Fusion Middleware): This is responsible for running the web services , mapviewer, ascontrol (Oracle Transport Agent).
    [oratrain@ndaeasdb01 scripts]$ ./adopmnctl.sh status
    You are running adopmnctl.sh version 120.4
    Checking status of OPMN managed processes...
    Processes in Instance: TRAIN_ndaeasdb01.ndaeasdb01.xone.xansa.com
    ------------------------------------------------+---------
    ias-component | process-type | pid | status
    ------------------------------------------------+---------
    OC4J | oafm | 19974 | Alive
    OC4J | forms | 19888 | Alive
    OC4J | oacore | 19768 | Alive
    HTTP_Server | HTTP_Server | 19711 | Alive
    Web Entry Point Services          HTTP Server
    Web Application Services          OACORE OC4J
                        Forms OC4J
                        OAFM OC4J

    Let me chk the complete details on a R12 server. but for the time being, all I can say is that there are different HTTP services for the R12 Apps and the SOA suite components.
    Also your DBA might be a better person to answer and even some reading in the Oracle Process Manager Dev guide, Admin guide will help.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • In an inbuild example of can .. that CAN transmit periodic vi .. i am unable to understand how the extended and standard frame is set?

    In an inbuild example of can .. that CAN transmit  periodic vi .. i am unable to understand how the extended and standard frame is set?
    plz help me .. stuck up very badly
    thanks
    mahadev
    Solved!
    Go to Solution.

    I suggest this KB which explains usage of Ext IDs with NI-CAN
    http://digital.ni.com/public.nsf/allkb/2FA120A37EDBC51D86256854004FB0C7

  • Unable to understand meaning of next_time in v$archived_log

    hi all,
    i am working with 10g standby databases. There are column names FIRST_CHANGE#, FIRST_TIME, NEXT_CHANGE#, NEXT_TIME in v$archived_log. I am unable to understand the exact meaning of these columns by reading the oracle document.
    Can somebody explain me the meaning of these columns in v$archived_log.
    Same columns are there in v$log_history also but i think there meanings are different as from columns in v$archived_log.
    thanks in advance.

    Hi,
    See, when you referred to "v$archived_log", by the name it depends on the Online Redo Log. See, the columns
    FIRST_CHANGE#, FIRST_TIME, NEXT_CHANGE#, NEXT_TIME reflects the changes happened with respect to online redolog, Suppose if the online redo log for first time archived then the respect to record will be appeared, in the "v$archived_log" with respect to details like which is first changed started or done in this particular log and time of it, Next change comes to like a link of next log which happened and respective time. By tracking this details itwill help ful for process to apply the necessary logs on data files at the time of recovery.
    Coming to " v$log_history " -> its maintains the history of logs, with respect to SCN numbers, by this we can information which SCN will fall under which log files or existing in which logs. it will have lowest SCN and Highest SCN Numbers with respect to Sequnence number of Log
    - Pavan Kumar N

  • Error "Unable to find method:key" on UM configuration iView

    When i try to click on the UM configuration in System Administration --> System configuration i am getting the Error Unable to find method:key  Does any one came across the same Issue. Please help ?

    Server restart should help. See note 792929.

  • Adobe Captivate video encountered an internal error (unable to understand category list).

    Using Captivate 6 (64bit) on Windows 7 machine. When I try to upload a demonstration video to YouTube I get the error: adobe captivate video encountered an internal error (unable to understand category list). Any ideas what would be causing this?

    I am indeed running version 6.0.1.240 here are the screen shots:

  • My I phone 5 hangs if I get miss call os 7.0.4? Unable to understand if it's a phone or hardware issue?

    My I phone 5 hangs if I get miss call os 7.0.4? Unable to understand if it's a phone or hardware issue?

    Hi Nad1985,
    Thanks for visiting Apple Support Communities.
    If your iPhone is unresponsive after missing calls, I recommend first restarting or resetting it:
    Restarting your device
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider.
    Press and hold the Sleep/Wake button until the Apple logo appears.
    Note: Reset your device only if you are unable to restart it.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    You can find the full article with these steps here:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    If you are still experiencing the same issue, I recommend resetting all settings next:
    Go to Settings > General > Reset, then choose Reset All Settings:  All your preferences and settings are reset.
    Reset iPhone settings
    http://help.apple.com/iphone/7/#/iph7a2a9399b
    If the issue persists, the last thing I recommend is backing up and restoring your iPhone:
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766
    iTunes: Restoring iOS software
    http://support.apple.com/kb/HT1414
    Best,
    Jeremy

  • Unable to understand about the NVL

    i want to know the space used by the following column , it may be possible that one of these column will bw null, for taht purpose i m using NVL , but i m unable to understand that where i will put null, to get the exact space
    i have three queries here , let me know which will give me correct result ,because all these three queries gives me different result
    select (
    nvl(sum(length(mis_skill_lookup)),0) +
    nvl(sum(length(mis_skill_selected)),0) +
    nvl(sum(length(mis_place_selected)),0) +
    nvl(sum(length(mis_agent_selected)),0) +
    nvl(sum(length(mis_dblookup_checkpoint)),0) +
    nvl(sum(length(mis_call_duration)),0) +
    nvl(sum(length(mis_survey_result)),0) +
    nvl(sum(length(mis_survey_id)),0)
         / 1024) / 1024 a
    from mis_data where mis_dblookup_checkpoint <> 0 and mis_call_duration <> 0;
    in the second and third query i have put nvl only in one column , just for an example, i will latter on put it into all the column
    select ((sum(length(mis_skill_lookup)) +
    sum(length(mis_skill_selected)) +
    sum(length(mis_place_selected)) +
    sum(length(mis_agent_selected)) +
    sum(length(mis_dblookup_checkpoint)) +
    sum(length(mis_call_duration)) +
    sum (length (nvl(mis_survey_result,0))) +
    sum(length(mis_survey_id))) / 1024) / 1024 a
    from mis_data where mis_dblookup_checkpoint <> 0 and mis_call_duration <> 0;
    select ((sum(length(mis_skill_lookup)) +
    sum(length(mis_skill_selected)) +
    sum(length(mis_place_selected)) +
    sum(length(mis_agent_selected)) +
    sum(length(mis_dblookup_checkpoint)) +
    sum(length(mis_call_duration)) +
    nvl(sum(nvl(length('||mis_survey_result||'),0)),0) +
    sum(length(mis_survey_id))) / 1024) / 1024 a
    from mis_data where mis_dblookup_checkpoint <> 0 and mis_call_duration <> 0;

    Hi,
    assuming all your columns have datatype varchar2 none
    of your select statements will give you a correct
    result. You will have to put NVL inside the SUM, so
    the statements are reading:
    sum ( length ( nvl ( <column_name>, 0 ) ) )
    then you will get the right result.
    Regards Markus ... btw: please change your username
    to something human readableThis will never give correct answer
    use
    sum ( nvl( length( <column_name> ),0 ) )
    eg:
    sql>select * from test;
    STR 

         --null here  
         ---null here

    sql>
    select sum(length(nvl(str,0))) sm1,sum(nvl(length(str),0)) sm2,nvl(sum(length(str)),0) sm3
    from test;
    SM1 SM2 SM3 
    4  2  2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Siri is unable to understand my English.

    I am from India and using iphone 5S.
    Most of the time siri is unable to understand my English whether i set it to UK English or USA English.
    Thats why siri answer are baseless to my questions.
    So it's kind of useless to me. Any help regarding this issue?
    Thanks

    That's because the UK English and US English accents are very different to the Indian English accent.
    Until Siri is updated to understand the Indian English accent, you'll just have to practise speaking with an English accent, or an American accent.

  • Can't Stop packet from transmitting and unable to understand packet format

    I have used JPcap library for capturing the packet. But I can't block the packet from transmitting. How can I stop packet from reaching destination.
    Another problem is that int the Example given i get packet but unable to understand it is like this
    _.......d......(.........y... .......P......>I>...5..&....M..R.......6$.w......k._*
    _...........Y...............P...P............<..........D....!...zq...b....o... ._*
    _.^....d....w....Z.....T....".L..I.....&...?%..h.....9....8`#C'........).....(..._*
    [email protected] ...D.&.l..0.a....H....;..t@.#................_.....T_+*
    _...............(...r...$...`....v../..|H.......:.t.}.................E....}....._*
    +_.P....rL....l......\...................$.[..Q....?....G,......A....J..<d... ...._+*
    _...4.....3......7....U.....D...`.........p... .....k...8.......v#d...((..,......_*
    +_.........#...3.....[...>N...N...YL.........I.................T...;..........._.._+*
    _...l.........j.4.........u.`.........'.(.........2.T....d........j.......o.H...._*
    _.!...z.t....9......,............$....7.....K.............\.M ..B ......V........_*
    _.....X...*.........b...c...........n..QDV.. \.q4.c.....s......\..........y....._+*
    _.B.........z.........6.......N.........L...A...........Z......|.......w........L_*
    _...b.....x.W..\[email protected]... ......G..........d..........hb= X.9.. X.....0......._*
    _....*..A...7.....<F....6.......1~......,....i..&...b..L.......i.9...&..........._*
    _.#...#...........8C...........i....>t.K...........=..........$....u...........>._*
    bd0..u.i.n..wt\.?y......U.. X................ [email protected].;......7..+*
    +_..a....f;......:Y.Do.......o{.pX...d.....E}..Y...r....Q..O....x..DM..VC..>...)c._+*
    +_.pB..... $...............~....-.....h.......V.{.................8..........P..!._+*
    _............D.............,........ }...P............l....$...mw.IHw.>.|........_*
    H.....M..........+y9....<[email protected]......\...Dn..W......w...$v5O+*
    _.........<(...R....1`....P@..&...C...r........0......Y.........#...#...#....W..._*
    Can anyone help me?

    Actually, I am 4th year student of Computer Science field and I am doing project on Internet Control access but i can't get how to stop packet from reaching destinaton. Is there any other library avilable for this?

  • Unable to understand InputStream.available() method, need some help

    dear friends,
    The following is my doubt. please kindly help me in this. this will help me a lot in understanding some consepts.
    Environment: i am using jdk1.4.1_01 on windowsxp.
    i am using IE6.0 to make requets.
    My requirement:
    what i am actually trying to do is i want to see the raw material
    send by the browser when we made a request to the server
    by the browser.basically i want to see the request line
    and headers as it is that is send by the browser to the server.
    so i thought to code a server that can print the request send
    by the browser as it is on the command window.
    i had taken two examples and i am running Server2.java (look at the bottom for this code)and i made a 25 requests to the server2 program
    which is running on port 8080 by the browser. here only once or twice in 25
    times i was able to see the requests send by the browser.i tried hard and
    found that InputStream.available() method is returning 0 even though the
    request is sucessfully send to the port 8080 that is to the server2 program
    which is listening to port 8080.
    so in this process of experimenting i took Server3.java(i am sending this file
    also as an attachment) which is using multithreading. in this also i did modification
    as i did in Server2.java. the thing is here i am able to succed. here
    InputStream.available method is returning the correct number of bytes
    that are arrived on the port and are available to the InputStream.here
    when ever i made a request from the browser to Server3.java i am able to
    see the raw data send by the browser without failure.
    i could not understand why InputStream.available() is returning 0
    often(not all the time) and why it is giving the desired result when i
    used it in Server3.java ?
    i looked into the documentation and it says " InputStream.available() Returns the number of bytes that can be read (or skipped over) from this input stream without blocking
    by the next caller of a method for this input stream."
    so the thing i could not understand is what is blocking the InputStream
    in the first case.if i could undrstand the internals of how this
    method is working it will help me a lot.if i could understand this i
    will know what is the right situations to use this method.
    Thanking You.
    /*Shows how to develop a simple network server
    Author : Team -J
    Version : 1.0 */
    import java.net.*;
    import java.io.*;
    class Server2{
    static public void main(String[] args)throws Exception{
         // create a new Server Socket
         try{
              ServerSocket ss = new ServerSocket(8080,1);     
         while(true){// set queue length to 1
              // wait for the connections
              Socket s = ss.accept();
              // get the output stream associated with socket
              // to write something to the socket
              PrintStream ps =new PrintStream( s.getOutputStream());
              InputStream is = s.getInputStream();
              ps.println("I am ready to provide xxx Service");
    int len=is.available();
              if(len !=0)
              byte b [] = new byte[len];
              int k =is.read(b,0,(len-1));
              for(int i =0;i<k;i++)
                   char c = (char)b;
                   System.out.print(c);
              // close the connection
              is.close();
              s.close();
         }catch(Exception e){}
    /*Shows how to develop a simple network server
    Author : Team -J
    Version : 1.0 */
    import java.net.*;
    import java.io.*;
    class Server3{
    static public void main(String[] args)throws Exception{
         // create a new Server Socket
         try{
              ServerSocket ss = new ServerSocket(8080,1);
              while(true){
                   // wait for the connections
                   Socket s = ss.accept();
                   ServerThread st = new ServerThread(s);
                   st.start();
         }catch(Exception e){}
    class ServerThread extends Thread{
    Socket s;
         public ServerThread(Socket s){
         this.s = s;
         public void run(){
              try{
              PrintStream ps =new PrintStream( s.getOutputStream());
              InputStream is = s.getInputStream();
              int len=is.available();
              ps.println("I am ready to provide xxx Service");
              if(len!=0)
              byte b [] = new byte[len];
              int k =is.read(b,0,(len-1));
              for(int i =0;i<k;i++)
                   char c = (char)b[i];
                   System.out.print(c);
              is.close();
              s.close();
              }catch(Exception e){}

    so the thing i could not understand is what is
    t is blocking the InputStream
    in the first case.Blocking means the thread goes to sleep waiting for more data to arrive. InputStream.available() shows how many bytes have already arrived, not how many remain to be sent.

  • Trying to understand Methods

    I have a code that asks for integer input and outputs the sum of the integer.
    import java.util.Scanner;
    public class Assignment3a {
      public static void main (String[]args){
        Scanner input = new Scanner (System.in);
        //declaration
        int i, n, mod=0, sum = 0;
        //get user input for 'How many inputs'
        System.out.print ("How many numbers in input? ");
        i = input.nextInt();
        //number of itterations
        for (int entry=1; entry <= i; entry++){
          System.out.print ("Enter a positive integer: ");
          n = input.nextInt();
          while (n < 0){//If number is negative
            System.out.print ("ERROR! Should be positive. Enter a positive integer: ");
            n=input.nextInt();
          while(n>0){//sum of integers
            mod= n % 10;
            sum= mod + sum;
            n = n / 10;}
          System.out.println ("The sum of digits is " + sum + ".");
          mod = 0;//reset integers
          sum = 0;
    }What I need is to use a method which does the sum of digit part. Here is a vague idea, of what I think it would be. Obviously, there are several error. Would someone show me the right way?
    import java.util.Scanner;
    public class test {
      public static void main (String[]args){
        Scanner input = new Scanner (System.in);
        //declaration
        int i, n, mod=0, sum = 0;
        //get user input for 'How many inputs'
        System.out.print ("How many numbers in input? ");
        i = input.nextInt();
        //number of itterations
        for (int entry=1; entry <= i; entry++){
          System.out.print ("Enter a positive integer: ");
          n = input.nextInt();
          if (n < 0){//If number is negative
            System.out.print ("ERROR! Should be positive. Enter a positive integer: ");
            n=input.nextInt();
          else{//sum of integers
            displaySum(n,mod,sum);
            System.out.println (sum);
      public static void displaySum(int n, int mod, int sum){  
        mod= n % 10;
        sum= mod + sum;
        n = n / 10;
    }Edited by: acastelino2001 on Apr 22, 2010 2:27 PM

    acastelino2001 wrote:
    I think you misunderstood me or may be I wasn't clear enough. the program should call a method (in this case displaySum) to solve the sum. The issue I'm having is, that I don't fully understand how methods work...Then it seems to me that you need to read the tutorials; otherwise anything we give you, while it might do the job, won't be your own work.
    However, a method is essentially a named function which does a specific piece of work. It takes input in the form of parameters and hands back a result, in the form of a return value; however neither are absolute requirements (a method can have no parameters, and can define a return type of 'void', which indicates that it does not return a value).
    The real craft of programming is to set up methods that break down the problem you've been assigned into single tasks, and for that reason I agree completely with flounder that calculateSum() is the first thing you should look at. Once you've got that working, you can then use its result to create a displaySum() method that prints it out.
    Winston

  • Unable to understand the concept of Primary Key in EJB

    hi,
    please help me in understanding the concept of Primary Key.
    For each and every entity bean represents a data base row. i think it is correct. if multiple users are accessing the same data base row, there will be different primary key for each and every client. is it correct or not. can we say this as "concurrency"?. if all the clients are manipulating the bean, who manages it either application server or data base server?. why does we must implement both hashCode() and equals() methods?. Provide me the links where i can find the answers.

    if multiple users are
    accessing the same data base row, there will be
    different primary key for each and every client.This is incorrect: the PrimaryKey is the unique identifier for each database row. It has nothing to do with users. In order for CMP to work, the container must be able to operate with a single row in the database and be able to distinquish between them.
    If your CMP->database table already has one column that's unique, then you declare that CMP field to be <primary-key-field>. If you have more than one column that makes a row unique, you must make your own primary key object. The way the container can tell the difference between these primary key objects is to compare them, therefore the hashCode and equals methods.
    Provide me the links where i can find the
    answers.This is all discusssed in the J2EE Tutorial.

  • Unable to see method exception EXECUTE_ASYNCRONOUS in sproxy

    Hi,
    I am trying a file to proxy scenario for the inbound message interface(Aync-inbound) I made and configured
    the scenario for file 2 proxy but in R3 side "Sproxy" --> create proxy with prefix as cl_ and generate proxy.
    But in method exception under my class i donot see EXECUTE_ASYNCRONOUS, Instead i see my Inbound message interface name.
    Why i am not able to see the EXECUTE_ASYNCRONOUS in method exception.
    Regards,
    Anirban.

    Hi Anirban,
    Execute_Asynchronous or Execute_Synchronous method does not exists any more in XI 7.0 SP 14 or higher.
    Don't worry about this. There will be method with the same name as your Interface Name. Write your code inside that and you will be good to go. We have recently implemented the same and it works absolutely fine.
    Thanks
    Amit

  • Trying to understand methods - calling methods within own class - help

    I'm trying to write a simple program to search for letters in a string. I'm having a ton op problems; java seems so complicated with a lot of rules.
    The main problem I'm having (for now) is calling a method within the same class as main.
    import java.io.*;
    class LookForLetters{
        public static void main(String[] args)
         int i = 0;     
         int j = 0;
         int l = 0;
         int m = 0;
         String question1 = "Enter the line to be searched"; 
         String question2 = "Enter the line to be searched";       
         returnResponse stringtosearch = new returnResponse(question1); // here's where my problem is
            char[] chartosearch = stringtosearch.toCharArray();
         returnResponse letterstofind = new returnResponse(question2);
            char[] chartofind = letterstofind.toCharArray();     
         int findlength = chartosearch.length();
         int searchlength = chartofind.length();
         int[] k = new int[searchlength];
         for(i = 0; i < findlength; i++)
             for(j = 0; j < searchlength; j++)   
              if(chartosearch[i] == chartofind[j])
                  k[l] = i;
                  l++;
                  System.out.print("T");
             System.out.print(i + " " + l);
                if(l == 0)
                    System.out.print(chartofind[i] + " is the not in the sentence.");
                    System.out.println();       
                else
                    System.out.print(chartofind[i] + " is the ");
                 for(m = 0; m < l; m++)
                     System.out.print(k[l] + " ");
                    System.out.print("letter of your sentence");
                    System.out.println();
                    l = 0;
        public String returnResponse(String question){
         String response = " ";
         System.out.print(question);
         try
             InputStreamReader isr = new InputStreamReader(System.in);
                BufferedReaderbr = new BufferedReader(isr);
             response = br.readLine();            
         catch(IOException e)
             System.out.print("error");
         return response;
    }The compiler says that it can't find the returnResponse method. when I try to instantiate the whole class, it says the package is not included. Please help.

    JoachimSauer wrote:
    DaneWKim wrote:
    thank you very much for your response. I'm sure it's obvious that I'm really confused. I'm used to C and assembly programming, so the OO concepts are really foggy.That particular line doesn't even deal with any OO concept. But the fact that you already know C helps me give a (hopefully) more useful answer:
    What is the return type of the method you're trying to call?
    What is the type of the variable you want to assign the return value to?
    Are those compatible? Or even more general: do they both exist?I changed it to:
            String stringtosearch = returnResponse(question1);
            char[] chartosearch = stringtosearch.toCharArray();
         String letterstofind = returnResponse(question2);
            char[] chartofind = letterstofind.toCharArray();I guess I'm getting confused with medthods, class and types. There's a whole host of new vocabulary and rules with OO and java that have me a bit confused. I appreciate your help.

Maybe you are looking for

  • Acrobat 8.1.2

    I am new to the world of Acrobat 8 updated to 8.12. I note that many items in the toolbar are greyed out and not usable. How do I make these items usable? Please advise soonest. XPro/SP3/IE7 4GB PC3200 RAM AMD 4600+CPU A8N-SLI mtherboard This is the

  • Windows dvd maker does not recognize the dvd drive in this computer

    I have windows 7 release candidate on my old desktop and this newish notebook. Windows DVD maker works fine on the desktop but on this Lenovo 3000 N200 it will not recognize the built in dvd drive. I have checked with Device Manager and the software

  • Possible trojan .zip file in jar folder

    Has anyone heard of the possibility of an infected "jar" file in the J2SE v.1.4.2_03 application? I have recently installed Sun during an XP Pro install due to the regulations that don't allow Microsoft to monopolize the Java Machine anymore, and now

  • How to set the system time in the program

    Hi All, How do we update the system time inside java programme.

  • Help with a Dreamweaver glitch

    Hello, can anyone help me figure out why a white line has suddenly appeared on my website after I uploaded. I'm a novice, simply filling in templates, so I'm afraid I accidentally hit the wrong button w/o knowing it. Anyway, my url is: http://www.fit