For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 8 replies, 2 voices, and was last updated 20 years, 8 months ago by
Riyad Kalla.
-
AuthorPosts
-
pidjMemberhello I am a new user of MyEclipse
I would like to insert <c:if … tag in my jsp file
is there an auto completion for those tags with MyEclipse?
Do I have do insert jars in the lib directory or MyEclipse can do it autmaticlythinks
December 15, 2005 at 6:30 am #243094
Riyad KallaMember1) Make sure you are using a Web Project
2) Right click on your project, go down to MyEclipse > Add JSTL
3) Select the version of JSTL you want to add, probably 1.1
4) Be sure to add the proper <%@ taglib %> entry to the top of your JSP page
5) Have fun!The key here are steps #3 and #4, once you have done that, MyEclipse will properly resolve the tags and give you autocomplete for them.
December 15, 2005 at 9:40 am #243125
pidjMemberhello
Completion works fine thinks !
but I ve an error when executing my jsp on tomcat saying that the test attribut doesn’t accept expression
December 15, 2005 at 9:47 am #243127
pidjMemberan other question …
adding jstl, involve the creation of .tld files in the WEB INF directory, is it possible to configure MyEclipse to place them in a subdirectory like WEB INF/tldthinks a lot for your help
pidj
December 15, 2005 at 10:25 am #243129
Riyad KallaMemberbut I ve an error when executing my jsp on tomcat saying that the test attribut doesn’t accept expression
Some tags don’t accept expressions. It’s defined in the taglib.
adding jstl, involve the creation of .tld files in the WEB INF directory, is it possible to configure MyEclipse to place them in a subdirectory like WEB INF/tld
Not currently, but unless you are using custom URIs in your web.xml file, you don’t even need the TLDs in your WEB-INF dir, you can just erase them (as long as you are not remapping them in your web.xml file)
The reason for this is that they are all contained in the standard.jar/META-INF directory, which is a valid place according to the web specification for them to be and MyEclipse will honor that.
December 15, 2005 at 10:44 am #243133
pidjMemberthe tag i am using do accept an expression it is the c:if tag. I use it like this
<c:if test="${not empty patientBean.name}">But if I add this in my web.xml file everythings work
<taglib> <taglib-uri>http://java.sun.com/jstl/core</taglib-uri> <taglib-location>/WEB-INF/c.tld</taglib-location> </taglib>But by putting this MyEclipse mark an error in the web.xml file
invalid content was found starting with element taglibthinks you very much
December 15, 2005 at 11:47 am #243142
Riyad KallaMemberBut by putting this MyEclipse mark an error in the web.xml file
Code:
invalid content was found starting with element taglib
The format of the web.xml file changed with the web 2.4 spec, you need to wrap your <taglib> entries in <jsp-config> tags, like this:
<jsp-config>
<taglib>blahlbha</taglib>
</jsp-config>December 16, 2005 at 2:26 am #243176
pidjMemberok thinks, you, it works
So I need to modify my web.xml manually each time I want to use a new taglib
December 16, 2005 at 8:32 am #243188
Riyad KallaMemberSo I need to modify my web.xml manually each time I want to use a new taglib
Only if you want to use non-default URIs.
To see what the default URI is, open your TLD file and look around the 5th line or so, you will see:
<uri>SOME TEXT</uri>Where SOME TEXT represents the default URI used by the taglib. If you use this string, you don’t need a custom mapping in your web.xml file.
-
AuthorPosts
