- This topic has 15 replies, 5 voices, and was last updated 17 years, 5 months ago by Riyad Kalla.
-
AuthorPosts
-
Amir MistricMemberHi
I am working with JSPX and would like to know if I can enable tag completion somehow.
Besides the standard jsp and jstl tags there are some custom ones.1. What do I need to do to make this work?
2. If #1 is not possible, what can I do to prevent red and orange squiggles indicating that all my elements invalid?Here is what my file looks like
<!-- - Author(s): me - Date: 03/09/2007 - Description: Standard page --> <jsp:root version="2.0" xmlns="http://www.w3c.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:cms="urn:jsptld:cms-taglib" xmlns:cmsu="urn:jsptld:cms-util-taglib" xmlns:c="urn:jsptld:http://java.sun.com/jsp/jstl/core" xmlns:fmt="urn:jsptld:http://java.sun.com/jsp/jstl/fmt"> <jsp:directive.page contentType="text/html; charset=UTF-8" /> <jsp:directive.page import="java.util.LinkedHashMap" /> <jsp:directive.page import="java.util.Map" /> <jsp:directive.page import="java.util.Iterator" /> <jsp:directive.page import="org.apache.commons.lang.StringUtils"/> <jsp:directive.page import="javax.jcr.PathNotFoundException" /> <jsp:directive.page import="javax.jcr.RepositoryException" /> <jsp:directive.page import="info.magnolia.cms.core.Content" /> <jsp:directive.page import="info.magnolia.cms.core.MetaData" /> <jsp:directive.page import="info.magnolia.cms.util.Resource" /> <jsp:directive.page import="info.magnolia.cms.security.AccessDeniedException" /> <jsp:directive.page import="info.magnolia.cms.gui.misc.FileProperties" /> <jsp:output omit-xml-declaration="false" doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/> <!-- common shared variables --> <c:import url="../include/common-variable.jspf" /> <html> <head> <c:import url="../include/head.jspf" /> </head> <body> <cms:mainBar paragraph="np-www-page-properties" label="Page Properties" adminButtonVisible="true"/> <jsp:text> <![CDATA[ <!-- start: center on page container - centers the template on the screen --> <div id="center-the-page">HELLO</div> ]]> </jsp:text> </body> </html> </jsp:root>
Thanks
Amir
Scott AndersonParticipantAmir,
In the current builds (5.1.1 and 5.5M1) XHTML is not supported very well and tag completion can be a little sketchy. We have good news though! We’ve just added full XHTML support for 5.5M2 and that release will be available in a couple of weeks (early April). So, if you can give us a little time and then install the new build I think this problem will be addressed really well for you. Sorry for the inconvenience in the interim.
Amir MistricMemberHi Scott
Did the timelines change on 5.5?
You mentioned early Aprli and we are in early May?Any updates on timelines would be appreciated.
Regards
Amir
Loyal WaterMemberHi Amir,
The release date for 5.5 got pushed down by a couple of weeks. 5.5 would be released on Monday (14 May, 2007).
Amir MistricMemberIs the 5.5GA delayed ? Monday has passed and I don’t see the announcement yet…
Loyal WaterMemberSorry for the delay. Some last minute bugs need to be fixed. Anyway we are hoping to release it by late tonight. Thats our best estimate right now.
Amir MistricMemberOK I just installed 5.5 and the problem still persists. I still get validation errors in JSPX and XHTML and it cannot recoginze standard tags…
Riyad KallaMemberarmistric,
I think the problem is with your URIs, they are a bit squirrely. For example, while there are still some erroneous warning markers with the following template in 5.5, autocomplete worked for the JSTL taglibs:<?xml version="1.0" encoding="UTF-8"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:sql="http://java.sun.com/jsp/jstl/sql" xmlns:x="http://java.sun.com/jsp/jstl/xml"> <jsp:directive.page contentType="text/html; charset=UTF-8" /> <jsp:text> <![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ]]> </jsp:text> <c:import url="includes/common-variable.jspf" /> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <c:import url="includes/head.jspf" /> </head> <body> <jsp:text> <![CDATA[ <!-- start: center on page container - centers the template on the screen --> <div id="center-the-page">HELLO</div> ]]> </jsp:text> </body> </html> </jsp:root>
Amir MistricMemberI think URIs are fine…They are standard way of representing taglibs from JAR files.
I am getting “Unknown attibute name (xmlns)” yellow warning tag for each one of the xmlns prefixes….All the attributes of <jsp:root> and <jsp:output> are being yellow flagged..
Also, there is no tag completion on XHTML elements defined in default name space…@support-rkalla wrote:
armistric,
I think the problem is with your URIs, they are a bit squirrely. For example, while there are still some erroneous warning markers with the following template in 5.5, autocomplete worked for the JSTL taglibs:<?xml version="1.0" encoding="UTF-8"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:sql="http://java.sun.com/jsp/jstl/sql" xmlns:x="http://java.sun.com/jsp/jstl/xml"> <jsp:directive.page contentType="text/html; charset=UTF-8" /> <jsp:text> <![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ]]> </jsp:text> <c:import url="includes/common-variable.jspf" /> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <c:import url="includes/head.jspf" /> </head> <body> <jsp:text> <![CDATA[ <!-- start: center on page container - centers the template on the screen --> <div id="center-the-page">HELLO</div> ]]> </jsp:text> </body> </html> </jsp:root>
Riyad KallaMemberI think URIs are fine…They are standard way of representing taglibs from JAR files.
Hmm, I’ve never seen that notation… am also not sure why it’s necessary as the JEE spec defines the order taglibs are resolved. 1) being that the default URI is mapped against any TLDs under the META-INF directories of any JARs in the classpath. Do have a ref I can read about that type of mapping? May need to file that..
I am getting “Unknown attibute name (xmlns)” yellow warning tag for each one of the xmlns prefixes….
Yea, those were the ones I was referring to.
All the attributes of <jsp:root> and <jsp:output> are being yellow flagged..
Also, there is no tag completion on XHTML elements defined in default name space…Hmm yes seems like a bug. I’ll file it.
Amir MistricMember@support-rkalla wrote:
Hmm, I’ve never seen that notation… am also not sure why it’s necessary as the JEE spec defines the order taglibs are resolved. 1) being that the default URI is mapped against any TLDs under the META-INF directories of any JARs in the classpath. Do have a ref I can read about that type of mapping? May need to file that..
Here you go:
http://java.sun.com/products/jsp/syntax/2.0/syntaxref2024.html#1003283Read the section where it mentions:
If URI is of the form urn:jsptld:path, path is interpreted relative to the root of the web application and should resolve to a TLD file directly, or to a JAR file that has a TLD file at location META-INF/taglib.tld
Riyad KallaMemberThank you for the heads up.
0nyxMemberAny news on that. I just installed MyEclipse last week and am now making my first steps with JSF and want to have the output XTHML. As I still get the same warnings I googled and found this thread discussing that very issue.
Riyad KallaMemberOnyx,
The JSF tags don’t output XHTML… is that what you are asking? Or were you asking about something else?
0nyxMemberNo, I have the same issue as amistric:
All the attributes of <jsp:root> and <jsp:output> are being yellow flagged..
Also, there is no tag completion on XHTML elements defined in default name space…It is a bit annoying if you get dozens of warnings about something that is actually correct. At least the page is rendered well with Tomcat 6.X and is proper XHTML. And probably connected to that, the resource bundle is also not recognized in MyEclipse as well when I use the <jsp:root> instead of simple:
<%@ taglib uri=”http://java.sun.com/jsf/html” prefix=”h” %>
<%@ taglib uri=”http://java.sun.com/jsf/core” prefix=”f” %>So every time I use something <h:outputText value=”#{msgs.name}”>, whereas msgs is defined in the faces-config.xml as the resource bunde, I also get the yellow warning flag. Again Tomcat does render this correct and only the validation in MyEclipse fails.
-
AuthorPosts