- This topic has 13 replies, 4 voices, and was last updated 20 years, 3 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.
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.
Riyad KallaMemberHave you defined the TLDs in your web.xml file? Do you have the class files for the TLDs in your classpath?
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.
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).
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+space
No OperationMembertry this one:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
NOP
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).
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?
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?
mrasmussenMemberTahnks for the help. I’m pretty busy right now, but I will give it a try this afternoon.
Riyad KallaMemberNo problem, let us know if it works.
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,
Michael
Riyad KallaMemberMichael,
Hey I’m glad everything is working, let us know if anything else pops up. -
AuthorPosts