- REST is a software architecture “style”;
- Servlet is a server-side technology.
You can, for example, implement REST-like services using Servlets.
- Servlets are Java specific but RESTful web services are not.
- Servlets are API but RESTful is not.
- RESTful web service can use Servlets as there implementation but vice versa is not true.
- Servlets can run in Servlet container only but RESTful services can run in web container as well.
- RESTful talks about Resources/Entities/Verbs and gives you more Specific way to use the services i.e There is clear explanation on the usage of HTTP verbs.
- Request handling in both is totally different e.g. Servlets are multi-threaded inherently but RESTful services are not.
- If you want to share the RESTful services with other teams/client/public to consume there are plenty of Document tools which can generate documentation for your REST services (e.g swagger) but you won’t find that kind of documentation tools with Servlets.
There are two flavours of webservices 1) SOAP based 2) RESTful webservices.
Difference between servlets and soap based webservices: i) these webservices can’t be directly accessed through browser. ii) We need not to write webservices prototype separate, which is generating wsdl(which describes webservices using xsd), it can be published to consumers of webservices iii) soap ws are introduced to easily support SOA(Service Oriented Architecture)
Difference between servlets and restful webservices: i) Even though restful webservices directly works on http/https protocal, it provides some other web methods in addition to get, post are put, delete. Which allows to write db operation based structured code easily. ii) As restful webservices allows for pathparameters apart from query parameters, we can easily write class level and method level convenient operations-code. iii) we can use postman like browser plugins to easily check rest-api’s. We can easily add headers, body parameter, selecting different methods, content type along with request to required restful webservice under an URL. iv) we can also provide security to rest-webservices easily through header section of http request msg’s
In this article, we’ll go over an overview of Artificial Intelligence (AI) libraries in Java.
Since this article is about libraries, we’ll not make any introduction to AI itself. Additionally, theoretical background of AI is necessary in order to use libraries presented in this article.
AI is a very wide field, so we will be focusing on the most popular fields today like Natural Language Processing, Machine Learning, Neural Networks and more. In the end, we’ll mention few interesting AI challenges where you can practice your understanding of AI.
2. Expert Systems
2.1. Apache Jena
Apache Jena is an open source Java framework for building semantic web and linked data applications from RDF data. The official website provides a detailed tutorial on how to use this framework with a quick introduction to RDF specification.
2.2. PowerLoom Knowledge Representation and Reasoning System
d3web is an open source reasoning engine for developing, testing and applying problem-solving knowledge onto a given problem situation, with many algorithms already included. The official website provides a quick introduction to the platform with many examples and documentation.
Eye is an open source reasoning engine for performing semi-backward reasoning.
Tweety is a collection of Java frameworks for logical aspects of AI and knowledge representation. The official website provides documentation and many examples.
3. Neural Networks
Neuroph is an open source Java framework for neural network creation. Users can create networks through provided GUI or Java code. Neuroph provides API documentation which also explains what neural network actually is and how it works.
Deeplearning4j is a deep learning library for JVM but it also provides API for neural network creation. The official website provides many tutorials and simple theoretical explanations for deep learning and neural networks.
4. Natural Language Processing
4.1. Apache OpenNLP
Apache OpenNLP library is a machine learning based toolkit for the processing of natural language text. The official website provides API documentation with information on how to use the library. Here is an Introduction to Apache OpenNLP.
4.2. Stanford CoreNLP
Stanford CoreNLP is the most popular Java NLP framework which provides various tools for performing NLP tasks. The official website provides tutorials and documentation with information on how to use this framework.
5. Machine Learning
5.1. Java Machine Learning Library (Java-ML)
Java-ML is an open source Java framework which provides various machine learning algorithms specifically for programmers. The official website provides API documentation with many code samples and tutorials.
RapidMiner is a data science platform which provides various machine learning algorithms through GUI and Java API. It has a very big community, many available tutorials, and an extensive documentation.
Weka is a collection of machine learning algorithms which can be applied directly to the dataset, through the provided GUI or called through the provided API. Similar as for RapidMiner, a community is very big, providing various tutorials for Weka and machine learning itself.
5.4. Encog Machine Learning Framework
Encong is a Java machine learning framework which supports many machine learning algorithms. It’s developed by Jeff Heaton from Heaton Research. The official website provides documentation and many examples.
6. Genetic Algorithms
Jenetics is an advanced genetic algorithm written in Java. It provides a clear separation of the genetic algorithm concepts. The official website provides documentation and a user guide for new users.
6.2. Watchmaker Framework
Watchmaker Framework is a framework for implementing genetic algorithms in Java. The official website provides documentation, examples, and additional information about the framework itself.
6.3. ECJ 23
ECJ 23 is a Java based research framework with strong algorithmic support for genetic algorithms. ECJ is developed at George Mason University’s ECLab Evolutionary Computation Laboratory. The official website provides extensive documentation and tutorials.
6.4. Java Genetic Algorithms Package (JGAP)
JGAP is a genetic programming component provided as a Java framework. The official website provides documentation and tutorials.
Eva is a simple Java OOP evolutionary algorithm framework.
7. Automatic programming
7.1. Spring Roo
Spring Roo is a lightweight developer tool from Spring. It’s using AspectJ mixins to provide separation of concerns during round-trip maintenance.
Acceleo is an open source code generator for Eclipse which generates code from EMF models defined from any metamodel (UML, SysML, etc.).
Since AI is very interesting and popular topic, there are many challenges and competitions online. This is a list of some interesting competitions where you can train and test your skills:
In this article, we presented various Java AI frameworks which can be used in everyday work.
We also saw that AI is a very wide field with many frameworks and services – all of which can make your applications better and more innovative.
This document from Other WebSite Copied: Please search author. (Available in pdf document. )
XML Web Services related Specs - Java EE 7
Specification Version Stds. Body JSR/Url
JAX-WS 2.2 JCP 224
Web Services 1.3 JCP 109
WS Metadata 2.1 JCP 181
JAXB 2.2 JCP 222
SAAJ 1.3 JCP 67
SOAP 1.2 W3C soap
XML 1.1 W3C xml
WSDL 1.1 W3C wsdl
public static String getFileName(Part filePart)
String header = filePart.getHeader("content-disposition");
for(String headerPart : header.split(";"))
return headerPart.substring(headerPart.indexOf('=') + 1).trim()