Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Taglibs
Taglibs [message #69085] Thu, 27 January 2005 09:01 Go to next message
Eclipse UserFriend
Hi,

I guess that the this should work, so could someone tell me what I am
doing wrong.

I have the following taglib directives:

<%@ taglib uri='/WEB-INF/jsp/ian.tld' prefix='ian' %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

Content assist works for the "ian" taglib, but not for the "c" one ?

I can use the "c" taglib in the jsp file, just by coding everything, and
it runs, but it would be nice to have content assist.

Cheers
Ian
Bundle jar files in war/ear [message #69106 is a reply to message #69085] Thu, 27 January 2005 11:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi all,

I have run into a - I assume - trivial problem but don't seem to be able
to solve it myself...

I'm writing a webApplication which depends on a couple of other Projects
and libraries in this Projects and also own libraries... how can I tell
Eclipse Webtools to bundle this libraries into the war file... for
example in the lib folder?!

Thnx in advance...

bye
Re: Taglibs [message #69150 is a reply to message #69085] Thu, 27 January 2005 10:22 Go to previous messageGo to next message
Eclipse UserFriend
Ian wrote:
> I guess that the this should work, so could someone tell me what I am
> doing wrong.
>
> I have the following taglib directives:
>
> <%@ taglib uri='/WEB-INF/jsp/ian.tld' prefix='ian' %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
>
> Content assist works for the "ian" taglib, but not for the "c" one ?

Where in the workspace are the standard.jar and your .jsp located
(the full path)? The arrangement of files in your workspace can
affect whether the taglib is visible to the editor or not. This is
with WTP 1.0M2 or newer, right?

--
- Nitin
Re: Taglibs [message #69270 is a reply to message #69150] Thu, 27 January 2005 15:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: robwms63.yahoo.com

That URL is not going where you want it to. Click it, you just end up on
Sun's site.

There was a bug in the first release of the webtools where the tld had
to be local. Since upgrading to M2, the URL approach has been working
for me.

Nitin Dahyabhai wrote:
> Ian wrote:
>
>> I guess that the this should work, so could someone tell me what I am
>> doing wrong.
>>
>> I have the following taglib directives:
>>
>> <%@ taglib uri='/WEB-INF/jsp/ian.tld' prefix='ian' %>
>> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
>>
>> Content assist works for the "ian" taglib, but not for the "c" one ?
>
>
> Where in the workspace are the standard.jar and your .jsp located (the
> full path)? The arrangement of files in your workspace can affect
> whether the taglib is visible to the editor or not. This is with WTP
> 1.0M2 or newer, right?
>
Re: Bundle jar files in war/ear [message #69351 is a reply to message #69106] Thu, 27 January 2005 17:36 Go to previous messageGo to next message
Eclipse UserFriend
I solved this by importing the jar files directly into the WEB-INF/lib
folder. This will be packaged into your .war file, and also eclipse will
automagically recognise it as a library in your classpath.

Dan.

madmarauder wrote:
> Hi all,
>
> I have run into a - I assume - trivial problem but don't seem to be able
> to solve it myself...
>
> I'm writing a webApplication which depends on a couple of other Projects
> and libraries in this Projects and also own libraries... how can I tell
> Eclipse Webtools to bundle this libraries into the war file... for
> example in the lib folder?!
>
> Thnx in advance...
>
> bye
Re: Taglibs [message #69492 is a reply to message #69270] Fri, 28 January 2005 02:19 Go to previous messageGo to next message
Eclipse UserFriend
On Thu, 27 Jan 2005 12:23:00 -0800, Rob Williams <robwms63@yahoo.com> =

wrote:

> That URL is not going where you want it to. Click it, you just end up =
on =

> Sun's site.
>
> There was a bug in the first release of the webtools where the tld had=
=

> to be local. Since upgrading to M2, the URL approach has been working =
=

> for me.

I agree that the address does not link to an exact page, but it is the =

address
used in SUN's exmaples and it seems to work at runtime.

It is also the address defined in the c.tld that is embedded in =

standard.jar

How do you link to JSTL ?
/Ian

>
> Nitin Dahyabhai wrote:
>> Ian wrote:
>>
>>> I guess that the this should work, so could someone tell me what I a=
m =

>>> doing wrong.
>>>
>>> I have the following taglib directives:
>>>
>>> <%@ taglib uri=3D'/WEB-INF/jsp/ian.tld' prefix=3D'ian' %>
>>> <%@ taglib uri=3D"http://java.sun.com/jsp/jstl/core" prefix=3D"c" %=
>
>>>
>>> Content assist works for the "ian" taglib, but not for the "c" one ?=

>> Where in the workspace are the standard.jar and your .jsp located =

>> (the full path)? The arrangement of files in your workspace can affe=
ct =

>> whether the taglib is visible to the editor or not. This is with WTP=
=

>> 1.0M2 or newer, right?
>>
Re: Taglibs [message #69511 is a reply to message #69150] Fri, 28 January 2005 02:39 Go to previous messageGo to next message
Eclipse UserFriend
On Thu, 27 Jan 2005 10:22:33 -0500, Nitin Dahyabhai <nitind@us.ibm.com> =
=

wrote:
> Where in the workspace are the standard.jar and your .jsp located (the=
=

> full path)? The arrangement of files in your workspace can affect =

> whether the taglib is visible to the editor or not. This is with WTP =
=

> 1.0M2 or newer, right?

I am running eclipse 3.1 M4 and WTP 1.0M2 on Windows XP

My jsp files are in <project>\WebContent\*.jsp
standard.jar is in my tomcat common\lib directory. In the WTP "Project
Explorer" this can be found at:
<project>\Java Resources\Tomcat v5.0 runtime\standard.jar

On a slightly seperate note, I am having problems getting WTP to work
with other eclipse java projects. I have a java project called "src". Fr=
om =

this
I create a jar file that containes classes that are used in my custom
tab lib. Now, if I put my jar file in the tomcat common\lib directory or=

define it in the WTP's project's properties (Java Build Path) as an
external jar file (this then shows up in <project>\Java =

Resources\myJar.jar)
then every thing works fine at runtime. However, this means that I must
rebuild the jar file every time something changes and restart tomcat. =

Should
it not be possible to define the java projects ouput directory (classes =
=

directory)
in the WTP's projects properties (Java Build Path) with "Add classes =

folder".
However this does not project the required results. I can see the class =
=

files
inder <project>\Java Resources, but they are not found by tomcat at =

runtime ?

Currently my first question is more important.

Regards
Ian
Re: Bundle jar files in war/ear [message #69530 is a reply to message #69351] Fri, 28 January 2005 04:09 Go to previous messageGo to next message
Eclipse UserFriend
Thnx for the reply... do you have to add the libs manually?!

> Dan Simmonds wrote:
> I solved this by importing the jar files directly into the WEB-INF/lib
> folder. This will be packaged into your .war file, and also eclipse will
> automagically recognise it as a library in your classpath.
>
> Dan.
>
> madmarauder wrote:
>
>> Hi all,
>>
>> I have run into a - I assume - trivial problem but don't seem to be
>> able to solve it myself...
>>
>> I'm writing a webApplication which depends on a couple of other
>> Projects and libraries in this Projects and also own libraries... how
>> can I tell Eclipse Webtools to bundle this libraries into the war
>> file... for example in the lib folder?!
>>
>> Thnx in advance...
>>
>> bye
Re: Taglibs [message #69669 is a reply to message #69511] Fri, 28 January 2005 11:49 Go to previous messageGo to next message
Eclipse UserFriend
Ian wrote:
> My jsp files are in <project>\WebContent\*.jsp
> standard.jar is in my tomcat common\lib directory. In the WTP "Project
> Explorer" this can be found at:
> <project>\Java Resources\Tomcat v5.0 runtime\standard.jar

Do you also have a <project>\WebContent\WEB-INF folder? The editor
will assume the recommended J2EE layout is in effect if it finds a
WEB-INF folder near your .jsp and only search through .jars in
WEB-INF's parent's contents.

> Should
> it not be possible to define the java projects ouput directory (classes
> directory)
> in the WTP's projects properties (Java Build Path) with "Add classes
> folder".
> However this does not project the required results. I can see the class
> files
> inder <project>\Java Resources, but they are not found by tomcat at
> runtime ?
>
> Currently my first question is more important.

The Add Classes Folder action is for adding already-compiled .class
files to your build path. What you want to do is to redefine your
source folder's output folder (where .class files will be placed
when Eclipse compiles .java files) as
<project>/WebContent/WEB-INF/classes so that Tomcat can use them
directly. This is where it expects to find loose .class
files--assuming you have a WEB-INF folder.

--
- Nitin
Re: Bundle jar files in war/ear [message #69771 is a reply to message #69530] Sat, 29 January 2005 01:56 Go to previous messageGo to next message
Eclipse UserFriend
yeah, just right click on the lib folder, click import, chose (I think)
file system, then find the .jar files.

madmarauder wrote:
> Thnx for the reply... do you have to add the libs manually?!
>
> > Dan Simmonds wrote:
>
>> I solved this by importing the jar files directly into the WEB-INF/lib
>> folder. This will be packaged into your .war file, and also eclipse
>> will automagically recognise it as a library in your classpath.
>>
>> Dan.
>>
>> madmarauder wrote:
>>
>>> Hi all,
>>>
>>> I have run into a - I assume - trivial problem but don't seem to be
>>> able to solve it myself...
>>>
>>> I'm writing a webApplication which depends on a couple of other
>>> Projects and libraries in this Projects and also own libraries... how
>>> can I tell Eclipse Webtools to bundle this libraries into the war
>>> file... for example in the lib folder?!
>>>
>>> Thnx in advance...
>>>
>>> bye
Re: Taglibs [message #70175 is a reply to message #69492] Sun, 30 January 2005 12:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: robwms63.yahoo.com

This:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

is working for me. Bizarre. I drop it in, drop down into the page and type:

<c:

and I get a list of tags.

R

Ian wrote:
> On Thu, 27 Jan 2005 12:23:00 -0800, Rob Williams <robwms63@yahoo.com>
> wrote:
>
>> That URL is not going where you want it to. Click it, you just end up
>> on Sun's site.
>>
>> There was a bug in the first release of the webtools where the tld
>> had to be local. Since upgrading to M2, the URL approach has been
>> working for me.
>
>
> I agree that the address does not link to an exact page, but it is the
> address
> used in SUN's exmaples and it seems to work at runtime.
>
> It is also the address defined in the c.tld that is embedded in
> standard.jar
>
> How do you link to JSTL ?
> /Ian
>
>>
>> Nitin Dahyabhai wrote:
>>
>>> Ian wrote:
>>>
>>>> I guess that the this should work, so could someone tell me what I
>>>> am doing wrong.
>>>>
>>>> I have the following taglib directives:
>>>>
>>>> <%@ taglib uri='/WEB-INF/jsp/ian.tld' prefix='ian' %>
>>>> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
>>>>
>>>> Content assist works for the "ian" taglib, but not for the "c" one ?
>>>
>>> Where in the workspace are the standard.jar and your .jsp located
>>> (the full path)? The arrangement of files in your workspace can
>>> affect whether the taglib is visible to the editor or not. This is
>>> with WTP 1.0M2 or newer, right?
>>>
Re: Taglibs [message #70354 is a reply to message #69669] Mon, 31 January 2005 03:11 Go to previous messageGo to next message
Eclipse UserFriend
On Fri, 28 Jan 2005 11:49:06 -0500, Nitin Dahyabhai <nitind@us.ibm.com> =
=

wrote:

> Ian wrote:
>> My jsp files are in <project>\WebContent\*.jsp
>> standard.jar is in my tomcat common\lib directory. In the WTP "Projec=
t
>> Explorer" this can be found at:
>> <project>\Java Resources\Tomcat v5.0 runtime\standard.jar
>
> Do you also have a <project>\WebContent\WEB-INF folder? The editor wi=
ll =

> assume the recommended J2EE layout is in effect if it finds a WEB-INF =
=

> folder near your .jsp and only search through .jars in WEB-INF's =

> parent's contents.

I added a lib directory to my WEB-INF directory and placed standard.jar =
in =

here.
This solved the problem. It seems strange though that the editor does no=
t =

check the
jar files in the installed tomcat runtime. I assume that this is somethi=
ng =

that will
come in future releases ?

>> Should
>> it not be possible to define the java projects ouput directory =

>> (classes directory)
>> in the WTP's projects properties (Java Build Path) with "Add classes =
=

>> folder".
>> However this does not project the required results. I can see the =

>> class files
>> inder <project>\Java Resources, but they are not found by tomcat at =
=

>> runtime ?
>> Currently my first question is more important.
>
> The Add Classes Folder action is for adding already-compiled .class =

> files to your build path. What you want to do is to redefine your =

> source folder's output folder (where .class files will be placed when =
=

> Eclipse compiles .java files) as <project>/WebContent/WEB-INF/classes =
so =

> that Tomcat can use them directly. This is where it expects to find =

> loose .class files--assuming you have a WEB-INF folder.

I can try this and see what happens.

Thanks for the help,
Cheers
Ian
Re: Taglibs [message #76050 is a reply to message #70354] Tue, 22 February 2005 17:08 Go to previous message
Eclipse UserFriend
Ian wrote:
> I added a lib directory to my WEB-INF directory and placed standard.jar
> in here.
> This solved the problem. It seems strange though that the editor does
> not check the
> jar files in the installed tomcat runtime. I assume that this is
> something that will
> come in future releases ?

Yes. If you see it not working in our forthcoming 1.0M3, please
open a bug listing your WTP and Eclipse builds against the Web Tools
product's jst.jsp component and attach image showing your project's
layout and build path.

--
- Nitin
Previous Topic:Taglib Declaration URLs Broken Again?
Next Topic:BEA has joined the Web Tools Platform Project
Goto Forum:
  


Current Time: Tue Jul 22 12:08:37 EDT 2025

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

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

Back to the top