We had a lot of people asking how to put JSP over Grizzly, but we didn't have an implementation or a working sample to show them.
It couldn't stay like that forever ... so I took a little of my spare time and I got something for you :)
I'll show you how to compile your JSP with Jasper and use them with GrizzlyWebServer.
I use Jasper that came with Tomcat 6. You will have to include some...
I want to show you how you can block IPs in your Grizzly server. I pretty sure that you can find lot of reasons why you would want that.
I'll use a list from http://iblocklist.com/ as input for my demo.
What you have to do to close the connection from client that isn't wanted is pretty simple.
[prettify] Controller controller = new Controller(); ...
In my previous post, I covered Apache Velocity, Eclipse JET/JET2.
I got a suggestion to look the framework FreeMarker.
FreeMarker look like Velocity. You can even find converters : Velocity -> FreeMarker.
I'll describe in this part how to create the same output but using FreeMarker.
Take a look at the generate method.
[prettify] public void generate...
I wanted to use a template as input for my Code Generator, but the problem was to find one that worked in a stand alone mode, not a web based one.
In my research a found few that do what I wanted. Apache Velocity and Eclipse JET/JET2.
I'll explain in details theses Template Code Generator with a little application. I'll create a web page as output.
Here the specs for the demo.
- The web page...