#635: Setting up TLD's via External Resources requires restart of IDEA
When I set up my project dir as a webapp and put in external resource
entries into IDE options for all of my TLD's, IDEA did not register them for
JSP highlighting. Restarting IDEA fixed this. If possible, I'd like to see
the need for a restart eliminated.
-Walter Mundt
Please sign in to leave a comment.
+ 1... I reported this back in #629 or so...
-kevin
"Walter Mundt" <emage@spamcop.net> wrote in message
news:ah1rfc$t8c$1@is.intellij.net...
for
see
>
>
>
>
Hi,
I can't get tld's working as external resource.
I have a project structure whare WEB-INF/web.xml is not physicly placed in
root of docroot on disk (due to a ant warning in the war-task). When I
enable war-support IDEA complains about missing WEB-NF :(
And then it can't do tag-completions with respect to taglibs :(
I then saw this post and thought external resources could solve my troubles.
But it doesn't resolve my taglibs as external resources either.
Anything special I must do?
Regards, Per
Walter Mundt wrote:
Per.
I found this post in the newsgroup by Kevin a while ago, and it works fine for me:
"... The trick is you still need to configure a webapp in IDEA. So in your project
properties under the web option enable webapp support then add a directory
that has WEB-INF as a subdir. Then you can uncheck enable webapp and save
it. Then restart IDEA. Your tlds should now resolve. ..."
/Mads
On Fri, 19 Jul 2002 09:28:33 +0000, Per Olesen <polesen@nordija.com> wrote:
Hi Mads,
Tried what you wrote, but it still doesn't work. When I enable my webapp, I
need WEB-INF (as you write) but also web.xml and the tld in WEB-INF. Thats
okay. IDEA can then resolve.
But when I disable webapps and add external resources, they still wont
resolve (also not after restart).
Hmm, I've tripple checked spelling. My external resource is defined as:
URI: /taglibs/struts-bean.tld
Path: And my taglib def in JSP looks like this: <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>]]>
Hmmm ... what might I be missing ?
Per
Mads Peter Henderson wrote:
>> Hi,
>>
>> I can't get tld's working as external resource.
>>
>> I have a project structure whare WEB-INF/web.xml is not physicly placed
>> in root of docroot on disk (due to a ant warning in the war-task). When I
>> enable war-support IDEA complains about missing WEB-NF :(
>>
>> And then it can't do tag-completions with respect to taglibs :(
>>
>> I then saw this post and thought external resources could solve my
>> troubles. But it doesn't resolve my taglibs as external resources either.
>>
>> Anything special I must do?
>>
>> Regards, Per
>>
>>
>> Walter Mundt wrote:
>>
>> > When I set up my project dir as a webapp and put in external resource
>> > entries into IDE options for all of my TLD's, IDEA did not register
>> > them for
>> > JSP highlighting. Restarting IDEA fixed this. If possible, I'd like
>> > to see the need for a restart eliminated.
>> >
>> > -Walter Mundt
>>
Per,
You should always have Web app configured for TLD resolving. IDEA won't even
try to resolve tld files and absolute JSP references if you have no Web app
defined.
--
Best regards,
Mike Aizatsky.
-
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"
Hi Per.
What I did was :
1. enable web-app.
2. define my tld as an external resource.
3 disable web-app
4. restart.
/Mads
On Fri, 19 Jul 2002 12:06:56 +0000, Per Olesen <polesen@nordija.com> wrote:
Hi Mike,
Hmm, ... now I'm confused :)
I seems perfectly reasonable that IDEA only resolves my tld files if webapp
is configured, but then I must place my WEB-INF/web.xml and tld files
under the doc-root in my source repository!
I should be legal to place these files outside docroot, as long as I ensure
to package them in correct hierarchy for deployment. Shouldn't it?
I can't get the external resources to solve my problem. Should they be able
to?
Regards, Per
Mike Aizatsky wrote:
Hi,
Sadly enough, that doesn't work on my installation :(
Which version are you running?
I'm running #636 on Linux!
Per
Mads Peter Henderson wrote:
>> Hi Mads,
>>
>> Tried what you wrote, but it still doesn't work. When I enable my webapp,
>> I need WEB-INF (as you write) but also web.xml and the tld in WEB-INF.
>> Thats okay. IDEA can then resolve.
>>
>> But when I disable webapps and add external resources, they still wont
>> resolve (also not after restart).
>>
>> Hmm, I've tripple checked spelling. My external resource is defined as:
>>
>> URI: /taglibs/struts-bean.tld
>> Path: >> >> And my taglib def in JSP looks like this: >> >> <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %> >> >> Hmmm ... what might I be missing ? >> >> Per >> >> Mads Peter Henderson wrote: >> >> > Per. >> > >> > I found this post in the newsgroup by Kevin a while ago, and it works >> > fine for me: >> > >> > "... The trick is you still need to configure a webapp in IDEA. So in >> > your project properties under the web option enable webapp support then >> > add a directory >> > that has WEB-INF as a subdir. Then you can uncheck enable webapp and >> > save >> > it. Then restart IDEA. Your tlds should now resolve. ..." >> > >> > >> > /Mads >> > >> > >> > On Fri, 19 Jul 2002 09:28:33 +0000, Per Olesen >> > wrote: >> >> Hi, >> >> >> >> I can't get tld's working as external resource. >> >> >> >> I have a project structure whare WEB-INF/web.xml is not physicly >> >> placed in root of docroot on disk (due to a ant warning in the >> >> war-task). When I enable war-support IDEA complains about missing >> >>]]> WEB-NF :(
>> >>
>> >> And then it can't do tag-completions with respect to taglibs :(
>> >>
>> >> I then saw this post and thought external resources could solve my
>> >> troubles. But it doesn't resolve my taglibs as external resources
>> >> either.
>> >>
>> >> Anything special I must do?
>> >>
>> >> Regards, Per
>> >>
>> >>
>> >> Walter Mundt wrote:
>> >>
>> >> > When I set up my project dir as a webapp and put in external
>> >> > resource entries into IDE options for all of my TLD's, IDEA did not
>> >> > register them for
>> >> > JSP highlighting. Restarting IDEA fixed this. If possible, I'd
>> >> > like to see the need for a restart eliminated.
>> >> >
>> >> > -Walter Mundt
>> >>
>>
Try this: LEAVE web-app configured, but just use an EMPTY /WEB-INF
directory. Put your TLD's into external resources by URI, i.e.:
/WEB-INF/tlds/my.tld -> /usr/src/app/tlds/my.tld
I use this configuration and it works fine for me (after restart of IDEA).
IDEA won't even complain about the missing web.xml.
-Walter Mundt
Hi.
I am running #6.36, windows
/Mads
On Fri, 19 Jul 2002 13:57:19 +0000, Per Olesen <polesen@nordija.com> wrote:
Hello,
when using custom tags in a JSP, the tags are not recognized by IDEA build
640.
I use the following definitions:
1. IDE options - External resource
URI:/iframe-taglib.tld PATH C:\mytags\etc\iframe-taglib.tld
1. Enabling Web application support
NAME: test CONTEXT PATH:test PATH: C:\apache-tomcat-4\webapps\admin
-> My project directory doesn't match my webapp directory
What do i have to do to get the tags recognized by idea?
For what can the 'Web application support' definition be used ?
Thanks for any help
Reto
I don't understand why we need to put the WEB-INF directory at the root of our source tree!?! Deployment files are for deployment. They should be able to very from deployment to deployment. This restriction in our IDE forces a one-to-one between the source tree and the deployment files.
The uri could simply map to the external resource settings, which could look up the class name from the tld and load the class from the current class path. None of which requires the tld to be in a hard coded location.
Is this on somone's list to fix?