- This topic has 13 replies, 4 voices, and was last updated 20 years, 11 months ago by
Riyad Kalla.
-
AuthorPosts
-
mrasmussenMemberI cannot get content assist to work for any tag libraries except <jsp:
I have the tld’s for the libraries and they show up in green instead of red, so my eclipse is finding them, but I can’t get them to show up in the content assist. Do I need to add them to a preference somewhere?. This is not so much a bug as confusion.July 21, 2004 at 8:57 am #210534
Scott AndersonParticipantCan you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.
July 21, 2004 at 10:04 am #210546
Riyad KallaMemberHave you defined the TLDs in your web.xml file? Do you have the class files for the TLDs in your classpath?
July 21, 2004 at 5:31 pm #210575
mrasmussenMemberWhat operating system and version are you running?
Win XP
What Eclipse version and build id are you using? (Help > About Eclipse Platform)
3.0 Final
– Was Eclipse freshly installed for MyEclipse?
Yes
– If not, was it upgraded to its current version using the update manager?
NA– Are any other external plugins installed?
viPlugin, XmlBuddy
– How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*8
What MyEclipse version are you using? (Help > About Eclipse Platform > Features)
3.8b2
What JDK version are you using to run Eclipse? (java -version)
1.4
What JDK version are you using to launch your application server?
1.4
What steps did you take that resulted in the issue?
Tried to use the jstl core library
What application server are you using?tomcat 4.1
Are there any exceptions in the Eclipse log file? (<workspace>/.metadata/.log)
no
Have you defined the TLDs in your web.xml file?
No
Do you have the class files for the TLDs in your classpath?
Yes.
The problem is not that I cannot get the TLD’s recognized. They do not show up in red, they just don’t have the auto complete like jsp:. Is it required to have the actual class files for MyEclipse to do auto complete? Seems like all it should need is a tld. Also my web.xml file is not in the derectory I am working in. For my particular setup, web.xml is a generated file.
July 21, 2004 at 7:45 pm #210586
Riyad KallaMemberJSP Editor must have a TLD file for autocomplete, BUT it must either be defined in your web.xml file in the <taglib> section (that’s what that is for) or in the META-INF directory of a JAR file that is in your classpath (much like the struts.jar does it).
July 23, 2004 at 10:36 am #210801
mrasmussenMemberSo, as an example i have the struts.jar on my project’s classpath, and I have the line
<%@ taglib uri=”/WEB-INF/struts-tiles.tld” prefix=”tiles” %> in my jsp. However, I do not get auto complete for the <tiles: tags. The don’t even show up in the auto complete window if I use ctrl+spaceJuly 23, 2004 at 12:32 pm #210811
No OperationMembertry this one:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
NOP
July 23, 2004 at 4:28 pm #210828
Riyad KallaMembermrasmussen,
The problem here is that the Struts JAR file contains its own URIs for Struts (which is what NOP used above), unless you define a new URI for the taglib in your web.xml file using <taglib> tags, you must use the URI defined by the Struts tags.Also its important to note that the URI is a idenitfier, not a locator. The URI you are using above is an absolute path to the taglib, but this is not what is needed, you have to use its identifier, which by default is something like “http://jakarta.apache.org/struts/tags-tiles” (this changes depending on taglib, and Struts release).
July 26, 2004 at 8:42 am #210908
mrasmussenMemberI tried using the uri from above and got nothing. Also, what identifier would I use fro a custom library? It doesn’t have a uri anywhere?
July 26, 2004 at 9:28 am #210916
Riyad KallaMemberI tried using the uri from above and got nothing.
What version of Struts are you using? Is it from MyEclipse or did you download a nightly build yourself and install it into your webapp? The URIs have changed with the newer struts releases, that’s why I ask.
Also, what identifier would I use fro a custom library? It doesn’t have a uri anywhere?
You define whatever you want, just make sure you point at the right file, for example:
web.xml
<taglib> <taglib-uri>/tags/user-tags</taglib-uri> <taglib-location>/WEB-INF/custom-user-tags.tld</taglib-location> </taglib>
MyJsp.jsp: import tag
<%@ taglib prefix="user" uri="/tags/user-tags" %>
MyJsp.jsp: use tag
<body> ... <user:name /> ... </body>
Did that help?
July 26, 2004 at 10:26 am #210919
mrasmussenMemberTahnks for the help. I’m pretty busy right now, but I will give it a try this afternoon.
July 26, 2004 at 11:09 am #210921
Riyad KallaMemberNo problem, let us know if it works.
July 28, 2004 at 8:30 am #211026
mrasmussenMemberI actually don’t know what changed, I didn’t add anyting to my web.xml file, but everything is working as it should now. I got a newer release of our custom jar, but I don’t know what changed. Even the struts stuff works now.
Thanks,
MichaelJuly 28, 2004 at 9:10 am #211034
Riyad KallaMemberMichael,
Hey I’m glad everything is working, let us know if anything else pops up. -
AuthorPosts