Cannot see primefaces components in visual tab of eclipse - eclipse

I am developing a Dynamic Web Project with Eclipse Indigo SR2. I am using Primefaces 3.4.2 and, when editing the .xhtml, the Visual view does not show the components properly.
I am using JBossTools and deploying to a JBoss server; I have tried adding the primefaces library both to the web-inf/lib or as a user library, but to no avail.
Google finds few results for this, most of the issues are with getting autocompletion to work (which it does correctly, btw).
Is there a way to show the visual components? I am not sure if maybe I am expecting too much, but it was a neat feature when using richfaces components.

No way, use a real browser to preview as JSF views are hot deployed on the fly.

Related

I get "Can't find any GWT Modules on this page"

I am trying to set up my eclipse with gwt and after I installed Jdk 8 and eclipse 2019-06 and gwt eclipse plugin 3.0 I created the sample project with code generated and when I try to run the sample code in GWT Development mode it gives me url http://localhost:9876 and when I open it I get "Can't find any GWT Modules on this page" Can you please help why It is giving me Can't find any GWT Modules on this page. I am assuming if I am running it in development mode I don't need to set up web server so I didn't. I didn't used gwt for long time and I am lost why it is giving me this can't find gwt module message when I load the page. Can you please help?
You still need a server, if you want to run any java code on your server. Such as code for talking to your database.
Gwt only does 2 things:
1: is is handling the client side, where it generate javascript from your java code.
2: It includes a .jar file, which can be used together with a java servlet server such as apache tomcat to serialize java objects which can then be send between the client and the server. And this .jar file will serialize all needed objects. And gwt will generate the needed javascript code.
Gwt does not itself include any http server. The address http://localhost:9876 is only used to configure gwt. It is just a page with 2 buttons to turn dev mode on/off.
The eclipse plugin does include a embeded webserver which can be used for gwt development. I have newer done this and I think that installing an independent java tomcat server is the best solution.
But if you want to use the eclipse embeded webserver you need the "Run in development mode with Jetty." - Jetty is the name of the embeded java servlet server.
Are you using the plugin from Google ?
If so, this is outdated. I advice you to use the plugin from branflake. You can find this plugin on GitHub : https://github.com/gwt-plugins/gwt-eclipse-plugin
Also on that GitHub page a lot of documentation is available. Like a link to a very helpfull YouTube playlist: https://www.youtube.com/watch?v=DU7ZQVLR5Zo&list=PLBbgqtDgdc_TqzA-qXrjgTFMC_6DKAQyT
My advice is to watch these YouTube videos to get you started. If you follow them all should be working without a problem.
I haven't used this plugin for a while since I switched to IntelliJ. But I did use it in GWT2.8.2 so it should still work fine.

What IDE (Eclipse or Aptana) and What tools i need to develop a JSP Project

I need to create a web based project where I will use java codes to do the back-end processing and database connections. So I need to write my code in JSP. I already installed tomcat.
But in Aptana i do not get the option "New Dynamic Web Project". Which i have created JSP projects previously. Any one knows how to add it or what toold i need to install?.
I'm not a fan of Aptana; in my experience it's a bloated tool that tries to do too much and does nothing particularly well. I would just get the Eclipse IDE for Java EE Developers package from http://www.eclipse/downloads and use that.

seam-gen vs eclipse seam web project

I'm trying to learn how to develop a j2ee web application but is currently figuring out what's the advantage of using seam-gen vs eclipse seam web project or vice versa.
Why would I use one over the other?
Thanks,
czetsuya
Command line seam-gen stuffs the whole application into a single project and included some files that we didn't need (6 versions of the messages file, for example, each in a differnet language).
The eclipse jboss tools seam-gen produces a bit more modular, streamlined app. It generates 3 separate projects (4 if you want a test project). It took some time to get used to it, but once I got it down, I prefer it. Additionally, when you create he project in eclipse you can leverage more easily the benefits of using those integrated tools.
You can do this with a seam-gen commandline-generated project as well by creating an eclipse project using your seam-gen project as source , but it takes some fiddling around in eclipse to get the settings just right.
My recommendation is to go with eclipse/jboss tools. If you come from a command-line centric background (as I did), the learnign curve may be a bit steeper, but in the end it will be worth it. Use the jboss tools forum for questions you have about this project.
Good luck. Once you get going with eclipse/jboss you'll find it's a great environment to work in.

Unable to publish web app: SpringSource Tool Suite problem?

I have an existing, fully functional Spring web application based on Spring 2.5.6 - developed using SpringSource Tool Suite 2.1.0.SR1.
Because I'd like to use REST I decided to upgrade to Spring 3.0.0.M4. After editing the dependencies in pom.xml and changing my code to reflect the API changes in Spring 3.0 I tried to publish my web app to a local server (SpringSource tc - a Tomcat derivate).
The result is an almost empty web app folder and therefore a non-functional app. The app's folder only contains WEB-INF/lib with all libraries required by the Maven dependencies.
After realising that something's broken, I created a new Spring MVC project (based on the default 2.5.6) and published it to the same server. No problems. I tried to adapt my project's files (.settings/*, .project, .classpath, .springBeans), but this didn't change anything.
I'm pretty lost right now. My guess is that STS doesn't handle 3.0 apps correctly. Any suggestions?
PS: I don't want to revert to 2.5 if it's not absolutely necessary. I don't need STS and tc so I don't have a problem using other tools, but it worked fine so far.
I run into this all the time using Eclipse Galileo and m2eclipse 0.9.8 and Tomcat with WTP. I think it is m2eclipse that is the culprit. The problem seems worse after switching from Ganymede. The work around is to run mvn to create the war and then copy the war contents from "target" to WTP's "wtpwebapps" directory. You can conveniently find this horribly long path by double clicking the server in the Servers view, and choosing "Open Launch Configuration" from there click on Arguments(?) tab I think and copy the catalina.home java property that is defined as an argument there.
The problem vanished with newer versions of STS. Additionally my development environment changed a bit since I posted this question, so I can't really tell what caused the problem.
For me, it looked like a weird hiccup inside STS.
Spring Tool Suite 2.1.0 claims partial support for Spring 3.0, though not for the REST features. According to the release, future releases will add full support. From the release statement:
Features
Support for milestones of Spring 3.0 including XML editing and validation, support for #Configuration and #Bean annotations
Future
Complete Spring 3.0 support including tools for developing RESTful web applications
Try deploying your app to embedded jetty. 'mvn jetty:run' with help you confirm if that there's nothing wrong with your build (that all the right manifests and deps are in place)

GWT integration in existing Java EE application

I am new to GWT. I have developed a GWT application in version-1.6.4 and it is working fine. Now I want to integrate with that project in existing Java EE application. I don't know how to go ahead.
Where to copy the GWT source code in this existing Java EE application? I am also using RPC in GWT.
Can anyone provide help on this?
GWT is just a set of javascript and HTML files, so the most basic form of integration is just to put them in a folder in the same place your as your web pages go.
One step up from there would be to integrate the gwt Compiler in with your build process. If you use Netbeans there is a good plugin called GWT4NB that will handle all of this process for you, so that when you build the WAR of your project it will build the GWT portions of it as well. There would probably be something similar for Eclipse. You could also do all this by hand using maven or ant.
You would tell the compiler where you want it to put the generated files, which again, would be in the same location you put your web pages for your WAR project. The RPC side of it will still work just fine no matter where you put the files.