geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeromeernestgarcia <>
Subject HTTPServlet.doOptions not called
Date Wed, 29 Jun 2011 22:21:01 GMT
We have a web page that uses the Dojo toolkit which issues a OPTIONS request
prior to a GET. The javascript is sending these requests to a Java
HTTPServlet instance managed by Geronimo. The OPTIONS request fails because
the server responds with a "302 Moved Temporarily" response. 

I have overridden the doOptions method in my HTTPServlet subclass but that
never gets called. Since that failed, I added an override of
service(ServletRequest req, ServletResponse res) and set breakpoints all the
way down to Http11ConnectionHandler trying to find out where the OPTIONS
method is being blocked. It seems like it never get in.

I also tried to do some telnet experiments:

telnet localhost 8080
host: localhost
This gives a good response

telnet localhost 8080
OPTIONS /demandResponse HTTP/1.1
Host: localhost:8080
This returns "HTTP/1.1 302 Moved Temporarily"

telnet localhost 8080
GET /demandResponse HTTP/1.1
Host: localhost:8080
This returns "HTTP/1.1 302 Moved Temporarily"

Copying the URL for the GET request into a browser and sending the request
results in the correct call to the HTTPServlet.doGet method.

Can anyone explain why this happens and what I need to do to get the
HTTPServlet.doOptions method called?


View this message in context:
Sent from the Users mailing list archive at

View raw message