Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Tomcat/shared/lib and WTP
Tomcat/shared/lib and WTP [message #205183] Fri, 30 November 2007 18:43 Go to next message
Mauro Trajber is currently offline Mauro TrajberFriend
Messages: 3
Registered: July 2009
Junior Member
Hi all,

Is there a way to load tomcat_home/shared/lib/*.jar files into Eclipse
when Tomcat is running via WTP ?
"Load into Eclipse" I means put in, both, Eclipse and Tomcat
classpaths. Like Tomcat Libraries ( automatically loaded when a new
Web Project is created ) .

I try a workaround, copying catalina.properties file found in
conf/catalina.properties to
metadata/.plugins/org.eclipse.wst.server.core/tmp?/conf/ in my
Eclipse workspace and then edit shared.loader., but without success.

Any idea ?

Thanks

PS: Tomcat 5.0.x and Eclipse 3.3.1
Re: Tomcat/shared/lib and WTP [message #205191 is a reply to message #205183] Fri, 30 November 2007 18:48 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1311
Registered: July 2009
Senior Member
See if
http://wiki.eclipse.org/WTP_Tomcat_FAQ#Why_are_classes_in_my _Tomcat_installation.27s_shared.2Flib_not_seen_by_my_Web_app lication.3F
helps. It was written for WTP 1.5.x, but applies to WTP 2.0.x except
that catalina.properties is already imported. You can modify the
shared.loader property to replace "${catalina.base}" with
"${catalina.home}" or append strings that use "${catalina.home}".

Cheers,
Larry

Mauro wrote:
> Hi all,
>
> Is there a way to load tomcat_home/shared/lib/*.jar files into Eclipse
> when Tomcat is running via WTP ?
> "Load into Eclipse" I means put in, both, Eclipse and Tomcat
> classpaths. Like Tomcat Libraries ( automatically loaded when a new
> Web Project is created ) .
>
> I try a workaround, copying catalina.properties file found in
> conf/catalina.properties to
> metadata/.plugins/org.eclipse.wst.server.core/tmp?/conf/ in my
> Eclipse workspace and then edit shared.loader., but without success.
>
> Any idea ?
>
> Thanks
>
> PS: Tomcat 5.0.x and Eclipse 3.3.1
>
Re: Tomcat/shared/lib and WTP [message #205198 is a reply to message #205191] Fri, 30 November 2007 19:17 Go to previous messageGo to next message
Mauro Trajber is currently offline Mauro TrajberFriend
Messages: 3
Registered: July 2009
Junior Member
This is a workaround for runtime, right ? I also need to import *.jar into
classpath, to use autocompletion in editor and so on. Is there a way to do
it automatically ? Like WTP does with tomcat/common/lib (servlet-api, ant,
jsp-api, etc)
Re: Tomcat/shared/lib and WTP [message #205206 is a reply to message #205198] Fri, 30 November 2007 19:40 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1311
Registered: July 2009
Senior Member
Mauro wrote:
> This is a workaround for runtime, right ? I also need to import *.jar
> into classpath, to use autocompletion in editor and so on. Is there a
> way to do it automatically ? Like WTP does with tomcat/common/lib
> (servlet-api, ant, jsp-api, etc)
>
This would be one case where you would use the the Build Path page of
the projects properties to add these jars, rather than J2EE Module
Dependencies. Doing something automatically that was also robust would
be very difficult to implement.

I would recommend creating a User Library containing the shared jars and
add that to the project's build path.

Cheers,
Larry
Re: Tomcat/shared/lib and WTP [message #205222 is a reply to message #205206] Fri, 30 November 2007 19:51 Go to previous message
Mauro Trajber is currently offline Mauro TrajberFriend
Messages: 3
Registered: July 2009
Junior Member
The worst part of this approach is that every new jar I need to reload the
User Library, adding the new element.
Previous Topic:JSP Editor
Next Topic:Eclipse & Axis2 Problem
Goto Forum:
  


Current Time: Thu Dec 18 02:41:22 GMT 2014

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

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