Posts

Showing posts from March, 2017

Embedding tomcat server into an application

Image
What is an embedded server? A web application runs on a web server, usually they are packaged in a WAR file and deployed in a server container like Tomcat, JBOSS or GlassFish. However embedded servers provide an interesting alternative. Instead of deploying your app in a server, the server is embedded inside your application The result is a standalone application packaged in a jar file and that could be executed from a command line. To run an embedded tomcat server we just need following jars tomcat-embed-core tomcat-embed-logging-juli Find this project on Github https://github.com/javacodenet/embeddedTomcatDemo pom.xml EmbeddedTomcatStarter.java application.properties Output

Generate PDF From XML Or Java Object Using Apache FOP

Image
What is FOP(Formatting Objects Processor)? Formatting Objects Processor (FOP, also known as Apache FOP) is a Java application that converts XSL Formatting Objects (XSL-FO) files to PDF or other printable formats. Find more details on below link: https://xmlgraphics.apache.org/fop/ Find this project on Github https://github.com/javacodenet/ApacheFopDemo pom.xml ApacheFOPDemo.java Books.java Book.java template.xsl book.xml Output