Questions tagged [nanohttpd]

NanoHttpd is a light-weight HTTP server designed for embedding in other applications. NanoHttpd has been released under a Modified BSD licence.

The first version of NanoHttpd was published in 2003. Originally, its author was looking for:

"a small enough, embeddable and easily modifiable HTTP server that I could just copy and paste into my other Java projects."

Later, another team took the project and fixed a number of bugs, moved the build to maven and pulled out the samples from the runtime JAR to further slim it down.

The two projects pooled resources in early 2013, merging code-bases, to better support the user base and reduce confusion over why two NanoHttpd projects existed.

You can view the project on GitHub: https://github.com/NanoHttpd/nanohttpd.

247 questions
0
votes
2 answers

NanoHTTPD: How do I add it to a current Java eclipse project and use it?

This is my first time with Java and Eclipse. I started a brand new Java project and I want to import/add NanoHTTPD into it. How do you this? This is NanoHTTPD's site: http://nanohttpd.com Thanks! Edit Lesson learned, be specific or you get…
user3594616
  • 41
  • 1
  • 5
0
votes
1 answer

NanoHttpd leaking threads

Does anyone encountered the issue with NanoHttpd leaking threads? The thing is the library creates a new thread for each incoming request and while I see response for those requests the internal thread that was running requests processing is never…
Roman Minenok
  • 9,328
  • 4
  • 26
  • 26
0
votes
2 answers

how to add http server inside android applicaton and access from mobile browser

I want to add a http server inside the android application. I have tried NanoHTTPD server taken from https://github.com/NanoHttpd/nanohttpd. So I am able to run this http server as simple java class in my desktop . and able to access it from…
neeraj t
  • 4,654
  • 2
  • 27
  • 30
0
votes
1 answer

gzip compression wont work with my custom java HTTP server

No idea what i could be doing wrong here. When I try to look at the response with firebug, it's just saying that I need to reload the page to get it's source. I tried using GZIPOutputStream instead, but then it just wrote some weird chars at the…
Seppo420
  • 2,041
  • 2
  • 18
  • 37
0
votes
1 answer

Making more http requests in nanoHTTPD leads to closing server

I have a nanoHTTPD server running on my app in background, when i have like more than 30 http get requests to the server, from then server getting stopped, image loading fails. is there a limit for number of http request in server, or is the android…
yourkishore
  • 278
  • 8
  • 19
0
votes
1 answer

Android App using nanoHTTP is unable to handle page refresh

I am trying to use nanoHTTP in an Android App to serve a file index.html placed in raw directory. MainActivity.java @Override protected void onCreate(Bundle savedInstanceState) { . . . r = getResources(); is =…
Manmohan Bishnoi
  • 791
  • 13
  • 37
0
votes
1 answer

Android nanohttpd doesn't start properly

I need httpd server in my app, so I've choose NanoHttpd. I've subclassed my own server: public class StreamingServer extends NanoHTTPD { private Context mContext; public StreamingServer(Context context) { super(8080); …
user2786037
  • 495
  • 1
  • 12
  • 27
0
votes
2 answers

Android NANOHTTPD issue?

I tired to run the simple example of android with nanoHTTPD. when i run the program in emulator it shows http://xxx.xxx.xxx.xxx:8080. If i run the same program in device it shows an ip address http://xxx.xxx.xxx.xxx:8080. I tried those ip in the…
Prabhu
  • 840
  • 11
  • 28
0
votes
1 answer

Webview not connecting to nanohttpd

I am attempting to use a web view with an embedded Nanohttpd server. I can get both to work , but not with each other. I can send the WebWiew requests to other proxies that are not embedded , this works. or i can send requests from firefox to the…
Christopher Lawless
  • 1,057
  • 2
  • 12
  • 19
0
votes
1 answer

Nanohttpd in android do not serve files

i am developing a android application which uses nanohttpd to create a webserver my code do not give me any error but the server is not running because when i go to xx.xxx.xxx.xxx:8765/index.htm then it gives my no result this is my code: Please…
Prakhar
  • 2,270
  • 19
  • 26
0
votes
1 answer

NanoHTTPD stopped when I play games

I have an android application that starts a server NanoHTTPD. The problem happens when I start the server, I leave the application in the background, and I start playing a game or a heavy application. After a few minutes the server is stopped. How I…
Jonathan Toledo
  • 359
  • 4
  • 19
0
votes
1 answer

Nanohttpd in android

i want to make a android app which uses nanohttp to create a web server this code do not give me a error but when i type the ip addr in browser on port 8000 it says connection timed out please help any help will be appriciated here goes the…
Prakhar
  • 2,270
  • 19
  • 26
0
votes
1 answer

NanoHTTPD not working

hello all i am creating a web server for android with NanoHttpd and when i run it .It says that the Activity has stopped working please help what should i do. This is the code which i am using. Here goes the Code: package…
Prakhar
  • 2,270
  • 19
  • 26
0
votes
0 answers

How to test NanoHTTPD

I am new to NanoHTTPD server and Maven. I'm starting a maven project using NanoHTTPD server and im trying to test the HelloServer (set to port 8081 in HelloServer class' super call). I run the app and a NetBeans like window opens, i guess it is the…
jsky
  • 2,225
  • 5
  • 38
  • 54
0
votes
2 answers

Android http-server and german "Umlaute" post

I'm having an App with a NanoHTTPD-Server that allows editing notes via a browser. It displays a HTML-form that allows editing the note and sending it to the device. But if I type in äöü, it displays on the android "?" an in my browser…
adnidor
  • 78
  • 9
1 2 3
16
17