Mick Knutson schrieb:
I am trying to write this in xhtml:

<script src="<c:url value="/pages/scripts/scriptaculous/prototype.js"/>" language="javascript"></script>

My whole header is:

<html xmlns="http://www.w3.org/1999/xhtml";
      xmlns:ui="http://java.sun.com/jsf/facelets";
      xmlns:h=" http://java.sun.com/jsf/html";
      xmlns:t="http://myfaces.apache.org/tomahawk";
      xmlns:f=" http://java.sun.com/jsf/core";
      xmlns:c="http://java.sun.com/jsp/jstl/core";
        >

<ui:composition template="/WEB-INF/layout/center.xhtml">
    <ui:define name="title">Backend Listing</ui:define>

    <ui:define name="content">

<script src="<c:url value="/pages/scripts/scriptaculous/prototype.js"/>" language="javascript"></script>


But <c:url is not recognized as a tag.



--

Thanks

DJ MICK
http://www.djmick.com
http://www.myspace.com/mickknutson

Hello, i run into the same problem , c:url isnt recognized, the reason is, c:url isnt implemented for facelets, see Section 3.2.3 JSTL Support - https://facelets.dev.java.net/nonav/docs/dev/docbook.html.

Well i searched many forums how to get around this,well in the end i choosed the following workaround:

in my facelet page:
#{application.autoCompleteMemberUrl}



on the java side:(ApplicationBean.java)

public String getAutoCompleteMemberUrl() {
       // TODO Auto-generated method stub
FacesContext context = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession) context.getExternalContext().getSession(false); String sessionid = session.getId();
       //HttpSession.getId();
       return "/autocompleteMember.jsf;jsessionid="+sessionid;
}

Maybe u can write a taglibrary for facelets if u need this functionality for many pages with different urls.

Hope i could help,
Bye,

Holger

Reply via email to