Raspberry Pi Java Web (http) Server
Welcome to Raspberry Pi Java Web Server.
This java web server's program is written by fully java code,
then you can have a java program (class or java main program) excute directly
on the Raspberry pi machine from a remote PC browser.
Of course, html files and image files viewing are able.
But, viewing the html files and image files are not an main purpose.
You can easily develop a java cgi program on a developper machine and easily run java cgi program on a Raspberry pi machine.
and develop a java program to access to Raspberry pi hard wear,such as GPIO.
and can easily establish Server and Client java program.
And,perl cgi excution is available (v1.4 update 2014.1.26).
Above,java class pre loading is supported (v1.5 update 2014.1.30).
I think, class pre loading is a little bit faster than other.
Java http server's setting is very simple and prepare of starting is easy.
The interface between Java http server and java cgi program is very simple and easy.
Target Server machine is Raspberry Pi (Raspbian).
Developping Server machine
CentOS 5.X , Eclipse 4.3 and jdk1-7.
Developped and written by Net-Mall Tosa.
download
Including some java cgi samples and a deamon start shell script.
1. Hello java cgi
2. Led blinking java cgi
3. Temp sensor java cgi
4. Shutdown java cgi. You can shutdown Raspberry pi machine from PC browser
(appended 2014.1.14).
Edit and change workspace-raspi/nishi-test/src/Shutdown_cgi_mod.java,before compile.
private String yid="xxxx";
private String ypass="xxxx";
5. init.d start deamon shell script (http_pid) (appended 2014.1.14).
$sudo service http_pid start | stop
Please refer to readme.txt and how-to-deamon.txt.
change history
2014.1.14 v1.0
first release
2014.1.21 v1.1 update 2014.1.21
java-cgi(main program) loader bug fix.
a post data will be passed to java-cgi program correctly.
2014.1.23 v1.2 update 2014.1.23
perl-cgi loader built in.
2014.1.25 v1.3 update 2014.1.25
perl-cgi CGI.pm,cgi-lib.pl are available.
2014.1.26 v1.4 update 2014.1.26
1. perl-cgi Cookie is available.
2. server.conf appended
# cgi-bin error log file
# if undefine,the error's log are put to /dev/null
#error_log=/home/nishi/workspace-raspi/net/cgi.log
2014.1.27 sample program update
1. MyLed_cgi.java
2. Shutdown_cgi_mod.java
2014.1.30 v1.5 update 2014.1.30
built-in java class (class pre loadding) excuting is available.
Please refer to how-to-built-in-class.txt
2014.2.2 v1.6 update 2014.2.2
java-mod(java class) loader puts a error's cause to error-log
when child's class gets error.
Please refer to server.conf.
2014.3.2
fixed http_pid(deamon service start shell) error from insserv.
runlevel=3 4 5
2015.2.15 v1.7 update
php script is available.
see server.conf
#PHP-cgi support -- v1.7
2015.3.2 v1.8 update
java-cgi(main program) interface is changed.
keep-alive connect is available.
see server.conf
#keep-alive option --- v1.8
#buffer option ---- v1.8
2015.10.21 v1.8.1 update
Bug fix.
Some browser ,such as android google sends a http request with no data sometime.
v1.8 hangs up when receives its http request with no data.
v1.8.1 has been fixed.
After all,I think,its http request with no data is keep-alive probe packet,isn't it?
2015.10.25 v1.8.1 update
Bug fix.
Attention!
Please use in private network(Exp. 192.168.1.X)
and private use only.
This program is non secureable and not sufficiently considred about Thread Safe.
Never use as open server,and never in open network.
Thank you!
Net-Mall Tosa.
Kochi,Japan.
e-mail: non@netosa.com
Date:2014.1.15