A recent question on servlets made me wonder how hard it would be to implement a servlet that forwarded requests via PCGI? That is, a servlet that packaged up request input, made a PCGI request to a long-running app, and sent the response back to the browser. This would provide an alternative to the PCGI wrapper, perhaps providing better performance and avoiding stuffing authentication info in a Unix environment. Do servlets have access to the HTTP Authorization header? Does anyone on this list have experience writing servlets and feel inclined to try wrining this thing? I think it could be pretty useful, since I think that a number of web servers support servlets. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Jim Fulton writes:
Does anyone on this list have experience writing servlets and feel inclined to try wrining this thing? I think it could be pretty useful, since I think that a number of web servers support servlets.
At least with the Apache mod_jserv, servelets are actually implemented similarly to PCGI. mod_jserv packages the request and forwards it to a long-running Java process that handles the request and returns the results, which is essentially the same as PCGI (except that no one has written mod_pcgi yet). I believe Sun's servlet runner works in the same way. -- A.M. Kuchling http://starship.skyport.net/crew/amk/ Chess! I'm tormented by thoughts of strip chess. Pure mind just isn't enough, Mallah. I long for a body. -- The Brain, in DOOM PATROL #34
At 02:12 PM 1/21/99 +0000, you wrote:
A recent question on servlets made me wonder how hard it would be to implement a servlet that forwarded requests via PCGI? That is, a servlet that packaged up request input, made a PCGI request to a long-running app, and sent the response back to the browser. This would provide an alternative to the PCGI wrapper, perhaps providing better performance and avoiding stuffing authentication info in a Unix environment. Do servlets have access to the HTTP Authorization header?
Does anyone on this list have experience writing servlets and feel inclined to try wrining this thing? I think it could be pretty useful, since I think that a number of web servers support servlets.
A *long* time ago I tried my hand at writing a bobo servlet. I got it mostly working, but as I recall, I couldn't figure out how to get enough of the headers from the request, and/or stuff enough of the headers back into the response. Since that time the Servlet API has changed a couple times, I think. Maybe it's easier now. If anyone wants to make a go of it, I'll try and dig up my old code to get you started. -Amos
Amos Latteier wrote:
Does anyone on this list have experience writing servlets and feel inclined to try wrining this thing? I think it could be pretty useful, since I think that a number of web servers support servlets.
A *long* time ago I tried my hand at writing a bobo servlet. I got it mostly working, but as I recall, I couldn't figure out how to get enough of the headers from the request, and/or stuff enough of the headers back into the response.
Since that time the Servlet API has changed a couple times, I think. Maybe it's easier now.
If anyone wants to make a go of it, I'll try and dig up my old code to get you started.
there is a brand new module for apache - mod_cgisock - that "implements the CGI 1.1 gateway over a unix domain socket." See it at: http://www.midcoast.com.au/~mvoase/ Hopefully it could serve as the beginnings of mod_pcgi. Disclaimer: As I'm still not sure what the heck the servlet is, and how does it differ from ZPublisher, my response here may be completely off-topic ;) --------------- Hannu Krosing
there is a brand new module for apache - mod_cgisock - that "implements the CGI 1.1 gateway over a unix domain socket."
See it at:
http://www.midcoast.com.au/~mvoase/
Hopefully it could serve as the beginnings of mod_pcgi.
Yes, this makes sense. Thanks for the pointer. Jeff Bauer Rubicon, Inc.
Jim Fulton wrote:
A recent question on servlets made me wonder how hard it would be to implement a servlet that forwarded requests via PCGI? That is, a servlet that packaged up request input, made a PCGI request to a long-running app, and sent the response back to the browser. This would provide an alternative to the PCGI wrapper, perhaps providing better performance and avoiding stuffing authentication info in a Unix environment. Do servlets have access to the HTTP Authorization header?
Does anyone on this list have experience writing servlets and feel inclined to try wrining this thing? I think it could be pretty useful, since I think that a number of web servers support servlets.
Jim
Jim, Do you mean specificly Java Servlets or any kind of server extension like a mod_pcgi (like we were discussing yesterday)? Michel
-- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Michel Pelletier wrote:
Do you mean specificly Java Servlets
Yes
or any kind of server extension like a mod_pcgi (like we were discussing yesterday)?
I'd like to see mod_pcgi too. It'd also be interesting to see somone try a PCGI requestor based on PyApache. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Jim Fulton wrote:
Michel Pelletier wrote:
Do you mean specificly Java Servlets
Yes
or any kind of server extension like a mod_pcgi (like we were discussing yesterday)?
I'd like to see mod_pcgi too.
It'd also be interesting to see somone try a PCGI requestor based on PyApache.
Httpdapy (Nsapi for python on Apache) claims to have ZPublisher capability: http://www.ispol.com/home/grisha/httpdapy/ Maybe this fact should be more prominently published ;) on www.zope.ee ? ----------------- Hannu
participants (6)
-
Amos Latteier -
Andrew M. Kuchling -
Hannu Krosing -
Jeff Bauer -
Jim Fulton -
Michel Pelletier