From: Kevin K. <zi...@gm...> - 2005-10-31 20:30:15
|
I've configured the mod_jk differently, Apache is the "first handler" for all requests, passing requests in servlet mappings to Tomcat via the AJP connector. Tomcat no longer even runs an HTTP Connector.=20 This appears to be the preferred way to configure mod_jk with Apache2. Regardless of that, I'm confused about the request method. The request is a Get request, as defined by the browser makeing the request. Where and why would it be translated to a Put? I'm also confused about this: "For a production system, however, it is assumed that all requests go through the standard http port and that a native http server listens on this port. -- The reason is that java cannot drop privileges, so it is not possible to connect a java servlet engine to port 80." First: I don't want to run apache on port 80, surely this port isn't hardcoded anywhere? Second: What do you mean that "java cannot drop privileges"? It's quite possible to configure Tomcat to answer requests on port 80, although that's not what I want to do personally. I can't just use the default port--there's nothing running there.=20 Apache is running on port 8080, though, and it leads me to the problem I'm having. What component "should" be changing Get requests from the browser into Put requests for the server? Why is the servlet using CGI for Get? Get is just the method, and is a valid request type for these requests according to the HTTP spec. -Kevin On 10/29/05, Jost Boekemeier <jos...@ya...> wrote: > Hi Kevin, > > > The servlet seems to be calling php on the > > commandline (CGI) instead > > of through Apache. > > CGI is only used when the controller servlet > (PhpJavaServlet) receives a get or post request. > > Usually apache listens on the http standard port :80 > and php instances are allocated from the apache pool. > The php instances in turn connect to the :8080 backend > using put requests. mod_jk becomes obsolete if one > doesn't have .jsp files anymore. > > [request to port 80:] > > and I can see the > > test.php file if I use Apache directly. It > > indicates that Java is > > enabled. > > Okay. > > [development setup] > > I've installed the JavaBridge war (opened it in > > Eclipse, actually), > > and added my php-cgi.exe and associated .dll files > > to the WEB-INF/cgi > > directory. I updated the web.xml to indicate that > > the file is called > > php-cgi.exe > > Okay. > > > [request to :8080] > > My requests to .php files seem to be serviced by the > > PhpJavaServlet, I > > can place debugging breakpoints there. The > > requests, being GET > > requests are serviced by the doGet method. > > The doGet invokes the cgi machinery, yes. It is there > to help during development, where it is difficult to > work with two servers. > > For a production system, however, it is assumed that > all requests go through the standard http port and > that a native http server listens on this port. -- The > reason is that java cannot drop privileges, so it is > not possible to connect a java servlet engine to port > 80. > > > > Is there some configuration I need in my web.xml > > file to tell the > > Servlet how to connect back through the Apache > > service? > > Just use > > http://localhost/JavaBridge/test.php > > instead of > > http://localhost:8080/JavaBridge/test.php > > > Regards, > Jost Boekemeier > > > > > > > > > ___________________________________________________________ > Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmeld= en: http://mail.yahoo.de > |