Web server java library? - java

I m looking for a simple java library which would let me make a java web server and share some files. Is there any libraries which would let me achieve this?

Use jetty - the lightweight web server and servlet container.

There is a host of different web servers which all can do what you want (provided it just is allowing users to download files).
A good, small library with a simple-to-get-started method, is the Acme Laboratory Java pages.
http://acme.com/java/software/Acme.Serve.Serve.html
serves the current directory without any fuzz.

You can directly use an Apache WebServer setup for this.

Related

Monitor apache james mail server with javaSimon

I would like to montior a running james server with java simon.
Following the documentation I would need a war application already running so I can just register the JavaSimon Console Servlet.
That is great and works wonderful with war applications, but since james is a jar, how could I integrate both? Is there a way james deploys internally a servlet container? I saw some discussions about it in the mailing list, but I don't know the current status.
Many thanks.
Is there a way you can add something into a web.xml? Does james server provide any kind of web interface? If not then it is difficult to use Java Simon servlet - you'd have to find a way how to start some embedded web server in it.
If there is a web application you can hook to, use https://github.com/virgo47/javasimon/blob/master/console-webapp/src/main/webapp/WEB-INF/web.xml as a template and instead of the javasimon-console-webapp artifact use javasimon-console-embed that just provides the classes (servlet, etc) and all the resources. WAR project is really just a WAR wrapper, all is in that embed project.

Embedable Java-based HTTP server with (PHP) scripting support

For my Java project I need to embed a web server to provide various web pages to the user. Until now we used the "official" com.sun.net.httpserver.HttpServer class, which basically works fine.
However, now we want to extend our application in order to not only serve static HTML pages via the embeded HTTP server, but also dynamic content (PHP if possible).
Any recommendations?
EDIT: Nevermind, I found it quite easy to integrate Jython within my Java application :)

How to run jar Files in web Application

Now I have two .jar files: one is a chat Client and the other one is the chat Server. They are running fine on my desktop application, but now I want to upload them to run on my website. What is the best method for doing this? I have the following files:
chatclient.jar
chatserver.jar
Can some one please advise on how to put them in my web page without having to download them when a user clicks on them?
You do not provide enough information.
What would you like to achieve?
What technologies are you using inside the JARS?
Why not package the server jar with a web application ?
Is your client a desktop application, if so, why not to put it in the client's classpath?
Maybe consider having the client implemented in JavaScript using jQuery for example and some web sockets technology,
or maybe using some java web framework or tookit like GWT or Apache Wicket?

CMS external upload of files

I am looking for a java based CMS that exposes an API for external file upload.
So for instance I have a Tomcat server with a running CMS. I also have a (standalone) client that needs to add content to the CMS automatically (without user interference).
I already looked into Liferay (using Jackrabbit) but there is no way to upload documents/files from a client.
Does anyone know of a java CMS where this is possible ?
Thanks!
Coenos
If you are ready to take time in coding then you could make use of Liferay webservices to create a client yourself. Liferay exposes its core api as web service, using which you can do most of the things. To see the list of services that Liferay exposes check this url
http://localhost:8080/tunnel-web/axis
Replace localhost:8080 with yours.
To know more about this check out this wiki link
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Web+services+-+Manage+Users,+Organizations,+User+Groups,+and+Roles+via+SOAP

Migrating from custom web server to apache web server

We had our own custom web server(written in java) built in 2005. We are thinking of moving to apache web server. Does anyone know any pointers about this process?
What is your code base in? If it's also in java then you will need a middle layer to actually run your applications, like tomcat.
Why do you want to move to apache. For a java code base you will be adding a layer of complexity. However, if you current server is broken or not scalable then by all means switch.
Here is an article on setting up tomcat and apache.
http://www.jajakarta.org/tomcat/tomcat3.2-4.0/tomcat-3.2.3/doc/tomcat-apache-howto.html

Categories