I am very new to gwt and in fact I don t really understand it.
I have a web project that had already been developped. I just want to change the toolbar that requires gwt in a RichTextToolbar.java file. So I downloaded Eclipse and its gwt plugin.
In a precedent question, I had the answer that I should take thes only file RichTextToolbar from my php/html directory, put in the src folder of my eclipse web application project; then run it and finally taking back the compiled files from the war folder and put it in my php/html directory.
Now, the problem is that when I debug or run the files in eclipse, I am told to choose ant. And then I have a message that no build.xml file is found. Could anyone help?
Best,
Newben
If your intention is to compile the Java code in GWT to Javascript, then you can use 'Compile GWT Project' option under GWT menu in Eclipse.
Related
I want to replace old jar file of lucene i.e. lucene 3.6.2.jar(marked in the following figure) with new lucene 4.3.0.jar. But I am a beginner in developing Dynamic Web Project in Eclipse. So I have no idea how to do it. Each time I am opening the window of build path I see no option to modify those jar files included in Tomcat library. I am working with Eclipse Juno. Please help me to fix this problem.
If you see a jar file in Apache Tomcat libraries, it means you have it under the ${tomcat_home}/lib folder. If you want to remove it from global .classpath you should remove it from lib folder manually and then refresh your project in eclipse.
I use the GWT Version 2.5 , eclipse 3.7 and java 1.6.0_35
I am facing this problem since I manually deleted the classes in myProject/war/WEB-INF/classes . In eclipse everything looks fine, however when I compile with ant or gwt compile over eclipse it wont generate any new class in that particular folder. As consequence I receive a war file where the classes directory is empty. How can I fix it such that the classes are comming back to this folder?
Make sure the "Default Output Folder" in Project⇒Properties⇒Java Build Path points to the right place. Using built-in Ant, that's probably myProject/war/WEB-INF/classes.
Also, check "This Project has a WAR directory" in Project⇒Properties⇒Google⇒Web Application. For Ant, the path should be war.
I've already tried the options "Add folder...", "Add Library...", and "Add JAR/Folder...", but it's not working this time -- I've done this several times before without any problems.
I've also tried to add the folder / JAR file (.war-file) manually to the projects properties in every thinkable way, but still no success.
And so far, Google hasn't helped either..
Any help would really be appreciated.
(This is for a Java Web project with JavaServer Faces, using NetBeans 7.1)
Solved: I never found out what caused the problem. I ended up re-installing entire NetBeans, and re-created (a thousand times) the project I was trying to import. And in the end, I got it working.
Put the JAR file in the WEB-INF/lib directory of your web project. All JARs in the WEB-INF/lib and all packages in WEB-INF/classes are automatically in the CLASSPATH.
Can you make "Hello, servlet" work? If not, why bother with JSF? Do a simple web app successfully and build up from there.
I had this problem with netbeans, but it seems like all the answers I found are for Eclipse (I guess am wrong) as I dont see any WEB-INF/lib directoryin NetBeans, though I have a WEB-INF directory.
so here what I did.
I remove the tomcat server on NetBeans, go to C:\apache-tomcat-7.0.30\lib , put the jstl-1.2.jar file their, restart NetBeans and add a new (Tomcat) server, create a new web app, and their, I could find the jstl-1.2.jar file in the Libraries > Apache tomcat.
and for unknown reason, it worked.!
I'm using Netbeans IDE for developing a web applications, and I've some JARs available in the application server which don't need to be in the WAR (but we need them to compile and run locally).
Is there an option in Netbeans to exclude the JAR file while building the WAR file?
Select the project in the Projects explorer window.
Pick the Project Properties item from the File menu (up in the menubar).
Select the word Libraries from the list on the lefthand side of the dialog that appears.
For each jar/library listed in the Compile-time Libraries list, uncheck those that do not need to be included in your war file.
I found the problem myself. I've all the libraries under my lib folder and added them to the project class path. Since the build is copying the entire content in the project, my library is also copying even though I've unchecked the package check box against the library.
So, don't put the library in your lib folder if you want to exclude that in the WAR built.
Thanks
Santhosh
I have looked through the help documentation in netbeans 6.5.1 but cannot find anything explicit explaining how to deploy/import a war package.
I know in Eclipse, it's as easy as right clicking in the Project Explorer >> select IMPORT >> WAR FILE.
However, I still am unable to find a solution for Netbeans.
Thankyou,
Jordan
posted elsewhere, thought i might post here too.
after some googling I've found the solution and here are the steps:
(tested using apache's ode.war in NetBeans 8.0)
unzip the war file
in the unzipped folder, you will see WEB-INF/, META-INF/, etc., create a sub-folder named web in the unzipped folder.
put everything else into web (now they will be web/WEB-INF/, web/js/, ...)
go to netbeans, new project -> java web -> web application with existing sources
pretty much just press next all the way through. voilà, it's done.
I assume you don't already have an ant or maven project for your web project? If you did, you would just import a maven project or create a Web Free-Form Application and wire it up to your ant script.
I would unzip the war file, create a new web application with existing sources in netbeans and wire everything up using the wizard.
Import the war project to eclipse.
Then import the eclipse project to netbeans
If you don't have eclipse handy, just place the war file into the webapps folder of Tomcat, go to the bin folder of Tomcat and run startup. Tomcat will automatically extract the war file for you. Now go to the webapps folder and you'll find another folder there, with the same name as your war.
I couldn't find an option to import a war directly into Netbeans (strange. Perhaps someone could create this feature and submit it as a patch to Netbeans). The folder which gets extracted into the Tomcat folder can be used as the Netbeans project. It's advisable to copy it to some other folder first. Import by File > New Project > Web application with existing sources.
Eclipse has an option to export a war and include the sources with it too, so there's a chance that the source files are in the war too.