Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.