use web frameworks in netbeans - netbeans

I am using Netbeans 6.9.1 in ubuntu 10. I have installed everything in my netbeans, apache, glassfish, c/c++, etc, ...
but I have a problem for using frameworks, if I want to create a web application and user Spring or JSF or struts framework, none of them are enable, and I cant use this option in netbeans, how can I enable the them?

I had the same problem a few days ago. I'm on ubuntu 10.10 and I was using openJDK. I switched to the sun jdk and it solved the problem. I'm not sure why it did but it could help you :)

It looks that the J2EE module isn't enabled.
so try to create a new project and select web application in the menu it will enable that module and then you can choose between frameworks even String or Struts.

Related

Eclipse 2019 12 lack of Tomcat 9.0 in Runtime Environment

I need to develop simple servlet using Tomcat 9.0, but once I try to add it as my Runtime Environment it does not show on the list of available ones. I am using latest version of Eclipse, and I have installed JST Adapters, Java EE Developer Tools and Eclipse Tomcat Plugin 9.1.4. What do I do in order to be able to see and use tomcat 9.0?
The only answers to this question I found were that I'm possibly using old verion of IDE or lacking the plugins I installed already.
Does anybody know what could be the problem here?
What could the problem be? The second one. You need the JST Server Adapter Extensions feature.

JSF and Richfaces on JBoss AS 4

I need to develop a presentation layer for an existing Java EE application running on JBoss AS 4.2.1.GA. I have been reading on JSF, Facelets and RichFaces and tried a few examples - some things worked but others didn't because of the limitations of library versions I used, considering the outdated JBoss.
Can someone recommend the direction I need to be heading to get this done as quickly as possible by using the mentioned server? By this I mean the Eclipse tool (WTP, JBoss Tools, ...), type of project, dependencies, ... Also, to shorten development time, maybe also use JRebel?
I know I would be better off using the latest server, but unfortunately it is not an option.
Also, I have installed JBoss Tools for Eclipse Indigo, but for creating RichFaces Project, it requires JBoss EAP 6 or AS 7.1.
I had created applications using JSF 1.2, RichFaces 3.3.3, JBoss Seam 2.0.2 (not required) for JBoss AS 4.2.2.GA. For development was used Eclipse (3.4/3.5) IDE for Java EE Developers. Version of Eclipse is not important. Yes, you need WTP. In my projects seam-gen was used for generating project skeleton. If you don't use Seam you can create Web project.

Use Tomcat server with Hibernate and Springsource Tool Suite?

I just installed Springsource Tool Suite as a plugin to eclipse kepler. I need to develop database-driven-web applications with it. I have thought I could do that using hibernate, but the eclipse STS plugin that I found for hibernate seems to only work with jboss server. I want to work with tomcat 7 server. Can someone suggest a good way to use hibernate with STS eclipse and tomcat? Or is there a better way besides eclipse to do database integration with STS eclipse and tomcat? Links to download tools, and to modern tutorials with the current versions of each tool, would be greatly appreciated. I just created a new Spring MVC project using the template in STS eclipse kepler. It would be nice to have tutorials and tools that work with that toolset. Even a fully working database-driven web application sample code to study.
Your requirements as listed below:
Spring Tools Suite : http://www.springsource.org/downloads/sts-ggts (Choose the appropriate version)
For Tomcat 7 to be used on STS , you will need to download it from this link: http://tomcat.apache.org/download-70.cgi
Update to JDK 7. Link: http://www.oracle.com/technetwork/java/javase/downloads/index.html
To setup tomcat 7 in Spring Tools Suite (essentially Eclipse configured for Spring) use this link : http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat-7-with-eclipse.html (Follow the same procedure for STS)
You will also need to install a DBMS. Try using MySQL . Download it from : http://dev.mysql.com/downloads/mysql/
Also if you decide to use Eclipse for Spring (I do.. :P ), use this : http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/keplerr
If you decide to use Kepler, you will need to install STS plugin for Kepler. Try: http://marketplace.eclipse.org/content/spring-tool-suite-sts-eclipse-kepler-43#.UhwuRNJkOSo
Try the following link for your first project: http://www.mkyong.com/spring/maven-spring-hibernate-mysql-example/
EDIT: As a developer it is very essential to know what is the standard way of implementing a Spring+ORM application. It's practice to to include Maven as a dependency management tool. Follow the links:
Download Maven: http://maven.apache.org/download.cgi
Setup maven in Eclipse : Setting up new Maven In eclipse
Link to website using maven : Just Google.. :P
As for the no Maven part, try understanding why actually is maven used. Follow the link: http://www.tutorialspoint.com/spring/spring_environment_setup.htm , to setup a spring envirnoment without maven. When you use Hibernate, just add the necessary jars to WEB-INF/lib folder. As simple as that.
Hope it helps. :)

Is it possible to integrate Glassfish support into Liferay IDE yet?

