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>

Similar Messages

  • [SOLVED!] On USB drives, problems with non-English chars and HAL

    Hello,
    I am having a problem with non-English caracters (áãàçéẽê...) on files stored on my USB drive.
    On Windows they're created with the correct name. But on Linux the files have the non-English characteres replaced by '?' and are not accessible.
    If I manuallly mount the drives using 'mount -o iocharset=utf8 /dev/sdb1 /media/usbdisk' the characters are OK, so I think I just need to get HAL to pass the correct parameters to mount. However I don't know how to do that, and haven't found any good solution.
    I tried to build a custom kernel setting the default charset as UTF-8 and it didn't work.
    Any ideas? I'm using x86-64, HAL 0.5.13-3 and my locale is pt-BR.UTF-8.
    Thanks!
    EDIT: Actually, this is not a HAL problem, but a problem with 'exo'. For the solution, I edited /etc/xdg/xfce4/mount.rc and added iocharset=utf8 to the [vfat] category.
    Last edited by Renan Birck (2009-11-28 20:54:23)

    I don't use Thunar presently, but I looked in the Thunar Volume Manager doc and I didn't find anything to change the mount options of removable drives. I am not quite sure if it's possible or not. Maybe someone using it can tell for sure.
    But if it is not possible to change the mount options, a possible solution is to disable the Thunar Volume Manager plugin and to use something else more configurable to manage the automount function.
    Personally I use the halevt package from AUR which uses configuration files in the xml format.
    It's not so easy to use but is highly configurable.
    But there exists other tools also.
    I can help you with halevt if you choose that way...

  • Problems with non-ASCII characters on Linux Unit Test Import

    I found a problem with non-ASCII characters in the Unit Test Import for Linux.  This problem does not appear in the Unit Test Import for Windows.
    I have attached a Unit Test export called PROC1.XML  It tests a procedure that is included in another attachment called PROC1.txt. The unit test includes 2 implementations.  Both implementations pass non-ASCII characters to the procedure and return them unchanged.
    In Linux, the unit test import will change the non-ASCII characters in the XML file to xFFFD. If I copy/paste the the non-ASCII characters into the Unit Test after the import, they will be stored and executed correctly.
    Amazon Ubuntu 3.13.0-45-generic / lubuntu-core
    Oracle 11g Express Edition - AL32UTF8
    SQL*Developer 4.0.3.16 Build MAIN-16.84
    Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)
    In Windows, the unit test will import the non-ASCII characters unchanged from the XML file.
    Windows 7 Home Premium, Service Pack 1
    Oracle 11g Express Edition - AL32UTF8
    SQL*Developer 4.0.3.16 Build MAIN-16.84
    Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
    If SQL*Developer is coded the same between Windows and Linux, The JVM must be causing the problem.

    Set the System property "mail.mime.decodeparameters" to "true" to enable the RFC 2231 support.
    See the javadocs for the javax.mail.internet package for the list of properties.
    Yes, the FAQ entry should contain those details as well.

  • Problem with non iPhone users receiving my text sent pictures. Can I make them smaller files?

    Problem with non iPhone users receiving my text sent pictures.  Can I make them smaller files? I know that is possible for email sent pics.

    My bad,  It was a Verizon problem.  When they upgraded my phone they were supposed to remove all blocks on messaging . Found out they did not do this.  All messaging now works.  Thanks for listening.

  • Problems with non-ascii keywords

    I have some problems with non-ascii keywords that makes the whole keyword feature useless for me. I don't know if I'm doing something wrong or if there something I'm missing completely.
    The problem is that when I enter something like "grön" iPhoto sometimes refuses me to type in "grön" on another photo and "eats" the "ö". And if I select the matching keyword from the popup list iPhoto has changed the originally "grön" to "gr¨ön" (if that comes out right on the web). Here are a few screenshots to show what happens
    If someone knows what happens I would really appriciate some hints on how to avoid this.
    Note that adding/editing keywords works just fine in Aperture.

    There is a long standing issue with iPhoto and non-ascii characters. I know of no solution.
    iPhoto menu -> Provide iPhoto Feedback and report it as a bug.
    Regards
    TD

  • Weird problems with CSS being applied to JSF pages

    I have this really weird problem with my CSS rules being applied to my JSF pages. My CSS rules don't get applied unless one of the following two things happen:
    - A page is reloaded (by redirecting to itself, or if there were validation errors)
    - The previous page in the history had the same relative reference to the same CSS file.
    If a page is newly loaded, and the previous page did not have that same CSS reference, the CSS styles will not show up. Also, if the above is true, and the page is reloaded by JSF, the CSS styles show up.
    Now, my problem could be solved if I put all JSP files in the same level, but the display of the first page would still be without the CSS style applied.
    Is this known behaviour? And if it is, does it have anything to do do with the way JSF handles URLs (always one level back)? Help and input is kindly appreciated!

    Dude,
    I tried the same
    <link rel="stylesheet" href="<h:outputText value="#{facesContext.externalContext.requestContextPath}"/pages/css/default.css" />
    and I got the following Jasper exception.... pointers plz ??
    =============================================================
    2005-08-24 14:18:55,937 [http-8080-Processor25] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[mydemo].[FacesServlet] - Servlet.service() for servlet FacesServlet threw exception
    org.apache.jasper.JasperException: /myproj/eventCrit.jsp(8,78) Unterminated <h:outputText tag
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:130)
         at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1049)
         at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1793)
         at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1060)
         at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    =========================================================

  • Problem with Javascript and opening a new page

    Hi,
    I'm developping a website with Java Server Faces.
    I've a problem with JavaScript.
    I have a table, and each row of that table, has a button, to display more information about that specific row. I want to display this information in a new window. For this I want to use JavaScript.
    The new window, of course, needs some information of the other window, to show the right data.
    The first time I click the 'more-information-button', it works perfectly, but from than on, he keeps showing the same information...
    Here is my jsp-page of the first page (the one with the table):
    <?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"/>
        <f:view>
             <f:loadBundle basename="languages.MessageBundle" var="bundle"/>
            <html>
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>- UCV-Period -</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                        <h:dataTable binding="#{UcvPeriod.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd" rows="5"
                            style="left: 24px; top: 168px; position: absolute" value="#{UcvPeriod.dataTable1Model}" var="currentRow">
                            <h:column binding="#{UcvPeriod.column1}" id="column1">
                                <h:outputText binding="#{UcvPeriod.outputUcvPeriod}" id="outputUcvPeriod" value="#{currentRow['UCVPERIOD']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText2}" id="outputText2" value="#{bundle.ucvPeriod_columnHeader_ucvPeriod}"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{UcvPeriod.column11}" id="column11">
                                <h:commandButton action="#{UcvPeriod.btnDetails_action}" binding="#{UcvPeriod.btnDetails}" id="btnDetails" value="+" onclick="window.open('Details.jsp')"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText21}" id="outputText21" value=""/>
                                </f:facet>
                            </h:column>
                        </h:dataTable>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Here is my action, when someone clicks on the 'more-information-button':
    public String bthnDetails_action() {
       Object s = outputUcvPeriod.getValue();
       BigDecimal ucvPeriod = (BigDecimal)outputUcvPeriod.getValue();
       this.getSessionBean().setUcvPeriod(new Integer(ucvPeriod.intValue());
       return "detail_ucvperiod";
    }Here is my constructor of the Detailspage.
        public Details() {
             this.txtUcvPeriod.setValue(this.getSessionBean().getUcvPeriod());
        }Here is the navigation part for this part of my faces-config.xml .
    <navigation-rule>
       <from-view-id>/UcvPeriod.jsp</from-view-id>
       <navigation-case>
           <from-outcome>detail_ucvperiod</from-outcome>
           <to-view-id>/UcvPeriod.jsp</to-view-id>
       </navigation-case>
    </navigation-rule>Thx a lot....
    Anneke

    See the tutorial "Sharing Data Between Two Pages" at http://devservices.sun.com/premium/jscreator/standard/learning/tutorials/data_sharing_twopages.html and the FAQ "How can I pass data between pages without creating SessionBean variables in Creator?" at http://devservices.sun.com/premium/jscreator/standard/reference/faqs/technical/javasource/passing_data.html. Since you can open a new window when your button is clicked, the tutorial and FAQ will explain ways to pass your data to the new window.

  • Problem with a text in the last page of XML Publisher Template

    Oracle Applications : 11.5.10.2
    Oracle BI Publisher Template Builder for Word 10.1.3.4 Build 129
    Hi,
    I have a problem with XML Templates, I need that a text (*Este documento no confiere origen, señala únicamente país de manufactura.) is always at the bottom of a table and it has to be in every page, the problem is in the last page where the text is showed twice.
    <?start:body?>
    LINEA EN
    FACTURA
    DESCRIPCIÓN
    CANTIDAD
    NO. DE SERIE
    PAIS DE MANUFACTURA*
    F LINE_NUMBER
    ITEM_DESCRIPTION
    CF_PRIMARY_QTY
    CF_SERIAL_NUMBER
    CF_PAIS_DE_ORIGEN
    E
    *Este documento no confiere origen, señala únicamente país de manufactura.<?end body?>
    *Este documento no confiere origen, señala únicamente país de manufactura.
    Is there a way in order not to print the text twice in the last page?.
    Regards,
    Sergio.

    Whatever the problem, it's likely due to how those paragraphs
    were formatted in Word. The RH conversion usually only reflects
    what was done there.
    Are you comfortable inspecting the underlying HTML code (the
    RH TrueCode tab)? I think you'd find some type of SPAN tag or STYLE
    attribute that is determining an absolute paragraph width.
    Otherwise, you could try this experiment:
    1. Strip the base Word doc to a moderate size, but which
    includes at least one of these non-wrapping paragraphs.
    2. Select All and press Ctrl+spacebar (this removes all
    formatting from the selected text).
    3. Import that Word doc to RH and see how it looks now.
    Good luck,
    Leon

  • Problem with non modal ADM dialog

    I have problem with focus and mouse and keyboard event passing to non modal dialog if some modal window was opened and closed on Windows platform.
    I have this problem in my plugin, but also I did some tests with SDK WordFinder Plugin.There are 2 dialogs open there : CountDialog-non modal dialog and PromtDialog-modal one. I commented all lines in function DeleteCountDialog to leave this dialog on the screen. So, first, when "create page map" menu is selected, CountDialog is appearing and stays on the screen. At this stage, it can be moved and get focus when is clicked.After that, I click on "find word by word offset" and then PromtDialog is appearing. when I close Promtdialog by clicking on OK or Cancel, CountDialog is "freezing" - means, it can not be moved and does not get focus when I click on it.
    Is it known problem ? Is there is some workaround there ?
    thanks in advance,
    Lidia.

    Thanks a lot for your response.
    I did changes as you recommended, but still have the same result.
    So I have WordFinder from Acrobat SDK 8 with only one file changed:WordFinderDlg.cpp - see below.The result is the same:
    1. I open Acrobat->Open some file
    2. Click on "Advanced->Acrobat SDK->Word Finder->create Page Map" menu
    3. "count" non Modal Dialog is opened and working and then stays on the screen and can be moved without problem.
    4. Now I click on "Advanced->Acrobat SDK->Word Finder->find Word By Offset" - Modal Promt Dialog is opened. click some number and then click ok - choosen word is selected in Acrobat. From this moment, first "Count" dialog is frosen - can be selected, can not be moved.
    The only workaround I see here is to create non Modal dialog every time I close Modal one.
    Could you please advice ? May I please send to you project in zip ?
    I really need it ASAP ?
    thanks in advance,
    Lidia.
    ADOBE SYSTEMS INCORPORATED
    Copyright (C) 1994-2006 Adobe Systems Incorporated
    All rights reserved.
    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the Adobe license agreement
    accompanying it. If you have received this file from a source other
    than Adobe, then your use, modification, or distribution of it
    requires the prior written permission of Adobe.
    \file WordFinderDlg.cpp
    - Implements a modeless progress dialog and a generic prompt dialog.
    // Acrobat headers
    #ifdef WIN_PLATFORM
    #include "PIHeaders.h"
    #endif
    #include "ADMAcroSDK.h"
    #include "resource.h"
    Constants/Declarations
    static ADMDialogRef countDialog;
    static AVWindow gAVWindow = NULL;
    // Global variables used for simplicity
    const ASInt32 MaxLen = 80;
    static char textStr[MaxLen];
    static char titleStr[MaxLen];
    static char msgStr[MaxLen];
    Modeless Progress Dialog
    /* UpdateCountDialog
    ** Updates the dialog with a new GUI function to show count number
    void UpdateCountDialog(ASInt32 cnt)
    ADMItemRef itemRef;
    itemRef = sADMDialog->GetItem(countDialog, IDC_COUNT);
    sADMItem->SetIntValue(itemRef, cnt);
    sADMDialog->Update(countDialog);
    /* CreateCountDialog
    /** GUI function to delete the count dialog
    void DeleteCountDialog(void)
    // destroy dialog
    /*if (countDialog) {
    sADMDialog->Destroy(countDialog);
    countDialog = NULL;
    // Release ADM
    ADMUtils::ReleaseADM();*/
    /* SettingsCountDialogOnInit
    ** Called to initialize the the dialog controls
    ASErr ASAPI CountDialogOnInit(ADMDialogRef dialogRef)
    ADMItemRef itemRef;
    itemRef = sADMDialog->GetItem(dialogRef, IDC_COUNT);
    sADMItem->SetUnits(itemRef, kADMNoUnits);
    sADMItem->SetIntValue(itemRef, 0);
    return kSPNoError;
    /* CreateCountDialog
    ** Creates the modeless dialog.
    void CreateCountDialog(void)
    // Initialize ADM.
    ADMUtils::InitializeADM();
    // Display modeless dialog.
    countDialog = sADMDialog->Create(sADMPluginRef, "ADBE:Wordfinder", IDD_COUNT_DIALOG,
    kADMNoCloseFloatingDialogStyle, CountDialogOnInit, NULL, NULL);
    Generic Prompt Dialog
    /* PromptOnOK
    ** Called when the user clicks OK. Stores the string entered by the
    ** user.
    static void ASAPI PromptOnOK(ADMItemRef item, ADMNotifierRef inNotifier )
    sADMItem->DefaultNotify(item, inNotifier);
    // get user input string
    ADMDialogRef dialog = sADMItem->GetDialog(item);
    ADMItemRef item1 = sADMDialog->GetItem(dialog, ID_PROMPT_FIELD);
    sADMItem->GetText(item1, textStr, MaxLen);
    sADMDialog->EndModal(dialog,IDOK,FALSE);
    AVAppEndModal();
    AVWindowDestroy(gAVWindow);
    /* PromptDialogOnInit
    ** Called to initialize the dialog controls.
    ASErr ASAPI PromptDialogOnInit(ADMDialogRef dialogRef)
    gAVWindow = AVWindowNewFromPlatformThing (AVWLmodal, AVWIN_WANTSKEY, NULL, gExtensionID, sADMDialog->GetWindowRef(dialogRef));
    AVAppBeginModal (gAVWindow);
    sADMDialog->SetText(dialogRef, titleStr);
    sADMDialog->SetDefaultItemID(dialogRef, IDOK);
    sADMDialog->SetCancelItemID(dialogRef, IDCANCEL);
    ADMItemRef itemRef;
    itemRef = sADMDialog->GetItem(dialogRef, IDOK);
    sADMItem->SetNotifyProc(itemRef, PromptOnOK);
    itemRef = sADMDialog->GetItem(dialogRef, ID_PROMPT_FIELD);
    sADMItem->SetUnits(itemRef, kADMNoUnits);
    sADMItem->SetMinIntValue(itemRef, 1);
    itemRef = sADMDialog->GetItem(dialogRef, ID_PROMPT_NAME);
    sADMItem->SetText(itemRef, msgStr);
    return kSPNoError;
    /* PromptForInfo
    /** Generic prompt dialog that gets a text string from the user.
    /** @return IDOK or IDCANCEL.
    ASInt32 PromptForInfo(const char *title, const char *msg, char *buf, ASInt32 bufLen)
    if (!buf || (bufLen == 0))
    ASRaise (GenError(genErrBadParm));
    // Initialize ADM.
    ADMUtils::InitializeADM();
    // init data
    buf[0] = 0;
    strncpy(titleStr, title, sizeof(titleStr) - 1);
    strncpy(msgStr, msg, sizeof(msgStr) - 1);
    // Dispaly modal dialog to get user input
    ASInt32 rc = sADMDialog->Modal(sADMPluginRef, "ADBE:Wordfinder", IDD_PROMPT_DIALOG,
    kADMModalDialogStyle, PromptDialogOnInit, NULL, NULL);
    // get user input data
    if (rc==IDOK)
    strcpy(buf, textStr);
    // Release ADM
    ADMUtils::ReleaseADM();
    return rc;

  • Problem with non english caracter

    Hi,
    I'm using JRockit 1.5.0_03, I have a problem with pages with non english caracters. is it possible to change certain properties of JVM like "user.country", "file.encoding" or "user.language"? If yes, how can I change it?
    Thanks in advanced

    Hi,
    I'm using JRockit 1.5.0_03, I have a problem with pages with non english caracters. is it possible to change certain properties of JVM like "user.country", "file.encoding" or "user.language"? If yes, how can I change it?
    Thanks in advanced

  • Problem with item and/or data during page-processing-PS/SQL

    Greetings!
    On my page I have a custom report (from 2 tables) and a small form-field, that adds and edits data in the report. After generating the form with the wizard I added an extra item, to store the id from one of the tables from the report data.
    Now, on submit a calculation should take place, that updates data according user input with a procedure in Page-Prosseses:
    declare a number;
    begin
    case :PLATZ
    when 1 then a:=100;
    when 2 then a:= 50;
    else a:=25;
    end case;
    update TBL_MITGLIEDER set TURNIERPUNKTE = TURNIERPUNKTE + a
    where ID_MITGL = :P14_ID_MITGL;
    end;
    :PLATZ is user selected (1,2,3), :P14_ID_MITGL stores the reference to TBL_MITGLIEDER (and shows the change, when I select another record)
    As I understand, that process should also run, when I submit a chance, but nothing happens then.
    But when I try to save a new record (which worked without any problems before adding that process), I get this error message:
    ORA-06550: line 1, column 64: PL/SQL: ORA-00957: duplicate column name ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
         Error      Unable to process row of table TBL_TURNIERSIEGER.
    Then, when I go back into the app-builder and try to run the page again, I get this message:
    ORA-01403: no data found
         Error      Unable to fetch row.
    I am not sure, if you guys have all the information you need, to know whats going on. Maybe this has to do with session-id and the whay, items are updated. I hope you can help me.
    Thanks, best regards,
    tobi

    First can you please post all log file errors
    >> I can't really give you a solution or specific recommendation since I did not saw this error yet myself, but on your own risk you can try:
    1. You may try to just register 'dts.dll' using regsvr32.exe, but this error may indicate a bigger problem with setup.
    If you are running SQL Server 64bit then try running this at the command prompt: %windir%\syswow64\regsvr32 "%ProgramFiles(x86)%\Microsoft SQL Server\90\dts\binn\dts.dll"
    2. You can try reinstall from start (In this case you have to make sure that you un-install all)
    [Personal Site] [Blog] [Facebook]

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
    Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
    here is one of my image servlet's working versions (the essential part of it) :
                   BLOB blob=null;
              rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
              while (rset.next())
                   blob=((OracleResultSet)rset).getBLOB(2);
              response.reset();
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition","filename=42.jpeg");
                    ServletOutputStream ostr=response.getOutputStream();
                   InputStream istr=blob.getBinaryStream(1L);
                    int size=blob.getBufferSize();
              int len=-1;
                    byte[] buff = new byte[size];
                         while ((len=istr.read( buff ))!=-1 ) {
                   ostr.write(buff,0,len);
             response.flushBuffer();
             ostr.close(); and my JSP page code :
    <img src="/ImageServlet" border="0"  > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.

    I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
    here's the magic tag : <img src="ImageJSP.jsp" border="0"  > enjoy : )

  • Problem with non-container managed entity manager

    i am working on a project, in which i am using entity beans.i use netbeans, glassfish as application server and toplink as persistence provider .
    i created a java class that handles all the operations with the entitys, which means i using non-container managed entity manager.
    in the constructor
    try{
                EntityManagerFactory emf = Persistence.createEntityManagerFactory("voidPU");
                entityManager = emf.createEntityManager();
            catch(Exception ex){
                throw new EJBException(ex.getMessage());
            }then i call a function in this class from a servlet
    the code of the function
    List users = null;
            try {
                ProgLanguages progLanguage = entityManager.find(ProgLanguages.class, languageId);
                users = (List) progLanguage.getUserIdCollection();
            catch(IllegalStateException illegalStateException){
                throw new EJBException(illegalStateException.getMessage());
            catch(IllegalArgumentException illegalArgumentException) {
                throw new EJBException(illegalArgumentException.getMessage());
            }i got an IllegalArgumentException saying Unknown entity bean class: class vanguard.server.entity.ProgLanguages, please verify that this class has been marked with the @Entity annotation
    what confuses me is that sometimes it works and most of the time it does not work, have i made anything wrong?, or there is a problem with any of the tools netbeans, glassfish, or toplink?

    Is it always the same entity that is reported as 'unknown' ? You mention that it works sometimes but is it the same deployment and the same code that works? The first thing I would verify is that the ear is being created as expected by netbeans. Check the persistence.xml file and verify that all of the classes are listed that will be used as entities.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem with Non-English Fields Output to PDF by JASPER in JDev10.1.3

    I am using jsprx files(designed in i-report) to generate pdf reports out of an oracle database.
    The non-English fields are shown correctly when I output the report into an HTML or when I view it with JasperView.
    If I try making PDF files (JasperExportManager.exportReportToPdfFile) the static fields containing e.g.Arabic/Chineese characters won't be displayed and dynamic fields from the database with non-English contents will be shown as ??? or null.
    I received some suggestions about using PARAMETERS to feed the report instead of FIELDS, which I think can not be helpful in this case and in general.
    I think this should be a common problem. These are the components I am using:
    itext-1.4.7. jar
    commons-digester- 1.7.zip
    jasperreports- 1.2.8.jar
    Any comment or help is appreciated.
    Thanks
    Farbod

    I am using jsprx files(designed in i-report) to generate pdf reports out of an oracle database.
    The non-English fields are shown correctly when I output the report into an HTML or when I view it with JasperView.
    If I try making PDF files (JasperExportManager.exportReportToPdfFile) the static fields containing e.g.Arabic/Chineese characters won't be displayed and dynamic fields from the database with non-English contents will be shown as ??? or null.
    I received some suggestions about using PARAMETERS to feed the report instead of FIELDS, which I think can not be helpful in this case and in general.
    I think this should be a common problem. These are the components I am using:
    itext-1.4.7. jar
    commons-digester- 1.7.zip
    jasperreports- 1.2.8.jar
    Any comment or help is appreciated.
    Thanks
    Farbod

  • Problem with non-ASCII file name in content disposition header

    Hi All,
    I am facing some problems with the non-ASCII file name incase of content-disposition header. I read from the RFC 2183 that if the file name contains non-ASCII characters then the same should be encoded before sending to browser. I did the same but realized 2 problems:
    1. The name of the file is truncated in case the file name is slightly long for e.g. �����������j�b�g��������������������������.txt
    2. Also when the same file is opened in notepad, the title is showing encoded name %E6%9C%80%E4%B8%8A%E4%BD%8D.....
    Overall, I feel that the browser is not understanding or responding to the encoded header values.
    Is there any solution to this problem? I am using Microsoft IE 6.0.
    The code snippet is given below:
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              String fileName = "�����������j�b�g��������������������������.txt";          
              fileName = URLEncoder.encode(fileName, "UTF-8");
              resp.setCharacterEncoding("UTF-8");
              resp.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
              resp.setContentType("application/download-binary");
              String s = "This is inside txt file";
              resp.getOutputStream().write(s.getBytes("UTF-8"));
              return;
         }Any help or pointer would be highly appreciated.
    Thanks and Regards,
    Ashish

    The MIME standards for non-ASCII filenames are not widely implemented.
    Many mailers use an ad hoc method for encoding filenames. JavaMail
    supports both methods, but you need to set properties, such as the
    mail.mime.encodefilename property. See the JavaMail javadocs for
    the javax.mail.internet package.

Maybe you are looking for