user1712095
user1712095

Reputation: 197

Whats the best way to compile a jsp project on linux?

I am doing some web apps development with apache Tomcat in Linux platform, I usually compile my web pages by running them, tracking error through TomCat's logs. Each time I am making a modification I am reloading the project throuh TomCat manager. for the beans I am compiling them and making a new war file. I wonder how are other developers compiling their jsp files? I need some feedbacks..

Thanks,

Upvotes: 2

Views: 900

Answers (2)

mindas
mindas

Reputation: 26713

As I understand, your biggest pain is having to reload the project every time.

In our project, we deal with this problem in the following way:

  • when doing development, simply copy the JSP files over to tomcat/webapps/yourapp/WEB-INF/.... Tomcat will detect the files have changed and JSPs will be dynamically compiled. The obvious benefit is that there's no need to redeploy the app.
  • when done with development, check in the code.
  • continuous integration server has the option to precompile all JSPs so if by any chance you left an error, you will get notified. If you don't have continuous integration, you can simply create a script that checks out the source code every night and attempts to statically compile the JSPs.

If you need more information on static compilation, check out Jasper documentation.

Upvotes: 1

Olivier Liechti
Olivier Liechti

Reputation: 3188

If you want a solid build process (and if you think that your apps will grow, and will be developed by a team), then maven is my recommended tool. You can use it in conjunction with NetBeans.

If you want something quick and easy - and don't want to invest the time in learning maven - then I would go with Netbeans. There is integration both with Tomcat and Glassfish.

Upvotes: 0

Related Questions