I am looking for a bit of Liferay/Glassfish assistance here.
I am currently using a Liferay 6.0.6 portal running on Glassfish 3.0.1 and developing in Eclipse 3.7 (Indigo). I have downloaded the Liferay IDE for Eclipse as well.
The trouble I am having is in actually developing in Eclipse against a Glassfish server. I cannot create an actual Liferay project in Eclipse because the wizard requires me to specify a Liferay-Tomcat runtime environment.
Now I realize that this is the only server that is supported for the Liferay IDE as it is clearly documented in multiple places on the Liferay website and various forums around the web. However, I seem to recall one site (which, of course, I didn't bookmark :/ ) that gave instructions on a workaround for using Glassfish within the Liferay IDE. I believe it had something to do with creating the initial project as a Tomcat project, then going behind the scenes and changing some configuration files' Tomcat references to point to my Glassfish server.
I have set up my Liferay SDK environment correctly, including the build.username.properties file. I have this file pointing to my Glassfish server.
#
# Specify the paths to an unzipped Glassfish bundle.
#
project.dir=C:\\DEV\\myworkspace
app.server.type=glassfish
app.server.dir=${project.dir}\\..\\bundles\\liferay-portal-6.0.6\\glassfish-3.0.1
app.server.deploy.dir=${app.server.dir}\\autodeploy
app.server.lib.global.dir=${app.server.dir}\\domains\\domain1\\lib
app.server.portal.dir=${app.server.dir}\\domains\\domain1\\applications\\liferay-portal
However, everytime I try to do a deploy through Eclipse...
...this build.username.properties file gets overwritten with Tomcat settings from the runtime environment.
app.server.type = tomcat
app.server.dir = C:\\DEV\\bundles\\liferay-tomcat-6.0.6\\tomcat-6.0.29
app.server.deploy.dir = C:\\DEV\\bundles\\liferay-tomcat-6.0.6\\tomcat-6.0.29\\webapps
app.server.lib.global.dir = C:\\DEV\\bundles\\liferay-tomcat-6.0.6\\tomcat-6.0.29\\lib\\ext
app.server.portal.dir = C:\\DEV\\bundles\\liferay-tomcat-6.0.6\\tomcat-6.0.29\\webapps\\ROOT
Is there somewhere else that I need to make a change in order to get Eclipse to recognize my Glassfish server?
Any help or tips would be greatly appreciated.
It is not currently possible to use a Liferay+Glassfish bundle directly as a runtime or server adapter in Eclipse with the Liferay IDE plugins. As you pointed out the only runtime and server adapters for Liferay IDE are the tomcat bundles. However, you can still use Liferay IDE to develop with Glassfish by using the following receipe with version 6.0.6 and current version of Liferay IDE.
Download Liferay+tomcat bundle
Configure it as a Liferay runtime
Create the project pointing to Liferay runtime
Go to Window > Preferences > Liferay > Installed SDKs, switch "update build.properties" option to Never
Launch Glashfish externally using startup script
Modify the build.properties in your SDK to point to Glasshfish as runtime
For deployment use the SDK deploy action just as you showed and it should be deployed to glassfish.
This should work for now. In the future, we will be adding support for Glassfish server to our Server Manager plugin that can be using with Liferay IDE and Liferay 6.1 for remote deployment and development, so it will work just like a local tomcat instance except it will be remote Liferay running on glassfish or jboss, or whatever you like. But right now the Server manager plugin in 6.1 beta4 only supports Tomcat6/7 and Jboss7. We hope to add Glassfish very soon.

What's the ideal setup for a quick turnaround in Java EE development?

I'm currently struggling with the project setup while implementing a Java EE 6 application with Eclipse Indigo and JBoss 6. The application server and the IDE is pretty much set in the project. Maven 3 is used and was the base for the setup by using the WELD archetype and creating a WAR.
Now, the problem is, that I'm very disappointed about the development turnaround. I don't have a working automatic redeploying within eclipse and often need to restart JBoss since it gets confused with the new publishing and then is not able to redeploy correctly. This is very frustrating and time consuming. (Plus I feel the smirks behind me from the guys preferring script languages.)
From earlier projects we were using Seam 2 and the project created by seam-gen came with a somewhat decent republishing, although I still had to do a manual application restart whenever I changed Java classes. Then, from playing around with Netbeans 7 and the integrated GlassFish 3.1 I found that automatic redeployment was working ok. And since Java EE 6 is very wide spread, I assume, there must be a better setup than I have now.
So with this post I hope to get some more insight in having a good project setup for fluent development of Java EE 6 based WAR projects on JBoss and eclipse - who can share some best practices?
Thanks a lot!
You should use JBoss Tools plugins for Eclipse. JBoss Tools 3.3M2 is compatible with Indigo and JBoss AS 7 (which is 10 times faster than JBoss 6 for redeploy).
Regarding an equivalent to Seam Gen with CDI, you should really take a look to Seam Forge which is included in JBoss Tools 3.3 now.
Finally I'm using Jrebel to reload class and configuration without restarting the server. But for now it doesn't work yet with JBoss AS 7, so if you stick with JBoss AS 6 it's a goof combination.
This might not be the answer to your question, but if you want Java and fast turnaround look at http://www.playframework.org/ your script colleagues will be astounded.
For Eclipse to work well, use Eclipse Java EE edition and then add the JBoss server adapter.
The usual WTP-tooling then works for automatic deployments etc.