Skip to Content
avatar image
Former Member

request.getRemoteAddr() throws exception on AIX

Hi all,

I developped a little jsp on j2ee engine to retrieve the ip address of remote caller. It is very simple. It is working on Windows but not on AIX. Here is the code:

<html>

<head>

<title>IP displaying test</title>

</head>

<body bgcolor='#ffffff'>

<h1>IP displaying test</h1>

<%

out.println( "IP Address : " + request.getRemoteAddr() );

out.println( "Remote host : " + request.getRemoteHost() );

%>

</body>

</html>

When I execute it on windows the result is :

IP displaying test

IP Address : 127.0.0.1 Remote host : 127.0.0.1

But on AIX 5.1, I had this exception:

Internal Server Error 500!

java.lang.ArrayIndexOutOfBoundsException: 9

at com.inqmy.services.servlets_jsp.server.HttpServletRequestFacade.inetAddressByteToString(HttpServletRequestFacade.java(Compiled Code))

at com.inqmy.services.servlets_jsp.server.HttpServletRequestFacade.getRemoteAddr(HttpServletRequestFacade.java(Compiled Code))

at jsp_testip1078481612092._jspService(jsp_testip1078481612092.java:30)

at com.inqmy.services.servlets_jsp.server.jsp.JSPServlet.service(JSPServlet.java:304)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.inqmy.services.servlets_jsp.server.RunServlet.runSerlvet(RunServlet.java(Compiled Code))

at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.startServlet(ServletsAndJspImpl.java(Compiled Code))

at com.inqmy.services.httpserver.server.RequestAnalizer.checkFilename(RequestAnalizer.java(Compiled Code))

at com.inqmy.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java(Compiled Code))

at com.inqmy.services.httpserver.server.Response.handle(Response.java:166)

at com.inqmy.services.httpserver.server.HttpServerFrame.request(HttpServerFrame.java:1152)

at com.inqmy.core.service.context.container.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java(Compiled Code))

at com.inqmy.core.cluster.impl0.ParserRunner.run(ParserRunner.java(Compiled Code))

at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java(Compiled Code))

at java.security.AccessController.doPrivileged(Native Method)

at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java(Compiled Code))

Do you have any idea?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Mar 08, 2004 at 07:57 PM

    Hi Mert,

    depending on the version you used, you should issue an OSS message. I don't see either why it should not work.

    Regards,

    Benny

    Add comment
    10|10000 characters needed characters exceeded