Taglib problems under 3185

I'm back on 3144....

Under 3185, IDEA couldn't resolve my JSTL taglibs. This has worked fine until now. I'm using the Sun URIs. Initially it couldn't resolve the URI, when I added the libs (jstl.jar and standard.jar) explicitly as an external lib it could resolve all of the URIs but none of the tags - in core, at least, I don't have time to play around too much to see if the others work. Although our project isn't in webapp format (it's mangled by Ant during build - don't ask) I have a content root and a web resource directory set with the taglibs inside them.

Anyone else seeing this? Is anyone still on 3185? ;)

0
15 comments

I take it back, this has suddenly started happening in 3144 as well, but I've just had to change my project. Looks like I've broken something somewhere.

I remember a post, maybe by Maxim, that listed the order and criteria that IDEA uses to look for tlds, but now I can't find it. Can anyone summarise it quickly?

0
Avatar
Permanently deleted user

Hi,

You should have taglib jars with tlds in META-INF or have the tlds in
WEB-INF (all given that the resources go into exploded directory)

Colin Fleming wrote:

I take it back, this has suddenly started happening in 3144 as well, but I've just had to change my project. Looks like I've broken something somewhere.

I remember a post, maybe by Maxim, that listed the order and criteria that IDEA uses to look for tlds, but now I can't find it. Can anyone summarise it quickly?



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

The problem is that our source tree doesn't have a WEB-INF directory, it's created during build. I have standard.jar in a lib directory directly below the Web Resource directory, this contains a META-INF directory with the tlds. I've also added the jstl.jar and standard.jar as module libraries. Is there anything else I should be doing?

0
Avatar
Permanently deleted user

In article <18756840.1106752347787.JavaMail.itn@is.intellij.net>,
Colin Fleming <no_mail@jetbrains.com> wrote:

The problem is that our source tree doesn't have a WEB-INF directory, it's
created during build. I have standard.jar in a lib directory directly below
the Web Resource directory, this contains a META-INF directory with the tlds.
I've also added the jstl.jar and standard.jar as module libraries. Is there
anything else I should be doing?


Are you using a web app module or a java module? You should be using
web app since java module doesn't resolve any of this stuff.

R

0

Nope, it's definitely a web module...

0
Avatar
Permanently deleted user

Are you having your web.xml built under the WEB-INF directory? You need
one of these here.

Norris Shelton
Sun Certified Java Programmer




Colin Fleming wrote:

>Nope, it's definitely a web module...
>

>

0
Avatar
Permanently deleted user

Hi, the library should be packaged (see Packaging options)

Colin Fleming wrote:

The problem is that our source tree doesn't have a WEB-INF directory, it's created during build. I have standard.jar in a lib directory directly below the Web Resource directory, this contains a META-INF directory with the tlds. I've also added the jstl.jar and standard.jar as module libraries. Is there anything else I should be doing?



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Well, as I said, the WEB-INF is build dynamically. We do have a web.xml, and I've pointed IDEA to it in the project settings. It doesn't reference the taglibs though, since if you use the full URI in the taglib page directive you don't need it. Well, you don't need it according to J2EE anyway; IDEA I don't know about, but the documentation suggests it should find the tlds inside the standard.jar.

As a side note, I've managed to work around this a bit by adding another Web Resource directory that points to our temporary build output directory. Normally there's a complete copy of the application there, and that seems to be enough for IDEA, but obviously if I do a clean, everything breaks.

0

The library is selected to be packaged, packaging method "copy files to". But it's worth repeating that I do my builds with Ant, not with IDEA. However the Ant script does what I understand IDEA should do, makes an exploded directory (which is also the configured build output for IDEA, so building with IDEA should work for the Java part, anyway), compiles to there and copies a bunch of resources.

0
Avatar
Permanently deleted user

In article <1909158.1106754867620.JavaMail.itn@is.intellij.net>,
Colin Fleming <no_mail@jetbrains.com> wrote:

Well, as I said, the WEB-INF is build dynamically. We do have a web.xml, and
I've pointed IDEA to it in the project settings. It doesn't reference the
taglibs though, since if you use the full URI in the taglib page directive
you don't need it. Well, you don't need it according to J2EE anyway; IDEA I
don't know about, but the documentation suggests it should find the tlds
inside the standard.jar.

As a side note, I've managed to work around this a bit by adding another Web
Resource directory that points to our temporary build output directory.
Normally there's a complete copy of the application there, and that seems to
be enough for IDEA, but obviously if I do a clean, everything breaks.


Ok then one more thing I've noticed. It's not enough to just point to
web.xml. What you have to do, is in the web app setup is go to the Web
Module Settings tab, and make sure that the JSPs are set to deploy to a
relative path (even if you don't use that from within IDEA), setup a
relative path deploy location for WEB-INF, again even if you don't use
that in idea.

Then make sure your library which includes the tlds is included in your
project.

I see your point though about being able to just point to a web.xml, add
your jar with the tlds, and have resolution for files within a web app.
You might want to file a detailed request in Jira explaining your
situation to see if JB can come up with a smart way to support your need.

R

0

Wierdly, it now works, without having to do any of that, and even though I've removed the Web Resource directory hack. I can do a clean, and it's fine. Very strange.

One problem with what you suggest for WEB-INF is that we don't have a source WEB-INF for me to configure the deployment. IDEA won't let me configure the mapping without creating a blank directory to copy from, which is getting into the realms of the ridiculous. This whole process is a long way from intuitive.

Of course, I wouldn't have this problem if our project was set up in a halfway reasonable manner, grrr...

I've set aside about 2 hours tonight for placing JIRA requests :-). This should definitely be easier, it's a pretty basic requirement and not that complicated.

Thanks for all the help!

0
Avatar
Permanently deleted user

Colin,

I've filed an issue in Jira to improve the intelligence of the create module process. Feel free to add to it, but I think the JetBrains brains can implement something like this, and will likely resolve the issue of setting up a webapp most of the time.

http://www.jetbrains.net/jira/browse/IDEA-245

R

0
Avatar
Permanently deleted user

Hi,

It could be just about to allow editing jsps at place (and libs are
picked from classpath) for java module, the packaging/running will be
the user responsibility (ANT, whatever), do not complain on
ClassNotFound problems on running then ;).

Robert S. Sfeir wrote:

Colin,

I've filed an issue in Jira to improve the intelligence of the create module process. Feel free to add to it, but I think the JetBrains brains can implement something like this, and will likely resolve the issue of setting up a webapp most of the time.

http://www.jetbrains.net/jira/browse/IDEA-245

R



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Avatar
Permanently deleted user

Hum, but see that will lead to more complaints. I think you guys are trying hard to make it right so everyone is happy. I think that the module creation process can be improved to stave off some of these problems. If you add a little more intelligence in the wizard like I suggested, and I don't think the added amount of work is huge, then you can end up with the best of both world. People who want to just edit JSPs are notified that they really should be using a web module, not a java module, and people who don't want to deploy anything, get the minimum required, and can edit their app. If they want to do more, then yes they have to properly setup their web app. But the current module doesn't take them far enough I think.

R

0

Looks good, I haven't got a lot of time to comment at length (demo tomorrow), but will do so later. Right now I'd settle for the existing functionality working as advertised...

0

Please sign in to leave a comment.