Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Add and Remove to Liferay/Tomcat Server
Add and Remove to Liferay/Tomcat Server [message #530437] Thu, 29 April 2010 16:02 Go to next message
Shelli Orton is currently offline Shelli OrtonFriend
Messages: 101
Registered: September 2009
Senior Member
Hi,

I am using Eclipse 3.5 with Java EE and with m2eclipse. I also have Liferay 5.2.3 with Tomcat installed. I set up a server in Eclipse using the Tomcat instance in Liferay (as per http://www.jroller.com/holy/entry/developing_portlets_for_li feray_in). I can start/stop the server via Eclipse and access the Liferay portal via a web browser.

Previously when I tested my webapps, I manually deployed the wars to my local Tomcat instance. But, as per the above blog, I tried to add a portlet project via right-clicking the server and choosing "Add and Remove...". I was presented with the message "There are no resources that can be added or removed from the server."

What are valid resources that can be added? I have a portlet project that has been built via m2eclipse with a war artifact. Do I have to do something to the project so that the server can find the war? Am I supposed to be able to add the project?

Thanks in advance!
Re: Add and Remove to Liferay/Tomcat Server [message #530662 is a reply to message #530437] Fri, 30 April 2010 13:10 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
sdoca wrote:
> Hi,
>
> I am using Eclipse 3.5 with Java EE and with m2eclipse. I also have
> Liferay 5.2.3 with Tomcat installed. I set up a server in Eclipse using
> the Tomcat instance in Liferay (as per
> http://www.jroller.com/holy/entry/developing_portlets_for_li feray_in).
> I can start/stop the server via Eclipse and access the Liferay portal
> via a web browser.
>
> Previously when I tested my webapps, I manually deployed the wars to my
> local Tomcat instance. But, as per the above blog, I tried to add a
> portlet project via right-clicking the server and choosing "Add and
> Remove...". I was presented with the message "There are no resources
> that can be added or removed from the server."
>
> What are valid resources that can be added? I have a portlet project
> that has been built via m2eclipse with a war artifact. Do I have to do
> something to the project so that the server can find the war? Am I
> supposed to be able to add the project?
>
> Thanks in advance!

To be added to a Tomcat server the project must contain the "Dynamic Web
Module" facet (see the Project Facets page in the project's Properties
dialog) and the version of the facet (which corresponds to the version
of the Servlet spec) must be compatible with the server. For example, a
project with a "Dynamic Web Module" facet with a version of "2.5" could
not be added to a Tomcat 5.5.x server because Tomcat 5.5.x doesn't
support version 2.5 of the Servlet spec. Tomcat 5.5.x only supports up
to 2.4. You could only add that project to a Tomcat 6.0.x server, which
does support Servlet 2.5 webapps. It's not clear whether your project
is missing the facet or has an incompatible version.

Cheers,
Larry
Re: Add and Remove to Liferay/Tomcat Server [message #530712 is a reply to message #530662] Fri, 30 April 2010 15:21 Go to previous messageGo to next message
Shelli Orton is currently offline Shelli OrtonFriend
Messages: 101
Registered: September 2009
Senior Member
Thanks for replying...

I hadn't set up any Project Facets, in fact didn't know they existed.

I set my project Targeted Runtime to my Liferay-Tomcatv5.5 server and when I choose Dynamic Web Module version 2.4 in Project Facets, I get an error message that Dynamic Web Module 2.4 requires Java 1.3 or newer.

My workspace/project is set to Java 1.6 and the Tomcat has JRE 1.5.0_17 in it. Any thoughts on why I'm getting this error?

Thanks again!
Re: Add and Remove to Liferay/Tomcat Server [message #530766 is a reply to message #530712] Fri, 30 April 2010 18:02 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
sdoca wrote:
> Thanks for replying...
>
> I hadn't set up any Project Facets, in fact didn't know they existed.
> I set my project Targeted Runtime to my Liferay-Tomcatv5.5 server and
> when I choose Dynamic Web Module version 2.4 in Project Facets, I get an
> error message that Dynamic Web Module 2.4 requires Java 1.3 or newer.
>
> My workspace/project is set to Java 1.6 and the Tomcat has JRE 1.5.0_17
> in it. Any thoughts on why I'm getting this error?
>
> Thanks again!

The Dynamic Web Module facet requires that the Java facet be present as
well and that the Java facet version meet the minimum requirements of
the Dynamic Web Module version. However, the fact that your project
didn't already have the Dynamic Web Module facet may indicate that
adding it isn't the right think to do unless it is a brand new project.
The normal way is to create a Dynamic Web Project and the facet gets
added for you as part of the project creation. What is already in your
project? Are there other facets already present. That may help
determine if converting the project to a Dynamic Web Project at this
point makes the most sense.

Cheers,
Larry
Re: Add and Remove to Liferay/Tomcat Server [message #530786 is a reply to message #530437] Fri, 30 April 2010 21:27 Go to previous messageGo to next message
Shelli Orton is currently offline Shelli OrtonFriend
Messages: 101
Registered: September 2009
Senior Member
It is a new project created using a Maven (m2eclipse) archetype. There are no facets checked off for it.
Re: Add and Remove to Liferay/Tomcat Server [message #530791 is a reply to message #530786] Fri, 30 April 2010 22:44 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
sdoca wrote:
> It is a new project created using a Maven (m2eclipse) archetype. There
> are no facets checked off for it.

I know virtually nothing about with m2eclipse, but I would have expected
m2eclipse to either provide a way to create a web application type
project which included the appropriate facets or allow you to create a
Dynamic Web Project and then make it a maven type project. You could
try adding the Java and Dynamic Web Module facets to your project. I
would expect the project to be able to behave the same as a Dynamic Web
Project that wasn't "mavenized". I don't know if your project with the
added facets will yield a correctly built web application when built
using m2eclipse. If m2eclipse "understands" Dynamic Web Projects, then
it should work. If it doesn't, I'm not sure what you will get.

Cheers,
Larry
Re: Add and Remove to Liferay/Tomcat Server [message #531619 is a reply to message #530791] Wed, 05 May 2010 15:34 Go to previous message
Shelli Orton is currently offline Shelli OrtonFriend
Messages: 101
Registered: September 2009
Senior Member
Sorry for delay in responding, but sometimes the obvious is hard to see. You said that the Java facet must also be checked and I didn't notice that item in the list of facets. If I choose both "Java" and "Dynamic Web Module" I am able to to apply the facets.

Thanks for your help!
Previous Topic:QuickFix in XML Editor
Next Topic:Can't install Web Developer Tools into Helios
Goto Forum:
  


Current Time: Tue Apr 16 09:26:19 GMT 2024

Powered by FUDForum. Page generated in 0.06338 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top