Gernerate JSF page through program

Hi all of you,
my name is Salomon i am a beginer in JSF programming with Oracle Jdeveloper 10g release 3.
My difficulty is how to acivate and desactivate UI components on JSF page (or rather JSP page) through program (maybe a method integrated in class associated with JSP page)
,and also add or remove UI components on the JSP programmaticaly.
I am looking forward in hearing from you soon.
Thank you

Hi,
thank for your response but i got another problem:
How to reach a component which is in jsf page whithin another jsf page
programmaticaly so that i can modify its properties (mainly hide or show a commandbutton menu item ...) before displaying this page (page containing the component to modify) through the " return outcomename " statement.
Thank you
Salomon
Message was edited by:
user554608

Similar Messages

  • Assigning iViews to the Page through Program

    Hi,
    I have a page, which is already contains few iViews and set the layout. These all iViews are visible.
    Now I have assigned one more iView and aligned but it is invisible.
    Now I would like to change the property of this iView to make it visible and at the same time i have to make invisible for another iView.
    This I need to implement through program. Please let me know how to achive this .
    Thanks

    Thanks for your reply.
    This page will be visible for all users and all users having this role.
    The present requirement is that the content manager should able to decide which iView has to be displayed for the user.
    I hope it is clear
    Thanks

  • Problem in using MySQL in JSF Pages

    Hi,
    I am facing a problem regarding use of MySQL in JSF.
    I am using IBM RAD 6.0 for application developement.
    Previously creating a normal java application which is used of retrieval of the data from the database was working fine. by including j/connector jar file in java build path.
    But when same program is converted to web service and accessed through a JSF page using a managed bean it is not working. It throws classNotFoundException
    Please reply at your earliest.
    Thanks in advance.
    Regards,
    Amit
    code :-
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class BeanClass
         public String display()
              Connection conn = null;
              Statement stmt = null;
              ResultSet rs = null;
              String returnDate = "";
              try
                   Class.forName("com.mysql.jdbc.Driver").newInstance();
                   System.out.println("Sucess");
                   conn=DriverManager.getConnection("jdbc:mysql://localhost/switching","root","pspl");
                   System.out.println("Sucess******");
                   stmt = conn.createStatement();
                   System.out.println("Sucess^^^^^^^^^");
                   rs = stmt.executeQuery("SELECT * FROM log1 where senderId = '008' ");
                   System.out.println("Sucess#########");
                   while(rs.next())
                        System.out.println("Date : " + rs.getString("expDate"));
                        returnDate = rs.getString("expDate");
                   System.out.println("Final success");     
                   System.out.println("Sucess@@@@@@@@@@@@@@@@");
              }catch(ClassNotFoundException cnfe)
                   System.err.println("Drivers not found " + cnfe.toString());
                   cnfe.printStackTrace();
              catch(IllegalAccessException iae)
                   System.err.println("Access Exception");
              catch(InstantiationException ie)
                   System.err.println("Instatiation Exception");
              catch(SQLException se)
                   System.err.println("SQL EXCEPTION");
                   se.printStackTrace();
              System.out.println("Date is = " + returnDate);
              return returnDate;
    Errors are :-
    [5/3/06 10:47:33:358 IST] 00000061 SystemErr R java.lang.ClassNotFoundException: com.mysql.jdbc.Driver     at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at java.lang.Class.forName1(Native Method)
         at java.lang.Class.forName(Class.java(Compiled Code))
         at packBean.BeanClass.display(BeanClass.java:29)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
         at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
         at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeMethod(JavaDispatcher.java:178)
         at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeOperation(JavaDispatcher.java:141)
         at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processRequestResponse(SoapRPCProcessor.java:423)
         at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processMessage(SoapRPCProcessor.java:388)
         at com.ibm.ws.webservices.engine.dispatchers.BasicDispatcher.processMessage(BasicDispatcher.java:134)
         at com.ibm.ws.webservices.engine.dispatchers.java.SessionDispatcher.invoke(SessionDispatcher.java:203)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:225)
         at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invoke(JAXRPCHandler.java:151)
         at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHandler.java:64)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:225)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:225)
         at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:279)
         at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:341)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:673)
         at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1802)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:469)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:408)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:286)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

    You have to put myfaces jar on the web-inf/lib

  • Using workflow from jsf pages...

    We have built a simple JSF page on OC4J app server..
    We want to call our workflow program from this page.
    How should I use the CREATE PROCESS() AND START PROCESS() inside the JSF page?
    We are using 10.1.2. application server. And We SSO connection between
    OC4J 10 1. 3.2
    we deploy our java application to this OC4J..
    But we when we call workflow functions we get get_remote_user error.
    Can we call direct PL/SQL API over JDBC connection without using OWF Java API.
    Or we need (must) use Java aPI to supply this.
    Thanks...

    We see that we can call CREATE PROCESS() OR START PROCESS() inside the JSF page..
    But the problem are about notifications which needs authentication now
    How can we use notifications from java...
    Can we call direct PL/SQL API over JDBC connection without using OWF Java API.
    Or we need (must) use Java aPI to supply this.
    Thanks...

  • I want to display a jsf page directly.

    I want to display a jsf page directly. In my project I am using jsf frame work and we are using org.apache.myfaces.component.html.util.ExtensionsFilter to redirect the request to the login.jsf. please any one help me on this.

    my requirement is I have to display a jsf page which is there in the project directly, without going through login page. Right now Iif i am trying to open it in browser directly, it is redirecting to login.jsf. I have following 'extensionsFilter' content in web.xml
    <filter>
    <filter-name>extensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
    <init-param>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>100m</param-value>
    <description>Set the size limit for uploaded files.
    Format: 10 - 10 bytes
    10k - 10 KB
    10m - 10 MB
    1g - 1 GB
    </description>
    </init-param>
    <init-param>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    <description>Set the threshold size - files
    below this limit are stored in memory, files above
    this limit are stored on disk.
    Format: 10 - 10 bytes
    10k - 10 KB
    10m - 10 MB
    1g - 1 GB
    </description>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>

  • Problem with Non JSF Request to JSF Page

    Hi All,
    I am working on dynamic controls generation based on the request come from non jsf page
    For the first request, pageworks perfectly. but when we go for second request, it is not rendering and I am getting same old page.
    What I have identified is if I have 2 pages as JSF, application is not giving any problem.
    For this I have written small test application contains both JSF pages only.
    page1 contains 3 submit buttons.
    When submit buttons are clicked based on the request, I get, am able to see the dynamic controls.
    SO there is no problem with JSF PAGE to JSF Page Communication
    Now I have done some changes in First JSF page. Instead of submitting directly I am submitting the page through JavaScript which is nonb JSF request. There I am facing the problem and based on requested qaction I am not able to see correct rendered page based on the requested action.
    Any Idea why it is giving problem for non JSF requests??
    Thanks
    Sudhakar

    For Your Convenience in understanding the problem
    I am pasting entire test code
    Page 1 -- (here page2 is Page1 and Page1 is page2 - some naming convention errors :) )
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <jsp:text><![CDATA[
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]></jsp:text>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page2 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Page2.form1}" id="form1">
    <!-- Non JSF REquests -->
                        <h:commandButton action="#{Page2.button1_action}" binding="#{Page2.button1}" id="button1" style="left: 48px; top: 48px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=1'; document.forms['form1'].submit(); return false;"/>
                        <h:commandButton action="#{Page2.button2_action}" binding="#{Page2.button2}" id="button2" style="left: 48px; top: 96px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=2'; document.forms['form1'].submit(); return false;"/>
                        <h:commandButton action="#{Page2.button3_action}" binding="#{Page2.button3}" id="button3" style="left: 48px; top: 144px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=3'; document.forms['form1'].submit(); return false;"/>
    <!-- this  is JSF request -->
                        <!--
                        <h:commandButton action="#{Page2.button1_action}" binding="#{Page2.button1}" id="button1" style="left: 48px; top: 48px; position: absolute" value="Submit" />
                        <h:commandButton action="#{Page2.button2_action}" binding="#{Page2.button2}" id="button2" style="left: 48px; top: 96px; position: absolute" value="Submit" />
                        <h:commandButton action="#{Page2.button3_action}" binding="#{Page2.button3}" id="button3" style="left: 48px; top: 144px; position: absolute" value="Submit" />-->
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Page1 Bean
    * Page2.java
    * Created on June 25, 2005, 11:08 AM
    * Copyright user
    package webapplication8;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import javax.faces.context.ExternalContext;
    import javax.faces.context.FacesContext;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class Page2 extends AbstractPageBean {
        // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
        private int __placeholder;
        private HtmlForm form1 = new HtmlForm();
        public HtmlForm getForm1() {
            return form1;
        public void setForm1(HtmlForm hf) {
            this.form1 = hf;
        private HtmlCommandButton button1 = new HtmlCommandButton();
        public HtmlCommandButton getButton1() {
            return button1;
        public void setButton1(HtmlCommandButton hcb) {
            this.button1 = hcb;
        private HtmlCommandButton button2 = new HtmlCommandButton();
        public HtmlCommandButton getButton2() {
            return button2;
        public void setButton2(HtmlCommandButton hcb) {
            this.button2 = hcb;
        private HtmlCommandButton button3 = new HtmlCommandButton();
        public HtmlCommandButton getButton3() {
            return button3;
        public void setButton3(HtmlCommandButton hcb) {
            this.button3 = hcb;
        // </editor-fold>
        public Page2() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
            } catch (Exception e) {
                log("Page2 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
        protected webapplication8.ApplicationBean1 getApplicationBean1() {
            return (webapplication8.ApplicationBean1)getBean("ApplicationBean1");
        protected webapplication8.SessionBean1 getSessionBean1() {
            return (webapplication8.SessionBean1)getBean("SessionBean1");
         * Bean cleanup.
        protected void afterRenderResponse() {
        public String button1_action()  throws Exception{
            // TODO Following code was replaced by static navigation
           getSessionBean1().setId(1);       
          /* ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
           HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
           HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
           res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
           return null;*/
            return "case1";
        public String button2_action()  throws Exception{
            // TODO Following code was replaced by static navigation
                getSessionBean1().setId(2);
          /*  ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
           HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
           HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
           res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
           return null;*/
            return "case2";
        public String button3_action() throws Exception{
            // TODO Following code was replaced by static navigation
                getSessionBean1().setId(3);
            /*    ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
           HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
           HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
           res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
            return null;*/
            return "case3";
    }page 2
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <jsp:text><![CDATA[
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]></jsp:text>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page1 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Page1.form1}" id="form1">
                        <h:panelGrid binding="#{Page1.gridPanel1}" id="gridPanel1" style="left: 96px; top: 48px; position: absolute"/>
                        <f:selectItems binding="#{Page1.radioButtonList1SelectItems1}" id="radioButtonList1SelectItems1"/>
                        <h:commandButton action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1"
                            style="left: 384px; top: 120px; position: absolute" value="Submit"/>
                        <h:commandButton action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1" style="left: 384px; top: 72px; position: absolute" value="Submit"/>
                        <h:outputLink binding="#{Page1.hyperlink1}" id="hyperlink1" style="left: 480px; top: 216px; position: absolute" value="http://www.sun.com/jscreator">
                            <h:outputText binding="#{Page1.hyperlink1Text}" id="hyperlink1Text" value="Hyperlink"/>
                        </h:outputLink>
                        <h:commandLink binding="#{Page1.linkAction1}" id="linkAction1" style="left: 456px; top: 264px; position: absolute">
                            <h:outputText binding="#{Page1.linkAction1Text}" id="linkAction1Text" value="Link Action"/>
                        </h:commandLink>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>page2 bean
    * Page1.java
    * Created on June 25, 2005, 10:52 AM
    * Copyright user
    package webapplication8;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import com.sun.jsfcl.data.DefaultSelectItemsArray;
    import java.util.Vector;
    import javax.faces.component.UIComponent;
    import javax.faces.component.UISelectItems;
    import javax.faces.component.html.*;
    import javax.faces.context.ExternalContext;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.model.SelectItem;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class Page1 extends AbstractPageBean {
        // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
        private int __placeholder;
        private HtmlForm form1 = new HtmlForm();
        public HtmlForm getForm1() {
            return form1;
        public void setForm1(HtmlForm hf) {
            this.form1 = hf;
        private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
        public HtmlPanelGrid getGridPanel1() {
            return gridPanel1;
        public void setGridPanel1(HtmlPanelGrid hpg) {
            this.gridPanel1 = hpg;
        private HtmlCommandButton button1 = new HtmlCommandButton();
        public HtmlCommandButton getButton1() {
            return button1;
        public void setButton1(HtmlCommandButton hcb) {
            this.button1 = hcb;
        private HtmlOutputLink hyperlink1 = new HtmlOutputLink();
        public HtmlOutputLink getHyperlink1() {
            return hyperlink1;
        public void setHyperlink1(HtmlOutputLink hol) {
            this.hyperlink1 = hol;
        private HtmlOutputText hyperlink1Text = new HtmlOutputText();
        public HtmlOutputText getHyperlink1Text() {
            return hyperlink1Text;
        public void setHyperlink1Text(HtmlOutputText hot) {
            this.hyperlink1Text = hot;
        private HtmlCommandLink linkAction1 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction1() {
            return linkAction1;
        public void setLinkAction1(HtmlCommandLink hcl) {
            this.linkAction1 = hcl;
        private HtmlOutputText linkAction1Text = new HtmlOutputText();
        public HtmlOutputText getLinkAction1Text() {
            return linkAction1Text;
        public void setLinkAction1Text(HtmlOutputText hot) {
            this.linkAction1Text = hot;
        // </editor-fold>
        public Page1() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
                ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
                HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
                HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
                String id=req.getParameter("id");
                if(id!=null)
                    getSessionBean1().setId(Integer.parseInt(id));
                if (getSessionBean1().getId()==1) {
                    addTextBox();
                else if (getSessionBean1().getId()==2) {
                    addCheckBox();
                    addRadio();
                else if (getSessionBean1().getId()==3) {
                    addRadio();
                   // addCheckBox();
            } catch (Exception e) {
                log("Page1 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
        protected webapplication8.ApplicationBean1 getApplicationBean1() {
            return (webapplication8.ApplicationBean1)getBean("ApplicationBean1");
        protected webapplication8.SessionBean1 getSessionBean1() {
            return (webapplication8.SessionBean1)getBean("SessionBean1");
         * Bean cleanup.
        protected void afterRenderResponse() {
        private void addRadio() {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue("Some Desc");
            outputText.setId("somedesc2");
            HtmlSelectOneRadio checkBox = new HtmlSelectOneRadio();
            checkBox.setBorder(0);
            checkBox.setLayout("pageDirection");
            checkBox.setId("a3");
            UISelectItems items = new UISelectItems();
            DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
            vectDefaultSelectItemsArray.add(objArray);
            arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
            int size =arrays.length;
            arrays[size - 1].clear();
            for (int i =0;i<10;i++) {
                arrays[size - 1].add(new SelectItem(""+i+"",""+i));
            // array.setItems(new String[] {"Yes","No" });
            items.setValueBinding("value",getValueBinding("#{Page1.arrays["+(size-1)+"]}"));
            checkBox.getChildren().add(items);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(checkBox);
            parent.getChildren().add(gridPanel);
        private void addCheckBox() {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue("Some Desc");
            outputText.setId("somedesc1");
            HtmlSelectManyCheckbox checkBox = new HtmlSelectManyCheckbox();
            checkBox.setBorder(0);
            checkBox.setLayout("pageDirection");
            checkBox.setId("a2");
            UISelectItems items = new UISelectItems();
            DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
            vectDefaultSelectItemsArray.add(objArray);
            arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
            int size =arrays.length;
            arrays[size - 1].clear();
            for (int i =0;i<10;i++) {
                arrays[size - 1].add(new SelectItem(""+i+"",""+i));
            // array.setItems(new String[] {"Yes","No" });
            items.setValueBinding("value",getValueBinding("#{Page1.arrays["+(size-1)+"]}"));
            checkBox.getChildren().add(items);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(checkBox);
            parent.getChildren().add(gridPanel);
        private void addTextBox() {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue("Some Description for Control Text Box");
            outputText.setId("somedesc");
            HtmlInputText textField = new HtmlInputText();
            //  textField.setId("textField_"+control.getId());
            textField.setId("a1");
            HtmlOutputText outputText1 = new HtmlOutputText();
            hyperlink1Text.setValue(" ");
            hyperlink1Text.setStyleClass("bodyText");
            textField.setStyleClass("frmObjects");
            gridPanel.setColumns(3);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(hyperlink1Text);
            gridPanel.getChildren().add(textField);
            parent.getChildren().add(gridPanel);
        private DefaultSelectItemsArray array = new DefaultSelectItemsArray();
        public DefaultSelectItemsArray getArray() {
            return array;
        public void setArray(DefaultSelectItemsArray dsia) {
            this.array = dsia;
        private Vector vectDefaultSelectItemsArray = new Vector();
        private DefaultSelectItemsArray[] arrays = new DefaultSelectItemsArray[10];
        public DefaultSelectItemsArray[] getArrays() {
            return arrays;
        public void setArrays(DefaultSelectItemsArray[]dsia) {
            this.arrays = dsia;
        private UISelectItems radioButtonList1SelectItems1 = new UISelectItems();
        public UISelectItems getRadioButtonList1SelectItems1() {
            return radioButtonList1SelectItems1;
        public void setRadioButtonList1SelectItems1(UISelectItems uisi) {
            this.radioButtonList1SelectItems1 = uisi;
        private ValueBinding getValueBinding(String expression) {
            return     FacesContext.getCurrentInstance().getApplication().createValueBinding(expression);
        public String button1_action() {
            // TODO Replace with your code
            return "case1";
    }my navigation.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                                  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
        <navigation-rule>
            <from-view-id>/Page2.jsp</from-view-id>
            <navigation-case>
                <from-outcome>case1</from-outcome>
                <to-view-id>/Page1.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>case2</from-outcome>
                <to-view-id>/Page1.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>case3</from-outcome>
                <to-view-id>/Page1.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
        <navigation-rule>
            <from-view-id>/Page1.jsp</from-view-id>
            <navigation-case>
                <from-outcome>case1</from-outcome>
                <to-view-id>/Page2.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
    </faces-config>my managed beans xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                                  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
        <managed-bean>
            <managed-bean-name>Page1</managed-bean-name>
            <managed-bean-class>webapplication8.Page1</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>SessionBean1</managed-bean-name>
            <managed-bean-class>webapplication8.SessionBean1</managed-bean-class>
            <managed-bean-scope>session</managed-bean-scope>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>ApplicationBean1</managed-bean-name>
            <managed-bean-class>webapplication8.ApplicationBean1</managed-bean-class>
            <managed-bean-scope>application</managed-bean-scope>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>Page2</managed-bean-name>
            <managed-bean-class>webapplication8.Page2</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
        <managed-bean>
    </faces-config>

  • How to attach data to url of a jsf page in sun creator

    Can somebody tell me how to attach data to url of a jsf page for example String url="http://w-ngphc-0672.ng.ad.ep.corp.local:8080/Questionnaire/QuestionnaireConnector.jsp?ticket_id="+C.getTicket_id(); accesing this url uses value of C.getTicket_id() and populate the jsp page. How can I achieve this using jsf page in sun creator .
    I'm developing a workflow where url is sent to people and on clicking of the url it takes them to the form of the particular sender with its id attached to the url of the page.

    Here's how I do something similar:
    <ui:hyperlink binding="#{dfrReviewPage.hyperlink4}" id="hyperlink4" style="text-decoration: line-through"
                                                    text="DFR #{currentRow.value['d1.replacesdfr']}"
                                                    url="/getReport/DFR#{currentRow.value['d1.replacesdfr']}.pdf?reportId=#{currentRow.value['d3.replacesformat']}&exportType=0&id=#{currentRow.value['d1.replacesdfr']}" visible="#{currentRow.value['d1.replacesdfr']!=null}"/>As you probably gathered from the currentRow var this is embedded in a table but it could be bound to any bean type object.

  • 404 error access JSF pages

    Hello,
    When I was running my JSF application through the embeded Tomcat 6.0.18 server in Netbeans 6.5.1 all worked fine. After deploying the *.WAR file to the stand alone Tomcat 6.0.18 server I get a 404 error when I access the jsf pages. The default page at http://localhost:8080 work fine and so does the servlet in the same webapp as my jsfs. I tried downloading the JSF & JSTL frameworks and placing the contents of their lib directory into TOMCATHOME/lib and restarted the server - no effect
    Pls Help ! Thnx
    (URL im using to access one of the jsf pages is http://localhost:8080/LUIDManager/LUID_Config_List.jsf)
    Here is my web.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>false</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>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
        <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>initServlet</servlet-name>
            <servlet-class>Servlets.initServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>initServlet</servlet-name>
            <url-pattern>/initServlet</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>forwardToJSF.jsp</welcome-file>
            </welcome-file-list>
        <resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/luidregistry</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
        </web-app>Edited by: paulchwd on Apr 15, 2009 5:01 PM

    Thnx for your reply. Not sure what Faclets are. I added the JSF 1.2 framework from Netbeans into my project. I am also an idiot :)
    The links the servlet generates to take me to the JSFs had a typo - wrong port #
    Thnx for the help

  • JSF page & Sqlserver DB - gave 'Use the sqljdbc4' class error !

    Hello,
    I created an JSF page with business components and data controls generated from a connected sqlserver database.
    The driver class used is 'sqljdbc4.jar' and works for all generaled VIEW LINKS by the AppModule.
    However, on running the created JSF page, I get the following error - although the 'sqljdbc4.jar class (NOT sqljdbc.jar) is used for the DB connection, and the only reference in the application.
    The error message is:
    Could not create pool connection. The DBMS driver exception was: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
    QUESTION: Does that mean that I need to locate another sqlserver driver that supports JRE version 1.6 - although I understood from the documentation that 'sqljdbc4.jar' should work with JRE version 1.6?
    see full message log below - when trying to deploy the JSF page:
    *** Using port 7101 ***
    C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m
    WLS Start Mode=Development
    CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1032\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~1.5-3\lib\tools.jar;C:\Oracle\MIDDLE~1\utils\config\10.3\config-launch.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.2.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\Middleware\jdeveloper\webcenter\modules\oracle.portlet.server_11.1.1\oracle-portlet-api.jar;C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;.;C:\Program Files\TIBCO;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;C:\KEEP\A_SOA_ActiveVOS\SQLserverjdbc_Driver\sqljdbc_2.0\enu\sqljdbc.jar
    PATH=C:\Oracle\MIDDLE~1\patch_wls1032\profiles\default\native;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0\bin;C:\Oracle\MIDDLE~1\JDK160~1.5-3\jre\bin;C:\Oracle\MIDDLE~1\JDK160~1.5-3\bin;C:\app\Administrator\product\11.1.0\db_4\bin;C:\app\Administrator\product\11.1.0\db_3\bin;C:\app\Administrator\product\11.1.0\db_1\bin;C:\Program Files\PHP\;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Windows System Resource Manager\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\ANT\bin;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Common Files\DivX Shared\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE;;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_14"
    Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
    Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode)
    Starting WLS with line:
    C:\Oracle\MIDDLE~1\JDK160~1.5-3\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Djavax.net.ssl.trustStore=C:\Oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks -Dhttp.proxyHost=emeacache.uk.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=null -Dhttps.proxyHost=emeacache.uk.oracle.com -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts=null -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -da -Dplatform.home=C:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Djps.app.credential.overwrite.allowed=true -Ddomain.home=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1 -Dcommon.components.home=C:\Oracle\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.domain.config.dir=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1 -Doracle.server.config.dir=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1\servers\DefaultServer -Doracle.security.jps.config=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\fmwconfig\jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.carmlloc=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1\carml -Digf.arisidstack.home=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1\arisidprovider -Dweblogic.alternateTypesDirectory=\modules\oracle.ossoiap_11.1.1,\modules\oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\oracle\store\gmds -DUSE_JAAS=false -Djps.policystore.hybrid.mode=false -Djps.combiner.optimize.lazyeval=true -Djps.combiner.optimize=true -Djps.auth=ACC -Doracle.core.ojdl.logging.usercontextprovider=oracle.core.ojdl.logging.impl.UserContextImpl -Doracle.wc.openusage.clustername=localhost -Doracle.wc.openusage.collectorport=31314 -Doracle.wc.openusage.timeout=30 -Doracle.wc.openusage.unicast=true -Doracle.wc.openusage.enabled=false -Doracle.webcenter.tagging.scopeTags=false -XX:+UseParallelGC -XX:+DisableExplicitGC -Dwc.oracle.home=C:\Oracle\Middleware\jdeveloper -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1032\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath weblogic.Server
    <Apr 19, 2010 6:36:22 PM EDT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\lib\mbeantypes\csp-id-asserter.jar>
    <Apr 19, 2010 6:36:23 PM EDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 14.0-b16 from Sun Microsystems Inc.>
    <Apr 19, 2010 6:36:24 PM EDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PDT 2009 1267925 >
    <Apr 19, 2010 6:36:27 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Apr 19, 2010 6:36:27 PM EDT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Apr 19, 2010 6:36:29 PM EDT> <Notice> <LoggingService> <BEA-320400> <The log file C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Apr 19, 2010 6:36:29 PM EDT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log00003. Log messages will continue to be logged in C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log.>
    <Apr 19, 2010 6:36:29 PM EDT> <Notice> <Log Management> <BEA-170019> <The server log file C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log is opened. All server side log events will be written to this file.>
    <Apr 19, 2010 6:36:49 PM EDT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Apr 19, 2010 6:37:27 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Apr 19, 2010 6:37:28 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Apr 19, 2010 6:38:44 PM EDT> <Notice> <LoggingService> <BEA-320400> <The log file C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Apr 19, 2010 6:38:44 PM EDT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log00003. Log messages will continue to be logged in C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log.>
    <Apr 19, 2010 6:38:44 PM EDT> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <Apr 19, 2010 6:38:48 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <Apr 19, 2010 6:38:48 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <Apr 19, 2010 6:38:48 PM EDT> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.254.255.241:7101 for protocols iiop, t3, ldap, snmp, http.>
    <Apr 19, 2010 6:38:48 PM EDT> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <Apr 19, 2010 6:38:48 PM EDT> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 0:0:0:0:0:0:0:1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <Apr 19, 2010 6:38:48 PM EDT> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "DefaultServer" for domain "DefaultDomain" running in Development Mode>
    <Apr 19, 2010 6:38:48 PM EDT> <Warning> <Server> <BEA-002611> <Hostname "WINSERVR2008", maps to multiple IP addresses: 10.254.255.241, 0:0:0:0:0:0:0:1>
    <Apr 19, 2010 6:38:49 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Apr 19, 2010 6:38:49 PM EDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    IntegratedWebLogicServer startup time: 192201 ms.
    IntegratedWebLogicServer started.
    [Running application BraaineDBupdateV1 on Server Instance IntegratedWebLogicServer...]
    [06:39:24 PM] ---- Deployment started. ----
    [06:39:24 PM] Target platform is (Weblogic 10.3).
    [06:39:30 PM] Retrieving existing application information
    [06:39:33 PM] Running dependency analysis...
    [06:39:33 PM] Deploying 2 profiles...
    [06:39:37 PM] Wrote Web Application Module to C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\o.j2ee\drs\BraaineDBupdateV1\ViewControllerWebApp.war
    [06:39:39 PM] Wrote Enterprise Application Module to C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\o.j2ee\drs\BraaineDBupdateV1
    [06:39:39 PM] Deploying Application...
    <Apr 19, 2010 6:39:43 PM EDT> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application BraaineDBupdateV1 is not versioned.>
    <SQLServerConnection><<init>> Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
    <Apr 19, 2010 6:39:45 PM EDT> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for pool "BraineDB": Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.>
    <Apr 19, 2010 6:39:47 PM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1271716780677' for task '0'. Error is: 'weblogic.application.ModuleException: '
    weblogic.application.ModuleException:
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:290)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:59)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:256)
         at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1180)
         at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1104)
         at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:244)
         at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1065)
         Truncated. see log file for complete stacktrace
    >
    <Apr 19, 2010 6:39:47 PM EDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'BraaineDBupdateV1'.>
    <Apr 19, 2010 6:39:47 PM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException:
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:290)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:59)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:256)
         at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1180)
         at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1104)
         at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:244)
         at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1065)
         Truncated. see log file for complete stacktrace
    >
    [06:39:47 PM] #### Deployment incomplete. ####
    [06:39:47 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
    #### Cannot run application BraaineDBupdateV1 due to error deploying to IntegratedWebLogicServer.
    [Application BraaineDBupdateV1 stopped and undeployed from Server Instance IntegratedWebLogicServer]

    No, you already have the needed driver in sqljdbc4.jar. The problem is that your classpath first points to sqljdbc.jar
    >
    ...;C:\KEEP\A_SOA_ActiveVOS\SQLserverjdbc_Driver\sqljdbc_2.0\enu\sqljdbc.jar
    >
    so this dirver is loaded instead of the sqljdbc4.jar.
    Remove the old jar from the class path and try again.
    Timo

  • PrepareRender() called multiple times if I have HTML/Images on a JSF page

    I have extended ADFPhaseListener and also FacesPageLifecycle. I am overriding the prepareRender() method in the CustomFacesPageLifecycle.
    When I insert an image on to the page in the branding facet or add any html using verbatim tag, the prepareRender() method is called two times. I am not sure why?
    If I remove the images/html, the method is only executed once.
    If I have image/html in the page, another strange thing is that the first time all the custom lines of code gets executed in prepareRender() method. But the second time only first few lines of code in the prepareRender() method. This seems to me a very wierd behaviour.
    Any inputs from ADF product dev team?
    Thanks
    - Amit Kochar

    Hi,
    if you add the following print statement
    System.out.println("rendering "+FacesContext.getCurrentInstance().getViewRoot().getViewId());
    Then the output in my case is
    07/04/24 08:14:04 rendering /BrowsePage.jsp
    07/04/24 08:14:05 rendering /otn_logo_small.gif
    The image comes from the file system, which means it is rendered by the JSF lifecycle. If you reference the image with a URL then the lifecycle doesn't render the image but only refrences it.
    To avoid your prepare render code to be executed multiple times, just check for jsp and jspx file extensions, which will guarantee that your code only executes for JSF pages, not for loaded files.
    The reason why this happens is because the JSF filter is set to /faces , which means all files that are loaded through that path
    Frank

  • Include jsp/jsf code in a jsf page at runtime

    Hello,
    I have a problem. I must get data from a Firebird db. The data is posted in jsp/jsf
    code. I've tried to get them through a servlet. The problem is that when I include
    result in my jsf page, the code doesn't get compiled.
    If I include code with a <h:outputText> or a jsp action <jsp:include> or a <c:import
    url> the code doesn't get compiled. If I include code with directive <%include> it is
    translated correctly, but include directive accepts only physical files.
    Any suggestion?
    Thanks

    Hello,
    I have a problem. I must get data from a Firebird db. The data is posted in jsp/jsf
    code. I've tried to get them through a servlet. The problem is that when I include
    result in my jsf page, the code doesn't get compiled.
    If I include code with a <h:outputText> or a jsp action <jsp:include> or a <c:import
    url> the code doesn't get compiled. If I include code with directive <%include> it is
    translated correctly, but include directive accepts only physical files.
    Any suggestion?
    Thanks

  • I use js change the sequence of options, JSF go through lifecycle, why?

    Hi,All
    When I use javascript change the sequence of options,
    JSF go through Restore View, Apply Request Value,
    Process Validations, Render Response four lifecycle. why?
    <f:view>
    <head>
    <script>
    function moveDown()
         var selObj = document.getElementById("org_rank:childOrgs");
         var index = selObj.selectedIndex;
         if (index == -1 || index >= selObj.options.length - 1)
         return;
         var selectedText = selObj.options[index].text;
         var selectedValue = selObj.options[index].value;
         selObj.options[index].text = selObj.options[index + 1].text;
         selObj.options[index].value = selObj.options[index + 1].value;
         selObj.options[index + 1].text = selectedText;
         selObj.options[index + 1].value = selectedValue;
         //selObj.options[index + 1].selected = true;
    </script>
    </head>
    <body>
    <h:form id="org_rank">
    <table align="center" border="1" cellpadding="0" cellspacing="0">
    <tr>
    <td align="middle" heigth="100" width="160">
    <h:selectOneListbox id="childOrgs" value="#{orgDelegate.curId}" style="height:100px;width:150px" >
    <f:selectItems id="orgNames" value="#{orgDelegate.orgNames}" />
    </h:selectOneListbox>
    </td>
    <td align="middle" width="80">
    <h:commandButton value="down" onclick="moveDown()" /><br><br>
    </td>
    </tr>
    </table>
    <h:messages styleClass="errorMessage" layout="table" showDetail="true" showSummary="false" />
    </h:form>
    </body>
    </f:view>

    When you say the text shrinks when you change the size of the window, do you mean in terms of making the window smaller / zooming out from the page so that for instance you can see more of the "page" that you're working on?
    If so then that's by design and is how it's always been. The view you see in Word is designed to represent what would appear on the page if you printed it, so relative to the page the text remains the same size. If you change the page so that you can see
    more of it, eg effectively zooming out, then the size of the text must shrink. It's no different to holding a physical document in front of you, if you move the paper further away from you so the page looks smaller, the text will as well.
    On the other hand if you mean when you make the window smaller, eg displaying less of the grey space on either side, that the page and text shrink then I don't know what you mean. Which version of Word are you using? I've tried with Word documents in Word
    2010 and Word 2013, and in both cases simply changing the size of the document window does nothing to the view of the document (other than make it impossible to read all the test on a line without scrolling if I go too far.

  • On JSF Page load UI components loading sequence

    Hi All,
    I have some questions about the UI components loading sequence on the JSF page load.
    When a JSF page loads it loads its UI components which have a sequence of getters and setters declared in the backing bean of that jspx page.
    Qustion 1: How these getters and setters in backing bean work in loading the jspx page?
    Question 2: How this backing bean is related to the Page Definition file for the page loading?
    Question 3 (main query): What is the sequence of the getters and setters. Means, if i drop 3 UI components, 1 input text, then a command button and then an output text, then they are accordingly declared in backing bean. On page load first i/p texts getter gets called, then setter, then command button's and theno/p texts, in these sequence.
    But can i manipulate their sequence of loading. If yes then how it can be possible?

    Answer 1: Getters and Setters in bean normally will be bounded to ui component's properties in jspx page, when jspx page loads these getters get called through introspection and setters gets called when a request is submitted.
    Answer 2: Backing bean and page definition are two different entities and they are no way related unless you have a data control for the backing bean and have bindings for those methods in page definition file
    Answer 3: The sequence of getters and setters depends on the order of the components they bounded to in jspx page. components in jsf page gets loaded from top to bottom so the getter bound to the top component gets called first and the getter bound to bottom component gets called last.
    The only way to change the sequence of getter methods getting called is to just change the order of the components they bound to in jspx page.
    Usually, it is not suggested to put business logic inside getters and setters, where you have action and actionlisteners for the same. If you follow that, you don't need to worry of the sequence of getters and setters execution
    Sireesha

  • Error loading JSF page popup window - Cannot find FacesContext

    Hello,
    I am trying to load a popup window from my Visual Web JSF page. The popup window itself will be a Visual Web JSF page also.
    As an example, i have 2 buttons on my original page with jsp tags as follows::
    <webuijsf:button binding="#{Page1.button1}" id="button1" onClick="window.showModelessDialog('./PopupPage.jsp'); return false;"
    style="left: 19px; top: 16px; position: absolute" text="Button"/>
    <webuijsf:button actionExpression="#{Page1.button2_action}" binding="#{Page1.button2}" id="button2"
    onClick="window.showModelessDialog('./PopupPage.jsp');" style="position: absolute; left: 20px; top: 44px" text="Button"/>
    When i click Button1, the popup window appears but will not load the page within the window. I get the following report in the server log:
    StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
    at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
    at org.apache.jsp.PopupPage_jsp._jspx_meth_f_view_0(PopupPage_jsp.java from :102)
    at org.apache.jsp.PopupPage_jsp._jspService(PopupPage_jsp.java from :77)
    ETC ETC
    If i click Button2 (which does NOT return false in the onclick Script and thus submits the first page) the first attempt fails with the same error, but if i try a second time the popup window displays and loads the page correctly.
    Any solutions would be greatly appreciated as this is driving me crazy :-s
    Edited by: coxy69 on Jan 9, 2008 10:29 PM

    Cannot find FacesContextThis generally indicates that you invoked a request which points to a JSP page which contains JSF tags, but that the request itself isn't passed through the FacesServlet. Make sure that the request URL is covered by the url-pattern setting of the FacesServlet in the web.xml.

  • Method call before visual web jsf page loads

    Hi All.....
    I have written a method in a java class that accesses the mysql backend db to check if a process is still running. If the process is still running, a JOptionPane is produced informing the user of this and offers an <ok> option(to check the process status again) and a <cancel> option(to redirect the user to the homepage). If the process is completed, I want the page to just load as normal. I want this method to be called before the visual web jsf page loads. I have the method call in the super_init() method of the page and everything seemed to be working fine, the problem I have run into is that if I set the value in the db to show the process is running, the JOptionPane is produced(like it should be), and then if I set the value to show the process has completed and choose <ok> from the pane, the page loads.....this is what I want. Now, after the page loads, if I set the value in the db to show the process is running again, the JOptionPane is produced again right after I apply the changes to the db edit!!!!. I don't know why this is happening. Should I be calling the method from somewhere other the super_init()????? I have tried the method call in the prerender(), preprocess(), and destroy() methods all with the same results.
    Anyone have any ideas on what the problem could be??
    Thanks in advance.
    Silgd

    The Java part of a JSP/Servlet based webapplication runs physically at the server machine.
    Only the HTML/CSS/JS part which is generated by the webapplication and sent to the client physically runs at the client machine.
    JOptionPane is a Java Swing component which thus runs at the server machine. So you as client would only see it when both the server and the client runs at physically the same machine. Which is often only the case in development environment and doesn´t occur in real life! There is normally means of two physically different machines connected through the network/internet.
    To solve your actual problem, look for Ajax poll techniques. To display an alert or confirm dialogue in the client side, you use Javascript for this.

Maybe you are looking for