Jsf + cocoon

Hi,
I need links / resource which will give me some information and example on how to integrate jsf and cocoon. ( i have searched with google, but not much helpful, got a few articles about integration advantages, but seldom examples). I am using jboss 3.0.4 with tomcat 4.0.6, jdk 1.4.2, jsf 1.1.01, cocoon 2.0.4. I have installed, configured and worked on sample examples in both separately. now, i need some information on integrating both.
-arun.

Hi Arun,
I saw some time ago that cocoon has a JSF sample. Here is a link to the javadoc:
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/faces/context/ExternalContextImpl.html
As you see they have a package called "org.apache.cocoon.faces"
I haven't used it, but I hope that helps you.
BTW. load the current sample from cocoon and dive in ;)
-Matthias

Similar Messages

  • Is JSF fitted to build a multi-views application?

    Hello,
    I'm looking for technologies to build a new Web application and investigating JSF, but I need experienced advices to make my mind if JSF is fitted with this type of application.
    This application will use a MVC model, but instead of a simple HTML view, it'll have multiple views. The majority of these will be HTML pages, but not only. A view can be selected on a request parameter or client detection, or even on the application setup.
    The multiple views are used mainly for:
    - localization when the languages supported have an impact on the layout of the page.
    - customization of the application by customers, when light solutions based on CSS or parameterization is not enough.
    - support for different clients, probably based on user agent detection.
    At first, I thought going the classical path, with servlets or Struts with a XSLT filter, but this solution suffers of:
    - XSL is not simple, and finding Web designers fluent with this technology is hard.
    - Why reinvent the wheel with servlets when MVC framework have matured (I particularly like JSF actions workflow)?
    With the planned number of different views, frequently changing or adding new onews, what I seems to need is JSF with views defined as templates, something like incorporating Tapestry and Cocoon ideas. But from what I've read on JSF, it seems to me to be too much HTML oriented (just look at the structure of the tags or the use of JSP pages), even if I can develop other RenderKits.
    Do you think JSF could be adapted for this kind of application? Do you have any technologies advices?

    With no response to my question, what should I conclude:
    - No one has developped such multi-views applications...
    - No one has gained enough experience with JSF to answer...
    - This question is already answered in a FAQ somwhere...
    - This is not the correct way to support strong localization of a Web application. You won't dare answer such a basic question...
    - Your management doesn't allow you to share your experience with JSF...
    - {Pick a randow excuse and copy it there}

  • Error thrown : Context must be instance of org.apache.cocoon.environment.

    I am trying to load a jsp page in my application(struts application). The jsp uses jsf and is loaded from the application mentioned. My web.xml has the following entries:
    <web-app>
      <listener>
        <listener-class>MyListener</listener-class>
      </listener>
      <servlet>
        <servlet-name>Cocoon</servlet-name>
        <display-name>Cocoon</display-name>
        <description>The main Cocoon servlet</description>
        <servlet-class>org.apache.cocoon.servlet.CocoonServlet</servlet-class>
        <init-param>
          <param-name>allow-reload</param-name>
          <param-value>yes</param-value>
        </init-param>
        <init-param>
          <param-name>autosave-uploads</param-name>
          <param-value>false</param-value>
        </init-param>
        <init-param>
          <param-name>cocoon-logger</param-name>
          <param-value>core</param-value>
        </init-param>
        <init-param>
          <param-name>configurations</param-name>
          <param-value>/WEB-INF/cocoon.xconf</param-value>
        </init-param>
        <init-param>
          <param-name>init-classloader</param-name>
          <param-value>false</param-value>
        </init-param>
        <init-param>
          <param-name>log-level</param-name>
          <param-value>ERROR</param-value>
        </init-param>
        <init-param>
          <param-name>logkit-config</param-name>
          <param-value>/WEB-INF/logkit.xconf</param-value>
        </init-param>
        <init-param>
          <param-name>manage-exceptions</param-name>
          <param-value>true</param-value>
        </init-param>
        <init-param>
          <param-name>overwrite-uploads</param-name>
          <param-value>rename</param-value>
        </init-param>
        <init-param>
          <param-name>request-factory</param-name>
          <param-value>org.apache.cocoon.components.request.MultipartRequestFactoryImpl</param-value>
        </init-param>
        <init-param>
          <param-name>servlet-logger</param-name>
          <param-value>access</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet>
        <servlet-name>portal</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>3</param-value>
        </init-param>
        <init-param>
          <param-name>detail</param-name>
          <param-value>3</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
      </servlet>
      <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup> 1 </load-on-startup>
        </servlet>
      <!--JSPCONF-->
      <servlet-mapping>
        <servlet-name>portal</servlet-name>
        <url-pattern>*.exec</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>Cocoon</servlet-name>
        <url-pattern>/cocoon</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>Cocoon</servlet-name>
        <url-pattern>/cocoon/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>
      <session-config>
        <session-timeout>90</session-timeout>
      </session-config>
      <mime-mapping>
        <extension>css</extension>
        <mime-type>text/css</mime-type>
      </mime-mapping>
        <mime-mapping>
            <extension>xls</extension>
            <mime-type>application/vnd.ms-excel</mime-type>
        </mime-mapping>
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
      <error-page>
        <exception-type>java.lang.Exception</exception-type>
        <location>/jsp/runtimeerror.jsp</location>
      </error-page>
      <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/jsp/runtimeerror.jsp</location>
      </error-page>
    </web-app>When I try to load the jsp whose contents are as follows :
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <html>
    <head>
      <title>enter your name page</title>
    </head>
    <body>
       <f:view>
         <h1>
          <h:outputText value="my text"/>
         </h1>
         <h:form id="helloForm">
          <h:outputText value="Enter your name :"/>
          <h:inputText value="#{personBean.personName}" />
          <h:commandButton action="greeting" value="Hello " />
         </h:form>
       </f:view>
    </body>
    </html>I get the following error -
    <html><head><title>Apache Tomcat/4.1.31 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.faces.FacesException: Context must be instance of org.apache.cocoon.environment.Context
         at org.apache.cocoon.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:55)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:192)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    </pre></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/4.1.31</h3></body></html>I have no clue as to where I should start troubleshooting for this error. Any advice on this error would help a lot. Please let me know what other details I should provide.

    I was using cocoon jars which already had a factory context class. This was overriding the class provided by jsf jar. To rectify it, I added the factory tag with the appropriate class:
    <factory>
    <faces-context-factory>
    com.sun.faces.context.FacesContextFactoryImpl
    </faces-context-factory>
    </factory>

  • How to get ALL values as default for  a drop down box in JSF

    Hi,
    I have a drop down box in JSF page which retrieves values from LOVCache.java. I have values like Company, Client, User, ALL in the drop down box.
    By default blank value is selected for the drop down box. I want to make ALL(which retrieves data for all the values) as default value for the drop down box.
    Could any body help me? Any help must be appreciated.
    Thanks,
    Aseet

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • How to get security roles in a JSF portlet

    I need to get the LDAP user-roles available in the Sun Portal Server 7 in my JSF-168 portlet.
    I've added the mapping file, updated the portlet.xml and web.xml, deployed the portlet (psconsole). But the portlet shows the "content not available" error with javax....title title.
    I've probably messed up the descriptors, but I don't see what is wrong. Here they are:
    roleMaps.properties
    cn\=VSM.Administrator,dc\=neco,dc\=cz=Administrator
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4">
      <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
      </context-param>
      <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</param-value>
      </context-param>
      <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
      </context-param>
      <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
      </context-param>
      <filter>
        <filter-name>UploadFilter</filter-name>
        <filter-class>com.sun.rave.web.ui.util.UploadFilter</filter-class>
        <init-param>
          <description>
              The maximum allowed upload size in bytes.  If this is set
              to a negative value, there is no maximum.  The default
              value is 1000000.
            </description>
          <param-name>maxSize</param-name>
          <param-value>1000000</param-value>
        </init-param>
        <init-param>
          <description>
              The size (in bytes) of an uploaded file which, if it is
              exceeded, will cause the file to be written directly to
              disk instead of stored in memory.  Files smaller than or
              equal to this size will be stored in memory.  The default
              value is 4096.
            </description>
          <param-name>sizeThreshold</param-name>
          <param-value>4096</param-value>
        </init-param>
      </filter>
      <filter-mapping>
        <filter-name>UploadFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
      </filter-mapping>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class>
        <init-param>
          <param-name>errorHost</param-name>
          <param-value>localhost</param-value>
        </init-param>
        <init-param>
          <param-name>errorPort</param-name>
          <param-value>25444</param-value>
        </init-param>
      </servlet>
      <servlet>
        <servlet-name>ThemeServlet</servlet-name>
        <servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class>
      </servlet>
      <servlet>
        <description>Generated By Sun Java Studio Creator</description>
        <display-name>CreatorPortlet Wrapper</display-name>
        <servlet-name>VSMPortal</servlet-name>
        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
        <init-param>
          <param-name>portlet-class</param-name>
          <param-value>com.sun.faces.portlet.FacesPortlet</param-value>
        </init-param>
        <init-param>
          <param-name>portlet-guid</param-name>
          <param-value>VSMPortal.VSMPortal</param-value>
        </init-param>
      </servlet>
      <servlet-mapping>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <url-pattern>/error/ExceptionHandler</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>ThemeServlet</servlet-name>
        <url-pattern>/theme/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>VSMPortal</servlet-name>
        <url-pattern>/VSMPortal/*</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
        <welcome-file>faces/null</welcome-file>
      </welcome-file-list>
      <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <error-page>
        <exception-type>java.io.IOException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <error-page>
        <exception-type>javax.faces.FacesException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <error-page>
        <exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <jsp-config>
        <jsp-property-group>
          <url-pattern>*.jspf</url-pattern>
          <is-xml>true</is-xml>
        </jsp-property-group>
      </jsp-config>
         <security-role>
              <role-name>Administrator</role-name>
         </security-role>          
    </web-app>
    portlet.xml
    <?xml version='1.0' encoding='UTF-8' ?>
    <portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd                         http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' version='1.0'>
         <portlet>
              <description>Created By Java Studio Creator</description>
              <portlet-name>VSMPortal</portlet-name>
              <display-name>VSMPortal Portlet</display-name>
              <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>
              <init-param>
                   <name>com.sun.faces.portlet.INIT_VIEW</name>
                   <value>/Uctarna.jsp</value>
              </init-param>
              <expiration-cache>0</expiration-cache>
              <supports>
                   <mime-type>text/html</mime-type>
                   <portlet-mode>VIEW</portlet-mode>
              </supports>
              <supported-locale>en</supported-locale>
              <portlet-info>
                   <title>VSMPortal</title>
                   <short-title>VSMPortal</short-title>
                   <keywords>Creator</keywords>
              </portlet-info>
              <security-role-ref>
                   <role-name>Administrator</role-name>
                   <role-link>Administrator</role-link>
              </security-role-ref>          
         </portlet>
    </portlet-app>If I don't use the security-role and security-role-ref tags, the portlet works, and the isUserInRole method obviously doesn't.

    Nobody uses the LDAP roles in a portlet? Anybody knows other thread discussing similar issue (I can't find anything)?

  • JSF Pages are not rendering correctly when  loaded using Non JSF actions

    Hi All,
    This problem is irritating me and I am posting the same query for the third time here.
    When I come from non jsf actions such as page submitting using Javascript, clicking anchor link, clicking normal Html submit button and so on my page is not rendering correctlly .
    In other words, My first GET method/Post method works perfectly for the first time when the page is loaded.
    But when we try to access the page for the second time, although logical work is perfect in bean, I am getting same old page.
    How to resolve this issue?
    or
    Is this Bug of Sun's Implementation of JSF Framework.
    Thanks,
    Sudhakar

    Hi Sudhakar,
    There is a discussion about refreshing a page, Take a look at the below thread
    http://swforum.sun.com/jive/thread.jspa?threadID=55660
    Hope this what you are looking for
    MJ

  • Any way (event) to call Java method after view created in JSF 2.0

    Hi,
    I am using JSF 2.0 Mojarra's implementation.
    I am interested to know if there is a way to call Java methods before and/or after view has been restored.
    I wanted to initialize data for my page in this Java method.
    I could see there is an event class PostRestoreStateEvent added in JSF 2.0. How to use it?
    I tired to use f:event element as below, but it does not work. Can anyone share anyother idea to achieve this behaviour?
    <f:metadata>
    <f:event type="postRestoreState" listener="#{employeeLoadBean.loadAfterRestoreView}"/>
    </f:metadata>
    Regards,
    Kishore K S

    Hi,
    The problem is solved as below.
    <f:metadata>
    <f:event type="javax.faces.event.PostRestoreStateEvent" listener="#{employeeViewEventListener.postRestoreState}"/>
    </f:metadata>
    The above calls the Java method #{employeeViewEventListener.postRestoreState} whenever View has been restored.
    It was not working when shortName of the event (ie., postRestoreState) is given and throwing ClassNotFound exception.
    Regards,
    Kishore K S

  • Can't reference methods in a Bean from a Composite JSF Component.

    I have the following composite component TestCC.xhtml:
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
    xmlns:cc="http://java.sun.com/jsf/composite" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <cc:interface>
    <cc:attribute name="manager" method-signature="java.lang.String helloTest()" required="true"/>
    </cc:interface>
    <cc:implementation>
    Hello #{cc.attrs.manager} !!!!!!!!!!!!!!!!!!!!!
    </cc:implementation>
    </html>
    When I try to call it in a JSFF file:
    <?xml version='1.0' encoding='UTF-8'?>
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:icc="http://java.sun.com/jsf/composite/IchipComponent">
    <icc:TestCC manager="#{viewScope.PatientClinicalBean.helloTest}"/>
    The page crashes at my composite tag with the following message in the console:
    javax.el.ELException: //C:/Documents and Settings/tlam/Application Data/JDeveloper/system11.1.2.3.39.62.76.1/o.j2ee/drs/iCHIP/ViewControllerWebApp.war/WEB-INF/classes/META-INF/resources/IchipComponent/TestCC.xhtml: javax.el.PropertyNotFoundException: //C:/Documents and Settings/tlam/Application Data/JDeveloper/system11.1.2.3.39.62.76.1/o.j2ee/drs/iCHIP/ViewControllerWebApp.war/Patient/Profile/Clinical.jsff @13,86 manager="#{viewScope.PatientClinicalBean.helloTest}": The class 'patient.profile.PatientClinicalBean' does not have the property 'helloTest'.
    But my managed bean does have a public String helloTest() method, as well as other methods that work fine elsewhere in my JSFF page:
    public class PatientClinicalBean{
    String test = "TESTING";
    public String helloTest() {
    return test;
    I have tried this many times with different methods, all with the same result. Yet if my composite component outputs just a string and I enter the expression <icc:TestCC manager="#{viewScope.PatientClinicalBean.test}"/> to access the String test field directly it executes properly. I can't seem to reference any of the methods in PatientClinicalBean from only my composite component, when other method calls work fine in the same JSFF page. All other examples I've seen on the web have no problems doing this the same way I have, am I missing something?!
    Edited by: tnology on 24-Oct-2012 14:13
    Edited by: tnology on 24-Oct-2012 14:14
    Edited by: tnology on 24-Oct-2012 14:16

    What if you change the method in the class like this?
    public String getHelloTest() {
      return test;
    }If you attempt to read a property call abc from a bean, you need to have a method called getAbc(). If you attempt to set a property called abc, you need to have a method called setAbc(...). This is JavaBeans convention.

  • I can't view dataTable in JSF

    Hi, anyone who can help me with java server faces, i want to put data from a resultset to dataTable, i made everithing but my table is not visible.
    My code is:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>Consultas</title>
    </head>
    <body><h:form binding="#{backing_Consultas.form1}" id="form1">
    <h:commandButton value="commandButton1"
    binding="#{backing_Consultas.commandButton1}"
    id="commandButton1"
    action="#{backing_Consultas.commandButton1_action}"/>
    </p>
    <p>
    <h:dataTable border="1" var="#{backing_Consultas.dataTable1}"
    id="dataTable1">
    <h:column binding="#{backing_Consultas.column1}"/>
    <h:column binding="#{backing_Consultas.column2}"/>
    <h:column binding="#{backing_Consultas.column3}"/>
    <h:column binding="#{backing_Consultas.column4}"/>
    </h:dataTable>
    </h:form></body>
    </html>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Consultas-->
    </jsp:root>
    This es a JSPX page.
    Please any idea
    thanks
    alex

    Try to disable the hardware acceleration in the Flash Player.
    See [[Cannot view full screen Flash videos]]
    Flash "Display settings" window:
    * http://www.macromedia.com/support/documentation/en/flashplayer/help/help01.html

  • Not able to drag new data control to my jsf

    hi am not able to drag Queriable Attributes into the new query.jsf page and abl to Create it as a Query > ADF Query Panel.
    this is what i have done
    1.In the Application Navigator locate the adfc-config file under the Page Flows node in the ViewController project. Double-click it to open it in the editor. This is where you are going to define the application's navigation.
    2.Drag the DeptEmpPage.jsf file from the Application Navigator into the empty adfc-config diagram.
    3.From the Component Palette drag and drop a View component into the adf-config diagram, and rename it query. This represents the new JSF page that you are about to create.
    4.From the Component Palette select Control Flow Case and then click on the DeptEmpPage and drag a line to the query page.
    Name this line goQuery.
    5.From the Component Palette choose another Control Flow Case and then create an opposite flow from the query page to the DeptEmpPage. Name this flow back.
    6.Double-click the query view in the diagram to create the new page. In the Create JSF Page dialog accept the default Facelets radio button, and with the Quick Start Layout radio button selected, click Browse.
    7.In the Component Gallery, retain the default One Column category, type and layout, but check the Apply Themes checkbox in the Options pane.
    Click OK and OK again to create the page.
    8.To add the employees search functionality to the page, open the Data Controls accordion, and locate EmpDetails1. (If you do not see it click the Refresh button).
    am not able to Select All Queriable Attributes and drag it into the new query.jsf page. Create it as a Query > ADF Query Panel.
    Edited by: user603350 on 2011/12/06 3:34 PM
    Edited by: user603350 on 2011/12/06 3:39 PM

    ... and this solved the problem ?

  • Can not upload image of larger size in jsf

    i had some issues in file uploading. File uploading is working fine in my local machine and when i am using the www.mywebsite.com:8080/fileUpload.jsf
    but i can not upload images by using the following www.mywebsite.com/fileUpload.jsf
    Ie: without the port. I am using windows server and tomcat 5.5.27
    When i am trying to upload a bigger size image i am getting the following error
    I am using jsf(tomahawk)
    09:10:47,315 ERROR MultipartRequestWrapper:? - Exception while uploading file.
    org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Socket read failed
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:384)
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
    at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
    at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:181)
    at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:42)
    at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:91)
    at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:159)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.getSequenceString(JspStateManagerImpl.java:260)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:230)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:267)
    at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:231)
    at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:81)
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at com.zerone.rrs.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:444)
    at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:472)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
    at java.lang.Thread.run(Unknown Source)

    Never mind . problem solved after i restarted

  • Help me in the first JSF !

    Hi everybody ! Help me please ! I'm starting learn JSF, but in my first program have problems, I dont know, please help me ! Every config is normal, it can write message "Hello, JSF !", but when I use bean, problems appear...
    ---------------------Here my code file index.jsp-----------------------
    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    <f:view>
         <h:form id="myform">
         <h:inputText value="#{MyStudent.name}"></h:inputText>
         <h:commandButton action="#{MyStudent.welcome}" value="Submit"></h:commandButton>
         <h:outputLabel value="#{MyStudent.msg}"></h:outputLabel>
         </h:form>
    </f:view>
    </body>
    </html>
    --------------------Here my code of bean-------------------------------
    package myhoangthanh.yahoo.com;
    public class Student {
         String name;
         String msg;
         public void setName(String name) {
              this.name = name;
         public String getName(){
              return name;
         public String getMsg() {
              return msg;
         public String welcome() {
              msg = "Welcome " + name + " to my Website !";
              return "";
    ----------------------And here my code in faces-config.xml---------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
         <managed-bean>
              <managed-bean-name>MyStudent</managed-bean-name>
              <managed-bean-class>myhoangthanh.yahoo.com.Student</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    </faces-config>
    --------------------------I use server GlassFish 2.1, when run, I get message error : ---------------------------------
    exception
    javax.servlet.ServletException: The class 'myhoangthanh.yahoo.com.Student' does not have the property 'welcome'.
    root cause
    javax.el.PropertyNotFoundException: The class 'myhoangthanh.yahoo.com.Student' does not have the property 'welcome'.
    =========================
    Why, in my class have welcome method, and I can call it ! Right ? Please help me !

    Hi oisunngungoc ,
    i think you should return value in in your welcome method.... There are two problems/.....
    Firstly, you miss here an update-string for your next page (welcome method)
    secondly navigation rules are not well defined (faces-config)
    public String welcome() {
    msg = "Welcome " + name + " to my Website !";
    return "";
    }instead of returning nothing or empty string you can return "success"
    and in your Faces-config.xml you should have navigation like this
            <navigation-rule>
              <display-name>index.jsp</display-name>
              <from-view-id>/index.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>Success</from-outcome>
                   <to-view-id>/index.jsp</to-view-id>
              </navigation-case>rigth welcome method is as follows
    public String welcome() {
    msg = "Welcome " + name + " to my Website !";
    return "Success";
    }Regards,
    Romi

  • Unable to connect SQL server 2005 databse with JSF applications !

    Hello guys!
    Help me out to connect SQL server 2005 Databse with JSF applications using JDBC-ODBC bridge. I'm working with Netbeans 6.1 IDE.
    I tried for the basic applications but instead got this error:
    "unable to deploy jdbc drivers to the <project>domain/lib"
    Please help me out with working sample codes that connects MS SQL server 2005 DB with JSF!!
    Thank you guys!

    1) don't use the bridge driver
    2) don't do database access from JSF
    3) learn how to use your application server
    4) learn how to use your IDE

  • Cannot deploy ADF JSF project from JDeveloper 10.1.3.3.0 to AS 10.1.2.0.2

    Hi All,
    I've a small deployment issue which you guys might be able to help me with.
    I've developed an ADF BC JSF project using JHeadstart 10.1.3.2.50 and it was running fine on my self contained OC4J instance. But when I try to deploy it across to my Oracle 10G AS version 10.1.2.0.2., it had the following errors:
    ----- START OF LOG ------
    Initializing log
    Servlet interface for OC4J DCM commands
    Command timeout defined at 600 seconds
    Executing DCM command...
    Executing command redeploy D:\OraHome_3 D:\jdevstudio10133\jdev\mywork\PAM2070C\ViewController\deploy\webapp1.ear webapp1 UNDEFINED
    Command = REDEPLOY
    Reading application's ear file
    Ear file was successfully read
    Opening connection to Oc4jDcmServlet
    Setting userName to ias_admin
    Sending command to DCM servlet
    HTTP response code = 200, HTTP response msg = OK
    Command was successfully sent to Oc4jDcmServlet
    Receiving session id from servlet to check command status
    Session id = c0a8238746b50fc1d5b78e274fcfb38b81a490036726
    Please, wait for command to finish...
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=c0a8238746b50fc1d5b78e274fcfb38b81a490036726
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has finished
    Receiving command exit value
    Receiving command output
    **** No output was received from command
    Closing connection to Oc4jDcmServlet
    #### DCM command did not complete successfully (-8)
    #### HTTP return code was -8
    Exit status of DCM servlet client: -8
    Elapsed time for deployment: 18 seconds
    #### Deployment incomplete. #### 15/05/2008 17:00:33
    ---- END OF LOG ----
    Has anyone been able to deploy ADF JSF project with JHeadstart using JDeveloper 10.1.3.3.0 to Oracle 10G AS 10.1.2.0.2? I'm using window environment. Any feedback is much appreciated. Thank you for your assistance and have a nice day.
    Kind Regards,
    John

    Hi all,
    I had also tried out something else...
    I am now portalizing the ADF application using PortalFacesBridge and portlet.xml. Then I deploy it on the Local OC4J of my system and expose it as a WSRP Portlet using the url: 'http://hostname:portname/warFileName/info and generating a WSDL URL...
    I am then using this WSDL URL to regester this portalized application on the Oracle Portal10.1.4 which i am able to accomplish successfully...
    However after regestration, when I try to view this on the portal page, It is throwing the following error:-
    Error: Could not get markup. The cookie or session is invalid or there is a runtime exception.
    Also I would like to add that this method was working perfectly fine previously...
    What might be the clue for this sudden error...
    Any kind of help is greatly appriciated... Thanks...

Maybe you are looking for

  • How to find the status of production order for fully delivered orders

    Hi, My question is : when an order is confirmed for the end of month(jan) and no Gr is generated in jan then the order will not be included in jan month. For this solution given by functional : Get fully delivered orders for that period. My query's a

  • Call SmartForm in RFC

    We have a RFC calling a smartform and passing parameters to it. But I just cannot get the right results. It looks like an auth issue to me because the program works well using some account (say, UserA) but not well using other accounts(UserB). Howeve

  • Receiver Mail adatper Issue

    Hi Exports, PI7.0 My scinario is File to Mail. This is simple one pick the .txt format file and send with attachement by mail. We do not have any design objects by using Integration Repository. We confirgured with Integration directory direclty.  In

  • Tagging working differently in iTunes 12 ?

    Like zillions of others, I upgraded to OS X Yosemite and iTunes 12.  I am seeing some different behavior in iTunes 12, however, when trying to tag media content. 1. Per the attached example of a movie in my iTunes library, in List View the artist app

  • Web Dynpro ABAP - ALV: Export to Excel | Export to PDF

    Hello, I was wondering which settings I need to configure and where to configure these, for the "Print Version" and "Export to Microsoft Excel" to work. Print version Communication Failure: RFC destination SALV_WD_EXPORT_PDF does not exist Thanks in