jsp2 taglib support

Hi,

I just fired up 1122 and so far it looks nice but it still doesn't
support the jsp2 taglib import whenever the .tld is specified inside a
.jar META-INF.

For example from the jstl 1.1 - standard.jar:

/META-INF/c.tld defines http://java.sun.com/jsp/jstl/core

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

/META-INF/fn.tld defines http://java.sun.com/jsp/jstl/functions

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

But IDEA will display it as URI not found and mark every tag red. The
page renders correctly on tomcat5.0.16. If I'm not completly wrong the
jsp2 spec doesn't require you to define the taglib via the web.xml if
its packaged in a .jar.

/thomas

10 comments
Comment actions Permalink

Thomas Heller wrote:

Hi,

I just fired up 1122 and so far it looks nice but it still doesn't
support the jsp2 taglib import whenever the .tld is specified inside a
.jar META-INF.

For example from the jstl 1.1 - standard.jar:

/META-INF/c.tld defines http://java.sun.com/jsp/jstl/core

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

/META-INF/fn.tld defines http://java.sun.com/jsp/jstl/functions

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

But IDEA will display it as URI not found and mark every tag red. The
page renders correctly on tomcat5.0.16. If I'm not completly wrong the
jsp2 spec doesn't require you to define the taglib via the web.xml if
its packaged in a .jar.

/thomas

Please add jstl jars to your deployment (Settings | Paths | Web Module |
Modules and Libraries to Deploy).
IK

--
Igor Kuralenok
Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Just to support what Igor said -- I have the JSTL 1.1 libraries (w/TLDs in JARs) marked for inclusion in my webapp and the taglibs are found properly.

0
Comment actions Permalink

Thanks Chris!

Starting from 1127 we'll search TLDs in all web module libraries. But
please make sure that you properly configure libraries for deployment.

By the way we've discussed the default setting for module libraries.
Whether to include them into deployment. Because we do not have enough
statistics we decided to ask EAP. What do you do more often include or
exclude libraries from deployment?

Thanks,
IK

Chris Winters wrote:

Just to support what Igor said -- I have the JSTL 1.1 libraries (w/TLDs in JARs) marked for inclusion in my webapp and the taglibs are found properly.



--
Igor Kuralenok
Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Most of the time I include for the webapp > 75% of the libraries I'm using. So a default of inclusion makes sense to me.

0
Comment actions Permalink

Igor Kuralenok (JetBrains) wrote:

Thanks Chris!

Starting from 1127 we'll search TLDs in all web module libraries. But
please make sure that you properly configure libraries for deployment.

By the way we've discussed the default setting for module libraries.
Whether to include them into deployment. Because we do not have enough
statistics we decided to ask EAP. What do you do more often include or
exclude libraries from deployment?


Well it really depends on the project.

I have 3 comments:

1- This shouldn't be changed right now since it's a feature and not a
bug. Things work as is, just document things properly. You're in RC
new features like this, which don't stop us from doing our work, should
not be added.

2- I don't even think you should be adding the parsing of all other libs
either. If a lib is not included in the module, you shouldn't consider
it for TLDs. Again this is a feature being added at the RC stage, and
might make things unstable.

3- When you do change it, make it an option on a per module or project
basis under the J2EE settings, so that the user can choose their own
behavior.

Thanks.
R

0
Comment actions Permalink

Hi Robert!
Robert S. Sfeir wrote:

Igor Kuralenok (JetBrains) wrote:

>> Thanks Chris!
>>
>> Starting from 1127 we'll search TLDs in all web module libraries. But
>> please make sure that you properly configure libraries for deployment.
>>
>> By the way we've discussed the default setting for module libraries.
>> Whether to include them into deployment. Because we do not have enough
>> statistics we decided to ask EAP. What do you do more often include or
>> exclude libraries from deployment?


Well it really depends on the project.

I have 3 comments:

1- This shouldn't be changed right now since it's a feature and not a
bug. Things work as is, just document things properly. You're in RC
new features like this, which don't stop us from doing our work, should
not be added.

True. But be need to know how to change this in 4.1.


2- I don't even think you should be adding the parsing of all other libs
either. If a lib is not included in the module, you shouldn't consider
it for TLDs. Again this is a feature being added at the RC stage, and
might make things unstable.


You did not get me right. We parse libs included in this module. In
older versions we looked only in those included in deployment. This is
not a feature (because in some cases you just have to exclude lib from
deployment because of server restrictions). It's not dangerous change.


3- When you do change it, make it an option on a per module or project
basis under the J2EE settings, so that the user can choose their own
behavior.

Not only the default setting is affected by this statistics but the list
itself. It could be a list of "excluded libraries/modules". And it
doesn't seem to be reasonable to customize.

Thanks,
IK

--
Igor Kuralenok
Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

i don't usually include modules for deployment because I don't use IDEA to generate my deployment directory. My webapp is already in it's exploded state as a part of an EAR. I would rather IDEA just pick up TLDs from the libraries associated with the module.

0
Comment actions Permalink

What do you do more often include or
exclude libraries from deployment?

Thanks,
IK



I don't have any of my libraries included for deployment. I vote for leaving it how it is now.

Jon

0
Comment actions Permalink

Not only the default setting is affected by this statistics but the list
itself. It could be a list of "excluded libraries/modules". And it
doesn't seem to be reasonable to customize.


Ok then don't turn on by default if we can't customize it. Keep it as
is right now. I don't want to chase a ghost and forget that something
is preset. SOmetimes I always use a J2EE library which I never deploy.
I don't want you to just decide that I need that. In either case I
have to either uncheck it or check the lib I want to include on.

Lastly, if you're parsing all the included libs, non deployed ones that
is, then you don't need to do anything further in the deploy section.
The main reason being that if you already have the libs you need in the
Tomcat/common/lib directory, then you never want these libs deployed to
your webapp dir.

Please don't add the auto deploy stuff.

R

0
Comment actions Permalink

Igor Kuralenok (JetBrains) wrote:

Starting from 1127 we'll search TLDs in all web module libraries. But
please make sure that you properly configure libraries for deployment.


Hi,

just downloaded 1131 and tried jsp2 support but it still doesn't do
things correcty. Don't know if thats related to my project structure but
maybe.

I have an application with 4 modules (1 webmodule). One "module/libary"
acts mainly as some sort of weblibary I use in several projects, will
become an external jar at some point. It includes some custom tags and a
sort of framework for page handling. Since it defines tags I have a .tld
in its META-INF src path. Unfortunatly the tld isn't found correctly so
my jsps are all red. What do I need to do to let IDEA find that thing? I
cannot mark the module as a webmodule since I cannot include that one
into the other web module deployment then.

In addition to that <jsp:attribute ...> is still marked as unknown tag
and <%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> isn't supported
either.

regards,
/thomas

0

Please sign in to leave a comment.