aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes IntelliJ 7 - Struts Taglib completion not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "IntelliJ 7 - Struts Taglib completion not working" Watch "IntelliJ 7 - Struts Taglib completion not working" New topic
Author

IntelliJ 7 - Struts Taglib completion not working

Mike Fourier
Greenhorn

Joined: Apr 02, 2008
Posts: 25
Hello,

I'm not getting quite as much assistance as I think I should be able to get, from my IDE.

On this page:
http://www.jetbrains.com/idea/training/demos/struts.html

If you drag the slider at the bottom to about 80/161 and play from there, you'll see that the editor will suggest values for the 'property' attributes of struts tags.

I'm getting virtually everything except that. The other 'helps' in the video, like importing taglib declarations, and all the auto-completes/suggestion lists on *.xml files work.

Does that seem familiar to anyone?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15662
    
  15

Most likely you don't have the Struts DTD registered with the IDE. Probably if you look at a Struts JSP, the DTD or xml schema reference is highlighted, meaning its URL could not be resolved. You DID include the Struts DTD in your JSP, didn't you???

If your URL for the Struts schema is correct, there's a simple way to register it locally (so the IDE doesn't have to hit the Internet every time a schema validation is required). However, it's more complicated than I can explain here. Fortunately, the IntelliJ docs on the subject are pretty good.


Customer surveys are for companies who didn't pay proper attention to begin with.
Mike Fourier
Greenhorn

Joined: Apr 02, 2008
Posts: 25
Struts DTD?

Sorry, not sure what you mean. Not the taglib tlds?

I have these in the file and they are not underlined or otherwise highlighted (because I've already setup that local mapping you spoke of):


And when I type in the IDE "<bean:" it will popup the correct possible values, and autocomplete the rest of the tag. And then inside, I can begin typing "prop" and it will popup "property=""", but then when I put the cursor inside the property attribute, nothing comes up. well... when I force it, it will say "No suggestions"
[ April 04, 2008: Message edited by: Mike Fourier ]
Mike Fourier
Greenhorn

Joined: Apr 02, 2008
Posts: 25
Just an update on this. The URI turned out to be the problem, in a round-about way.

It's not that it wasn't mapped: it was that it was mapped to an obsolete TLD. Once I updated the TLDs the "external resource mapping" actually pointed to, my code assist started working.

This was quite puzzling, because after all, if it could identify that "write" was a valid value to put after "bean:", and recognized that "property" was an attribute *of* that tag... why then not the code assist for valid javabean methods? I'm still puzzled as to what that has to do with the TLD, but whatever, I'm just happy it's fixed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IntelliJ 7 - Struts Taglib completion not working
 
Similar Threads
The best way to learn IDEA
Intellij and Seam
IDEA Resources
JBoss Debug
IntelliJ Ruby on Rails support?