httpserver

How to shutdown com.sun.net.httpserver.HttpServer ?

The Http Server embedded in JDK 6 is a big help developing web services, but I've got situation where I published an Endpoint and then the code crashed and left the server running. How do you shutdown the embedded server once you've lost the reference to it (or the published Endpoint)? ...

Which java webserver is most suitable here?

Hey, I am developing a simple web application which contains these 3 components: client that uses Ajax,javascript, html to display data on the browser. Java webserver that interfaces between the client and data processing entity. data processing entity, implemented in C++. I need to decide which java webserver to use. Some options ...

General (non-server-specific) HTTP server test suite?

I'm looking for a test suite to test an HTTP server for standards compliance. The test suite should therefor not be server-specific, like Apache's HTTP server test suite. Any pointer would be greatly appreciated. Regards, Jochen ...

paste.httpserver and slowdown with HTTP/1.1 Keep-alive; tested with httperf and ab

I have a web server based on paste.httpserver as an adapater between HTTP and WSGI. When I do performance measurements with httperf, I can do over 1,000 requests per second if I start a new request each time using --num-conn. If I instead reuse the connection using --num-call then I get about 11 requests per second, 1/100th of the speed....

Does a published endpoint have a limited number of connections? [Java 1.6.0_16]

I've created a Web Service using import javax.xml.ws.Endpoint and a client that connects to it using Service.create and service.getPort. Now, everything works perfectly fine when only using a small amount of connections... But - if I launch lets say 1000 concurrent connections (Clients) to my Web Services I get the following "sometimes"...

Settings http headers in Java 6 SE httpserver

Hi, I try to publish Atom feed (generated with Rome) using Java 6 SE httpserver. For correct feed discovery in FireFox I need custom headers. This is my code: Headers headers=e.getRequestHeaders(); ArrayList<String>list=new ArrayList<String>(); list.add("application/atom+xml"); headers.put("content-type", list); e.sendResponseHead...

java httpserver printing

Hi, I'm working on a project, where users call a httpserver with some parameters (example: http://localhost:5000/asdf?test=123&amp;test2=1234). The Server should then print the parameters onto a cardprinter. Until last week i used a TCP Server socket for hosting the server and a DocPrintjob for printing. Now I try to do the same by using...

How do I deal with very large file-uploads in an Erlang web server?

So, lets say I'm writing a web server and I want to support "very large" file uploads. Lets further assume that I mean to do this via the standard multipart/form-data MIME type. I should say that I'm using erlang and that I plan to collect http packets as they are returned from erlang:decode_packet/2, but I do not want to actually coll...

Python - BaseHTTPServer.HTTPServer Concurrency & Threading

Is there a way to make BaseHTTPServer.HTTPServer be multi-threaded like SocketServer.ThreadingTCPServer? ...

Why do I get empty request from the Jakarta Commons HttpClient?

I have a problem with the Jakarta Commons HttpClient. Before my self-written HttpServer gets the real request there is one request which is completely empty. That's the first problem. The first problem is solved. It was caused by an unnecessary URLConnection! The second problem is, sometimes the request data ends after the third or fourt...

Using com.sun.net.httpserver.HttpServer for comet/cometd

I would to use com.sun.net.httpserver.HttpServer to do comet/cometd. I am wondering how tough it is to do it so that I can take the waiting connections off the thread and into some waiting queue. Also, am I correct in that it looks like it is using nio? Also, is there any better examples? I always get caught up in the terminology...

Jquery getJSON() doesn't work when trying to get data from java server on localhost

The whole day yesterday I've been trying to solve this but it's proven to be very challenging for me. I'm trying to use this JS to get information from a java application I wrote. $(document).ready(function() { $.getJSON('http://localhost/custest?callback=?', function(json) { alert('OK'); $('.result').html(json.description); ...

Mochiweb's Scalability Features

From all the articles I've read so far about Mochiweb, I've heard this over and over again that Mochiweb provides very good scalability. My question is, how exactly does Mochiweb get its scalability property? Is it from Erlang's inherent scalability properties or does Mochiweb have any additional code that explicitly enables it to scale ...

Publish git repository to remote http server

I work on a git repository where we build an php community but i need to show it somewhere so I am looking for a way to automatic upload my files to a remote http server when i push to the repository. Thanks /Victor ...

MvcContrib TestHelpers don't seem to provide a full HTTPContext.Server object

So the MvcContrib TestHelpers create mock versions of the following HttpContext HttpRequest HttpResponse HttpSession Form TempData QueryString ApplicationPath PathInfo within a fake controller when using this kind of code var _controller = new FooController(); var _builder = new TestControllerBuilder(); _builder.InitializeC...

How to silent/quiet HTTPServer and BasicHTTPRequestHandler's stderr output?

I am writing a simple http server as part of my project. Below is a skeleton of my script: from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class MyHanlder(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() ...

tIdHttpServer - EidConnClosed before sending a reply to POST

I am having trouble implementing a HTTP server with indy 10 in delphi 2007. I have set up a simple event handler for the CommandGet event. When replying to data sent using the GET method I can parse the params and send XML data back with no problems. (see code below) Download := ARequestInfo.Params.Values['dld']; Config := ARe...

Sun Java HTTPServer has a bug, how to fix it?

I'm using com.sun.net.httpserver.HttpServer in my project. However, it seems that the server leaks connections when it gets invalid data from the HTTP connection. The bug is this one: http://bugs.sun.com/view_bug.do;jsessionid=dfe841c3152d878571573bafceb8?bug_id=6946825 Now, this is reported to be fixed in version "7(b94)" - however, w...

Combine SimpleXMLRPCServer and BaseHTTPRequestHandler in Python

Because cross-domain xmlrpc requests are not possible in JavaScript I need to create a Python app which exposes both some HTML through HTTP and an XML-RPC service on the same domain. Creating an HTTP request handler and SimpleXMLRPCServer in python is quite easy, but they both have to listen on a different port, which means a different ...

Configure IBM HTTP Server 7 with WAS 7

Dear All, I've configured IBM HTTP Server 7.0 with WebSphere Portal Server 6.1.5. I'm able to access Portal without typing the port number. I need to create a Virtual Host. But this is not working. NameVirtualHost gp.testhost.com <VirtualHost gp.testhost.com:80> DocumentRoot C:/Por...