Converting jsp to servlet in spring mvc and installers for java webapplication
I i have developed a java web application using spring mvc and used jetty server, its a intranet application where i want to distribute it to 开发者_如何学Pythonthe end user in a form of binary format where user can install the application using installers(please suggest the which one will be suitable ) for windows platform, my other requirement is i dont want the end user to see the jsp code.
As Brian stated, jsps are converted to servlets so precompiling the jsps would do the trick. There was a question on packaging. I have also heard that winstone is a light weight container. To elaborate the other points, resources placed under WEB-INF are not exposed directly to the end-user (cannot be accessed via URL, static resources like images and css need not go into WEB-INF). So make sure you place everything but the welcome page under WEB-INF. If you are concerned about user's ability to decompile the code, then obfuscating the code may help. This would work if your jsps use custom-tags (the standard and recommended practice IMO)
For your JSP issue, note that you can precompile JSPs. Here's an Ant task to do this.
For the installer, izPack works well. It's a Java application so your users will require a JVM pre-installed. I'm guessing that your application is a standalone which incorporates a Jetty server (i.e. a simple .jar file) and izPack works very well for this scenario.
The installation packager works with both Ant and Maven, so hopefully it would fit easily into your build mechanism.
精彩评论