You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rouiller Samuel <sa...@rixxo.com> on 2001/02/05 17:51:39 UTC
linking a static mod_jk with Apache
Hi,
I want to use Apache and Tomcat together. However, I need to build Apache
statically due to a thread problem with the OCI library. Hence my question:
Is it possible to compile mod_jk and link it statically with Apache instead
of using DSO's. I am particularily interested in mod_jk because it should
have a better support for SSL that mod_jserv.
Any help will be very appreciated,
Thanks,
Samuel
Redirecting servlet access
Posted by Tony Montgomery Smith <to...@compuserve.com>.
This may be an Apache rather than Tomcat issue. But I see it was discussed here
about 10 months ago without resolution.
I can successfully redirect an attempted servlet access on my ISP's Apache
server to my own PC with the following command in .htaccess:
Redirect permanent /IxrPubSubService http://62.6.133.202/IxrPubSubService
However, as a minor problem, easily worked around, the http POST I sent to the
original server gets converted to a GET.
More important, my servlet can't access the data sent with the POST - the data
stream on:
BufferedReader in = new BufferedReader(httpRequest.getReader());
is set to null.
It looks as if the redirect capability is designed purely for GETs, and doesn't
support POST's with their subsequent data.
I'd be grateful for any ideas on how to deal with this.
Tony
Re: Off topic - HTTP POST example?
Posted by David Wall <dw...@myEastside.com>.
> Well, do you mean POST from web-form? Then it would be:
>
> <form name="posttest" action="http://server/servlet/ServletName"
> method="POST">
> Name: <input type="text" name="name">
> <input type="submit">
> </form>
Not, that was not my question. I understand how to do a regular POST from a
web browser and how to process it in a servlet. I'm trying to do one
programmatically: that is, I want to open a URL and send a POST to that URL
from my program. In other words, I'm trying to act like the browser, not
the web server.
David
Re: Off topic - HTTP POST example?
Posted by John Golubenko <go...@columbiafunds.com>.
Oh... PrintWriter out = response.getWriter() not res.getWriter(), also
it's not tested :)
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 2/5/01, 9:46:50 AM, "John Golubenko" <go...@columbiafunds.com>
wrote regarding Re: Off topic - HTTP POST example?:
> Well, do you mean POST from web-form? Then it would be:
> <form name="posttest" action="http://server/servlet/ServletName"
> method="POST">
> Name: <input type="text" name="name">
> <input type="submit">
> </form>
> If you asking how to handle POST's from a servlet, it would be:
> import javax.servlet.*;
> import javax.servlet.http.*;
> public class ServletName extends HttpServet {
> public void doPost(HttpServletRequest request, HttpServletResponse
> response)
> throws ServletException, IOException {
> response.setContentType("text/html");
> PrintWriter out = res.getWriter();
> String name = request.getParameter("name");
> out.println("The parameter name = " + name);
> }
> /* Also you can redirect POST<->GET methods by doing this: */
> public void doGet(HttpServletRequest request, HttpServeltResponse
> response) {
> doPost(request, response);
> }
> }
> That's about it. To secure it, just put this stuff under secure section
> of your site.
> Or request it thru secure https protocol.
> Good luck,
> John.
> >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
> On 2/5/01, 9:28:32 AM, "David Wall" <dw...@myEastside.com> wrote regarding
> Off topic - HTTP POST example?:
> > Not exactly a Tomcat issue, but it's in the web world of Java servlets:
> > Does anybody have any code samples that would demonstrate an HTTP POST
> (I'll
> > use JSSE and really do an HTTPS POST, but I suspect the code will be the
> > same or very similar)? I've seen URL class code that does a GET, but
> > nothing that shows how to setup the HTTP body parts and encoding that go
> on
> > in a POST.
> > Thanks,
> > David
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, email: tomcat-user-help@jakarta.apache.org
> NOTICE: This communication may contain confidential or other privileged
information. If you are not the intended recipient, or believe that you
have received this communication in error, please do not print, copy,
retransmit, disseminate, or otherwise use the information. Also, please
indicate to the sender that you have received this email in error, and
delete the copy you received. Any communication that does not relate to
official Columbia business is that of the sender and is neither given nor
endorsed by Columbia. Thank you.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
> NOTICE: This communication may contain confidential or other privileged
information. If you are not the intended recipient, or believe that you
have received this communication in error, please do not print, copy,
retransmit, disseminate, or otherwise use the information. Also, please
indicate to the sender that you have received this email in error, and
delete the copy you received. Any communication that does not relate to
official Columbia business is that of the sender and is neither given nor
endorsed by Columbia. Thank you.
NOTICE: This communication may contain confidential or other privileged information. If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information. Also, please indicate to the sender that you have received this email in error, and delete the copy you received. Any communication that does not relate to official Columbia business is that of the sender and is neither given nor endorsed by Columbia. Thank you.
Re: Off topic - HTTP POST example?
Posted by John Golubenko <go...@columbiafunds.com>.
Well, do you mean POST from web-form? Then it would be:
<form name="posttest" action="http://server/servlet/ServletName"
method="POST">
Name: <input type="text" name="name">
<input type="submit">
</form>
If you asking how to handle POST's from a servlet, it would be:
import javax.servlet.*;
import javax.servlet.http.*;
public class ServletName extends HttpServet {
public void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = res.getWriter();
String name = request.getParameter("name");
out.println("The parameter name = " + name);
}
/* Also you can redirect POST<->GET methods by doing this: */
public void doGet(HttpServletRequest request, HttpServeltResponse
response) {
doPost(request, response);
}
}
That's about it. To secure it, just put this stuff under secure section
of your site.
Or request it thru secure https protocol.
Good luck,
John.
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 2/5/01, 9:28:32 AM, "David Wall" <dw...@myEastside.com> wrote regarding
Off topic - HTTP POST example?:
> Not exactly a Tomcat issue, but it's in the web world of Java servlets:
> Does anybody have any code samples that would demonstrate an HTTP POST
(I'll
> use JSSE and really do an HTTPS POST, but I suspect the code will be the
> same or very similar)? I've seen URL class code that does a GET, but
> nothing that shows how to setup the HTTP body parts and encoding that go
on
> in a POST.
> Thanks,
> David
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
NOTICE: This communication may contain confidential or other privileged information. If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information. Also, please indicate to the sender that you have received this email in error, and delete the copy you received. Any communication that does not relate to official Columbia business is that of the sender and is neither given nor endorsed by Columbia. Thank you.
Off topic - HTTP POST example?
Posted by David Wall <dw...@myEastside.com>.
Not exactly a Tomcat issue, but it's in the web world of Java servlets:
Does anybody have any code samples that would demonstrate an HTTP POST (I'll
use JSSE and really do an HTTPS POST, but I suspect the code will be the
same or very similar)? I've seen URL class code that does a GET, but
nothing that shows how to setup the HTTP body parts and encoding that go on
in a POST.
Thanks,
David
Servlet destruction ploicy
Posted by Tony Montgomery Smith <to...@compuserve.com>.
Is there a policy in Tomcat/Apache for destroying servlets when resources are
tight? And, if so, can the installer control the policy?
Regards
Tony
Re: linking a static mod_jk with Apache
Posted by Jan Labanowski <jk...@osc.edu>.
http://w6.metronet.com/~wjm/tomcat/2000/Sep/msg00794.html
On Mon, 5 Feb 2001, Rouiller Samuel wrote:
> Hi,
>
> I want to use Apache and Tomcat together. However, I need to build Apache
> statically due to a thread problem with the OCI library. Hence my question:
> Is it possible to compile mod_jk and link it statically with Apache instead
> of using DSO's. I am particularily interested in mod_jk because it should
> have a better support for SSL that mod_jserv.
>
> Any help will be very appreciated,
> Thanks,
>
> Samuel
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
>
Jan K. Labanowski | phone: 614-292-9279, FAX: 614-292-7168
Ohio Supercomputer Center | Internet: jkl@osc.edu
1224 Kinnear Rd, | http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163 | http://www.osc.edu/