Is it possible to precompile jsp into eclipse? - eclipse

The title is pretty straightforward.
I would like to know if there is any possibility of seeing the compiled jsp (the servlet generated) directly into eclipse. Without deploying onto any server.

If you work with JSPs, I suggest to buy MyEclipse since it can compile JSPs and show you problems (compile errors, etc) in the editor. Eclipse 3.6 also works but JSP support is much better in MyEclipse.
If you just want to compile the JSPs, then have a look at Maven. With the help of the JSPC Plugin, you can compile the JSPs into Java code and then add this source folder to your project.
For completeness: There is an ancient Tomcat plugin along with the UQBar Extension. That will configure Tomcat to compile the JSPs into a work folder in your project as you use them (i.e. this is not precompilation but the usual on-the-fly-JSP-compilation).

Related

AEM error on real time

Is there a way to configure AEM into an IDE like IntelliJ,Eclipse...
So that the IDE shows the errors on my project before I compile it even if I put it outside the source folder like for example the components created.
If possible both the .java and .jsp
I'm not entirely sure what you mean by outside the source folder, but have you taken a look at adobe's documentation?
They have instructions for IntelliJ + AEM with Maven. It also instruct on jsp support as well. It's for 5.6.1 but it should be valid for 6.x as well.
https://docs.adobe.com/docs/en/cq/5-6-1/developing/developmenttools/howto-develop-aem-projects-with-intellij.html
Here's one for Eclipse
https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html
They also have a more generic set of instruction
https://docs.adobe.com/docs/en/cq/5-6-1/developing/developmenttools/how-to-build-aem-projects-using-apache-maven.html#How-To%20Work%20with%20JSPs
Yes, you can maintain CRX data(AEM folders like /etc, /apps, /content, etc) in an IDE like eclipse. This will help you iron out all the compilation errors using features of IDE. Make use of this eclipse plugin called vaultclipse. You can install it from eclipse marketplace.
There is also another plugin called AEM plugin, details on how to use it here.

Eclipse Plugin - one of the plugin projects in "features" won't compile

My plugin is built by two plugin projects (two plugin projects are in the same workspace).
One of them is an ordinary plugin which has toolbars etc. The other one is a Scala-based XML interpreter.
Everything runs fine and works great while I use "Run/Debug" as "Eclipse Application".
But, after I tried to pack it as a Feature project then Build it with and Update Site Project, the auto-generated JARs are wierd: the content of the ordinary plugin JAR is classes, which is correct; however, the other one (in scala), Eclipse packed the JAR with the original file - filename.scala in the JAR!
In other words, the plugin project didn't get compiled after Build(in Update site project by putting Features in).
But it worked fine when I used "Run" as "Eclipse Application".
Does anyone know how to fix this? Or any hint?
I've tried this but it didn't fix my problem.

Eclipse approach vs. Netbeans for GWT compiler

In eclipse we have separated button for compiling GWT project. so we can build our project(Dynamic WEB) without GWT compiling.
But in NetBeans we dont have this approach! If we build web project at first GWT will be compiled. so, How we can change this approach like eclipse ( I want to compile GWT separately in netbeabs)
RGDS
In Netbeans, you can use .nbm files first. And then you have to change gwt.properties file in line:
gwt.install.dir=C:/gwt-windows-2.4.0
in Windows, and
gwt.install.dir=/home/wanto/GWT1.7.1/gwt-linux-2.4.0
in Linux.
Before doing that, you must download GWT from Google (about GWT for Windows or GWT for Linux).

tomcat eclipse and WTP with maven

I have a maven multi-moudule project. I tried to use WTP with Eclipse 3.6 and i can't figure out how to configure my project so everything will work right with tomcat. Sometimes not all the classes are being published or/and the provided scope jar are deployed to lib dir (even though they are not supposed to). I know there are alot of sites which explain how to do it. But still i find it hard to deploy my multi module project on tomcat 6 server bundled in eclipse. Anyone has easy way? Thanks,
EDIT: I downloaded Eclipse 64bit and Maven Integration for Eclipse\WTP and then this seems ok. But still i can't understand why it doesn't work on 32bit.
look in the plugin marketplace for a free plugin called m2e-wtp. That will take care of the provided scope issues. As for classes not being deployed, the usual places I look at are the deployment assembly and/or Java Build Path. Make sure that the entries (and the dependent modules) are all there and located in the right place.

JavaRebel with a Multi-module Enterprise Project in Maven

Does anybody have experience working with JavaRebel, specifically for a large web application built using Maven? There is a JavaRebel plugin for Maven that seems under-documented, does anybody have comments on how it works, can you really update one class in a Multi-module Enterprise Project and have it "automagically" change on your Server?
Are there any issues with different IDEs and this setup? For example NetBeans will not let you compile one class at a time in a Maven project (from what I can tell).
Disclaimer: I work for ZeroTurnaround.
JRebel (formerly JavaRebel) installation involves the application configuration file "rebel.xml" and modifying the container startup command line.
The Maven plugin is used to generate the "rebel.xml" file, that is used by the JRebel agent running in the container to find the files in the workspace. This allows to use IDE building to compile .java files and skip the Maven build process, as the changes to files will be picked up from the workspace. However as it relies on the IDE to compile the classes, it does depend on the IDE ability to compile efficiently. I know for sure that Eclipse will compile classes one at a time and am fairly sure you can configure NetBeans and IntelliJ IDEA to do the same.
In addition to the Maven/rebel.xml configuration you also need to configure the container startup command line. You may also need to install and IDE plugin or do some additional configuration to have the best expirience with JRebel. Following through the steps of Installation manual ensures that.
Hope this helps.
Disclaimer: I've not actually used this plugin myself.
This tutorial implies that JavaRebel works well with Eclipse 3.4. If you are also using m2eclipse it should work ok with Maven projects as well (as long as you ensure that Maven and Eclipse are compiling to the same target folder so the Eclipse incremental compiler can be used to modify the class file).
According to this post, you should configure the javarebel-maven-plugin to generate the rebel.xml (used to mount external folders to the application classpath). There's also a general installation guide you may find useful.