About JSF

I'm new to JSF and would like to know if JSF provide front controller or is it simply to develop UI. I need to know if I can replace SPRING MVC with JSF.

JSF provides a front controller in form of the FacesServlet. All you basically need to do is to develop UI (JSF pages) and the backing beans (javabeans with action methods).
No idea about that Spring part though. But I know that you can just use the both technologies in one webapp. Google for "jsf spring integration" or something straightforward like that.

Similar Messages

  • Clarrification about JSF and JBoss Seam

    Hi ,
    i have just started a couple of hours ago reading about JSF and JBoss Seam and it seems interesting ......
    here is my question :
    i have a form ( registration form ) written in jsp and a congratulation page (jsp page too)
    is right what i am saying ?
    JSF form ( input values) are sent to Seam to be validated under hibernate rules and then it( Seam ) responses to the JSF the entity bean .
    again JSF form asks Seam to resolve the variable Register ( the value of the submit button in the form) and Seam returns the RegisterACtion
    After that the same jsp page invoke the register method of the RegisterAction stateless session beam .inside the register method it redirect the user to congratulation jsp page .
    do you think its correct
    sorry folks for my english
    Best reagrds
    yacine fandi

    or maybe if you can give a link of a good tutorial I�ll be greatfull
    cheers yacine
    Message was edited by:
    fandi_yacine

  • Information about JSF

    Hi everyone,
    I would like to know where I can find information about JSF component and life cycle of page web JSF.
    Best regards
    R�gis

    Hi,
    These are some more useful links.
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/jsfcomplibrary.html
    http://java.sun.com/j2ee/javaserverfaces/docs/Deployment_Guide.html

  • Simple question about JSF configuration

    I am using Tomcat 5.0 in Windows XP SP2. When I create a web application with JSF and put it into {tomcat_home}\webapps\, everything works perfect. But when I add a context path in Tomcat's server.xml such like
    <Context docBase="C:\works\java_projects\jsf_test" path="/jsf_test" reloadable="true" debug="0"/>
    And then I put same web application into this context path and try the url like http://machinename:8080/jsf_test/test.faces, it gives me exception as follow
    I wonder if anyone knows about that? Thanks a lot!!
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception
         org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         java.lang.Thread.run(Thread.java:595)
    root cause
    java.lang.NullPointerException
         javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
         org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         java.lang.Thread.run(Thread.java:595)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    :

    FacesServlet.init() processes only the followings:  facesContextFactory = FactoryFinder.getFactory(FACES_CONTEXT_FACTORY);
      applicationFactory = FactoryFinder.getFactory(APPLICATION_FACTORY);
      application = applicationFactory.getApplication();
      lifecycleFactory = FactoryFinder.getFactory(LIFECYCLE_FACTORY);
      lifecycle = lifecycleFactory.getLifecycle(lifecycleId);NPE occurrs at the third line when it can't find ApplicationFactory.
    Check how your container loads the class.

  • What's wrong about  "JSF that emits Ajax-widgets" on the server side?

    Hi,
    I just read this chat about Ajax on the server side and I wonder what this comment bellow means when we are building JSF application with Ajax:
    Another thing to consider is that in a pure Ajax application (i.e. one that's not a hybrid of a server-side technology like JSF that emits Ajax-widgets), the server can pretty much just respond to requests from the Ajax client in a stateless manner, and all of the state gets distributed to the client, greatly reducing the memory resources on the server. I'm working on an app like this for IBM Rational and we're really excited about the *decreased* load on the server by distributing state to clients.
    http://www.devwebsphere.com/devwebsphere/2006/04/ajax_and_its_im.html
    Thanks in advance.

    Just created a half an hour ago application:
    http://jsfbyexamples.com/facesTrace/
    shows that the AJAX request spends less time on the server even it walk though the whole life-cycle. This is a very small page, BTW. On the complicated page, the difference will be more significant. It is about server resources.
    About network traffic: Do you actually believe that sending the whole page produces less traffic than the portion updates? Just mathematically speaking?
    OK, I guess you mean the AJAX application requires traffic comes back and forward to produce the AJAX functionality. Non-AJAX application does not produce the traffic, but it does not produce the functionality you have in the first case.
    People who argue about it just try to compare Something to Nothing. So, where is the point?
    Sergey : http://jsfTutorials.net

  • [ANNOUNCE] Exadel's Max Katz talks about JSF and AJAX

    Hello,
    I'm pleased to announce that JSF Central has just published an interview with Exadel senior systems engineer Max Katz. In the interview, Max talks about the key value and benefits of JSF, how it compares to other frameworks, why it is such a good fit for AJAX, and support for JSF technology at Exadel.
    Here's a quote:
    KM: What do you think is the key value of JSF?
    MK: It's definitely the component-based approach to building web applications, and that it's a standard. JSF has introduced a new paradigm to web application development�building applications out of components. It allows developers to concentrate on application business logic rather than on little details of HTML and other plumbing that is common to all web applications.
    Being a standard is very important for the community, and it helps vendors like Exadel create advanced visual tools. The component-based approach also gave rise to vendors building web components, which also benefits developers. Instead of spending two weeks on integrating a calendar feature into your application, you can now get a calendar component and concentrate on the business problem you're trying to solve.
    KM: Let's talk about AJAX for a moment. What do you think makes JSF such a good fit for AJAX?
    MK: It's the component approach that makes AJAX such a good fit for JSF. You develop your application out of JSF components that provide AJAX functionality. This approach hides all the complexity of JavaScript and XML. Developers don't need to work with error-prone JavaScript making sure it works in all browsers. The AJAX JSF components are tested, ready-to-use components. From the developer perspective, there is really no difference between using the commandButton standard component and using the JSF AJAX drag-and-drop components. The AJAX component is simply a lot more sophisticated in what it does. You can add AJAX functionality in a matter of minutes by using such components. It's very powerful.
    To see the rest of the article, visit
    http://www.jsfcentral.com/articles/katz-06-16-06.html.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kito D. Mann
    Author, JavaServer Faces in Action
    http://www.virtua.com - JSF/Java EE consulting, training, and mentoring http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info

    The posted link led to a *404*.
    I think I found the podcast and transcript under [article on JSFCentral.com|http://www.jsfcentral.com/listings/R2925?link] . Kito: is this the correct location?

  • About jsf and tiles

    Good days , the following exception is happening:
    javax.faces.FacesException
    at de.mindmatters.faces.lifecycle.RenderResponsePhase.executePhase(RenderResponsePhase.java:53)
    at de.mindmatters.faces.lifecycle.AbstractPhase.execute(AbstractPhase.java:37)
    at de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:166)
    at de.mindmatters.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:226)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:406)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:313)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
    Caused by: java.lang.NullPointerException
    at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:168)
    at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
    at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:221)
    at de.mindmatters.faces.lifecycle.RenderResponsePhase.executePhase(RenderResponsePhase.java:45)
    ... 21 more
    my web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>true</param-value>
    <description>
    Set this flag to true if you want the JSF
    Reference Implementation to verify that all of the application
    objects you have configured (components, converters,
    renderers, and validators) can be successfully created.
    Default value is false.
    Poner a false cuando se ponga en produccion.
    </description>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    <description>
    Set this flag to true if you want the JSF
    Reference Implementation to validate the XML in your
    faces-config.xml resources against the DTD. Default
    value is false.
    Poner a false cuando se ponga en produccion.
    </description>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    <description>
    Indica donde queremos guardar el estado de la aplicacion.
    Poner a server cuando se ponga en produccion. antes probarlo!
    </description>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
    <description>
    Este parametro le dice a MyFaces si se va a permitir renderizar javascript.
    Default: "true"
    </description>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
    <description>
    si es verdadero, el renderizado html estara formateado, permitiendo que se pueda leer
    bien. En la fase de desarrollo, estara a true, cuando este en produccion, estara a false.
    </description>
    </context-param>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    <!-- listener de spring-->
    <listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- Tiles configuration
    definition files and a listener need to be defined.
    the listener will initialize JspTilesViewHandlerImpl with tiles definitions.
    -->
    <servlet>
    <servlet-name>TilesServet</servlet-name>
    <servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
    <init-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles-defs.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    </filter>
    </web-app>
    tiles-defs.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE tiles-definitions PUBLIC
    "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
    <tiles-definitions>
    <definition name="Base" path="/paginas/plantillaBasica.jsp">
    <put name="titulo" value="Base" type="string"/>
    <put name="cabecera" value="/cabecera.jsp" type="page"/>
    <put name="cuerpo" value="base" type="page"/>
    <put name="pie" value="base" type="page"/>
    </definition>
    <definition name="/busquedaDosCajas.tiles" extends="Base">
    <put name="titulo" value="Busqueda con dos cajas" type="string"/>
    <put name="cuerpo" value="/paginas/cuerpoDosCajas.jsp" type="page"/>
    </definition>
    </tiles-definitions>
    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">
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config>
    <application>
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>
    </application>
    <!-- El mantenimiento del bean proxy se delega al contenedor de spring-->
    <application>
    <variable-resolver>
    org.springframework.web.jsf.DelegatingVariableResolver
    </variable-resolver>
    </application>
    <!-- el unico idioma permitido es el espa�ol.-->
    <application>
    <locale-config>
    <default-locale>es</default-locale>
    </locale-config>
    </application>
    <!--
    - navigation rules
    -->
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>succesNoJS</from-outcome>
    <to-view-id>/paginas/listado.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>error</from-outcome>
    <to-view-id>error.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    index.jsp
    <%@ page session="false"%>
    <%
    response.sendRedirect("busquedaDosCajas.jsf");
    %>
    anybody could help me? i dont know whats happening
    regards a lot

    first make sure you are using Tiles stand-alone (in Struts Sandbox)
    add the follwoing servlet to your web.xml
    <servlet>
    <servlet-name>Tiles Servlet</servlet-name>
    <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    add the following context-param to your web.xml
    <context-param>
    <param-name>tiles-definitions</param-name>
    <param-value>/WEB-INF/tiles.xml</param-value>
    </context-param>
    add the following to your faces-config.xml
    <view-handler>org.apache.shale.tiles.TilesViewHandler</view-handler>
    add the following dependency to your pom.xml
    <dependency>
    <groupId>org.apache.shale</groupId>
    <artifactId>shale-tiles</artifactId>
    <version>1.0.3</version>
    </dependency>
    that should be it.
    Khaled

  • A question about JSF login

    Hi all!
    I am following this link (http://benjmaz.blogspot.com) for handling session in my application.
    I am unable to understand that what attributes and methods would be there in the MemberManager class, object of which we have created in LoginBean.java class, please give me some clue about this.
    Thanks in advance.
    Edited by: 857452 on May 17, 2011 2:22 AM

    How can i do if user close browser without logout? You pretty much can't do anything about that, and shouldn't. There is one thing you could do (but probably shouldn't), and that would be to include some javascript on your page to handle the "onExit" (or something like that - I don't know off the top of my head, but there is a way to trap navigating away from a page, which includes closing the browser) event to invoke whatever URL you want to, to tell it the person is "logging out".
    Other than that, you could rely on session timeouts, and handle the event on your server side which happens when the session expires.

  • Basic questions about JSF/af:panelPage/Facets

    Hi there
    Using JDev 10.1.3.3.0, I created a couple of JSP pages using JSF and ADF BC. Then I added to one of them a af:panelPage and changed the facet branding to be the company logo.
    Do I need to do the same for the other page (and any other pages that I create)? Is there a place where I set this facet value globally?
    And is there a way to set up what facets are included in a af:panelPage by default?
    Sorry if these are basic questions, I am just starting to use JSF!
    Thanks,
    Luis

    facets with af:panelPage.
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtTopicFile.jsf_apps%7Cadfcreate%7Caf_alay_pagecomponent~html/
    http://otndnld.oracle.co.jp/document/products/as10g/101300/B25221_03/web.1013/b25386/web_complex002.htm
    Re: <jsp:include page/> - Error

  • Basic Questions about JSF, Login and Session

    Hi,
    I try to implement a login/logout function on my jsf-website. I create one <form> with Login and Pass to enter. My AuthenticBean(sessionbean) checks login and pass. If Login is "ok" the login and pass will set in the authenticBean (min. value of login and pass = 2).
    Now I check protected .jsf files (files who need a login) if in the AuthenticBean the login.equals("") or pass.equals(""). If so, the user is not logged in.
    Is this a safe method or should I choose a better way to have secure login/logout functions. Perhaps its better to create a userSessionBean after a succeful login and check it with HttpServletRequest rq.getSession().getAttribute(userSessionBean)?
    I am confused a little bit and I hope you'll help me:)
    Thnx Alex

    Implement a javax.servlet.Filter and indeed use the attributes of the HttpSession.

  • Doubts about JSF 2.0 lifecycle

    1)Is FacesContext stored in request scope at the beginning of the lifecycle?
    2)Is the component tree populated with components mainly in render response phase? when a page is requested for the first time, the restore view phase creates a empty UIViewRoot and in the render response phase the tree is populated with components. Also in the render response phase, the navigation handler determines whether to display current view or a completely new view. If a new view is to be displayed, the component tree is populated with components in the render response phase. So component tree seems to be populated mainly in render response phase, isn't it so?
    3)The render response state caches the 'current' state of the component tree in the render response phase. What exactly does 'current' mean? If we have a tree having input components with some user entered values, are the values also stored or they are removed before the tree is cached?
    4)In what scope does render response cache the component tree?
    5)Once a user request a page, a component tree is cached. Is the created tree available for all users or for a particular user for whom the tree was initially created?

    N.B. I haven't studied JSF 2.0 too deeply, but I do not think any of the answers below are different for 2.0 vs 1.2.
    nash_era wrote:
    1)Is FacesContext stored in request scope at the beginning of the lifecycle?The FacesContext is stored in a thread local static variable. This is how the static FacesContext.getInstance() method can work while your application server services multiple clients.
    >
    2)Is the component tree populated with components mainly in render response phase? when a page is requested for the first time, the restore view phase creates a empty UIViewRoot and in the render response phase the tree is populated with components. Also in the render response phase, the navigation handler determines whether to display current view or a completely new view. If a new view is to be displayed, the component tree is populated with components in the render response phase. So component tree seems to be populated mainly in render response phase, isn't it so?Once case you haven't mentioned is the post back of a previously rendered page. In this case the component tree is restored during the Restore View phase. It is this restored tree that is in effect for the remaining phases up to Execute Application. Then the navigation handler determines the next view and it is created if necessary.
    >
    3)The render response state caches the 'current' state of the component tree in the render response phase. What exactly does 'current' mean? If we have a tree having input components with some user entered values, are the values also stored or they are removed before the tree is cached? If the same view that was restored is to be rendered, then the values entered by the user may be re-used. (I say may because they might get cleared if the Update Model phase is successful. It that case the value expression is re-evaluated to get the value rendered.)
    >
    4)In what scope does render response cache the component tree?The cached view roots are in the session.
    >
    5)Once a user request a page, a component tree is cached. Is the created tree available for all users or for a particular user for whom the tree was initially created?Only for the particular user. Also, if the outcome of the action method is non-null, you will get a new instance of the tree even if it is the same view id as the last one.

  • OffTopic: YahooGroup about JSF for Brazilians (and everybody too)

    Estou convidando todos os brasileiros(e estrangeiros também) para participar do grupo sobre JavaServer Faces no Yahoo Groups.
    http://br.groups.yahoo.com/group/javasf/join
    I'm inviting brazilians and everybody to join on Yahoo Group about javaserver faces technologies, tools and patterns.
    Thanks
    http://br.groups.yahoo.com/group/javasf/join

    or maybe if you can give a link of a good tutorial I�ll be greatfull
    cheers yacine
    Message was edited by:
    fandi_yacine

  • Please help about JSF selectOneRadio tag

    if i want to place a selectOneRadio in a 2x5 table, but in different colums, how could i do? i have try follow:
    <tr><td>
    </f:verbatim>
    <h:selectOneRadio value="#{LIC3320.currentSelect}" valueChangeListener="#{LIC3320.proListener}" immediate="true" onchange="submit()">
    <f:selectItem itemValue="pro" itemLabel="process No" />
    <!-- other code-->
    <f:verbatim>
    </td><td>
    </f:verbatim>
         <h:inputText value="#{LIC3320.processNum}"/>
    <f:verbatim>
    </td></tr>
    <tr><td>
    </f:verbatim>
    <f:selectItem itemValue="lic" itemLabel="license no"/>
    </h:selectOneRadio>
    <f:verbatim>
    </td><td>
    </f:verbatim>
    <h:inputText value="#{LIC3320.licenseNum}"/>
    <f:verbatim>
    </td></tr>
    but it doesn't work.
    could anyone help
    thanks
    emmy

    thanks, but would anyone provide some example
    and one things, which tag library i should include
    Message was edited by:
    emmy.ma

  • About JSF 168 portlet

    Hi,
    can u help me to create a portlet which contains a jsp file with any simpel component and java file with xml files i am using opensource server (Uportal).
    pl help me

    hi,
    My requiremsnt is :
    i havae a jsp file which contains a component like text field or button. now i want to publish this jsp file in uportal server.
    for this i need to hava one class file ,web.xml and portlet.xml file right? now my question is how we put link between all these...
    pl help me.
    Thanks

  • Some basic questions about jsf

    for example, a login page with two input filed(user name and password)and a "submit" button.the code is:
    <h:outputText value="username:" />
    <h:inputText id="username" size="12"   value="#{userBean.userName}" required="true" />
    <h:outputText value="password:" />
    <h:inputSecret size="12" id="pwd" value="#{userBean.pwd}" required="true" />
    <h:commandButton id="submit" value="submit" action="#{userBean.login}" />UserBean's source code:
    public class UserBean {
         String userName;
         String pwd;
         String uid;
          * @return the uid
         public String getUid() {
              return uid;
          * @param uid the uid to set
         public void setUid(String uid) {
              this.uid = uid;
         public String getPwd() {
              return pwd;
         public void setPwd(String pwd) {
              this.pwd = pwd;
         public String getUserName() {
              return userName;
         public void setUserName(String userName) {
              this.userName = userName;
         public UserBean(){
         public String login() {
              if("Jordan".equals(userName))return "login_error";
              return "home";
        private static Log logger = LogFactory.getLog(UserBean.class);
    }in faces-config.xml i define:
         <navigation-rule>
              <from-view-id>/login.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>home</from-outcome>
                   <to-view-id>/index.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
         <navigation-rule>
              <from-view-id>/login.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>login_error</from-outcome>
                   <to-view-id>/login_error.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>now i have a question:
    if a input a incorrect username or password, the page will direct to login_error.jsp.then i click "back" (ie) to login.jsp page,put correct username and password ,click the "submit" button,then the page doesn't direct to index.jsp ,it just clear the two fields(username and password).and then i put the correct username and password again, this time, the page direct to index.jsp.
    why? why i hava to input twice?

    How are you clicking on back? Are you using the back button on your browser or a back button on your page?
         <navigation-rule>
              <from-view-id>/userLogin.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>success</from-outcome>
                   <to-view-id>/index.jsp</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-outcome>failure</from-outcome>
                   <to-view-id>/loginError.jsp</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-outcome>cancel</from-outcome>
                   <to-view-id>/userLogin.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
         <navigation-rule>
              <from-view-id>/loginError.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>back</from-outcome>
                   <to-view-id>/userLogin.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
    You might want to try putting a back button on your error page. Have a look at the navigation rule above

Maybe you are looking for

  • Why is my iCloud backup for photos 3.3 Gbs but I only have 12 photos in my camera roll?

    After purchasing my iPhone 4S I performed a restore from backup that I had from my iPhone 4 (running iOS 4.3.5). Prior to doing this restore, I did not realize that my photos were not being synchronized from my iOS device and saved in that backup. So

  • JRE 1.3.1 Won't Install on Win2000 -- Help!!!

    When trying to install JRE 1.3.1 (j2re-1_3_1-win.exe, size 5,239 KB, date 02/23/02) on a clean install of Windows 2000 with the latest Service Pack, I get the following error: "The NTVDM CPU has encountered an unhandled exception." It also appears in

  • CRM 5.0 Marketing Campaigns - Send survey on IC Webclient ticket...

    Hello Experts, I hope someone can help me with the following: We are using IC Webclient in a B2B Szenario and want to monitor our customer satisfaction (according to the quality of our service) over a long period. Now our target is the following: Eve

  • EBS R11i  Rman DB backup error

    Hi Friends, platform AIX 5L I am backing up my EBS R11i database using RMAN but I got error. $ rman target / Recovery Manager: Release 9.2.0.6.0 - 64bit Production Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved. connected to target

  • Page numbering starting on second page...

    I can't for the life of me figure out what I'm doing wrong here. All I want to do is start my numbering from 1 on the second page, leaving the first page (title page) without a page number. I know this can be done because it is formatted this way on