Laying out iframes in a JSF application

I tried out my sample HTML code at http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe
and all works as expected. An iframe is shown on the left that spans two rows and on its right are two iframes displayed one below the other. My sample HTML code is:
<html>
<body>
<table height="400" border="5" bgcolor="yellow"> <tr>
<td rowspan="2">
<iframe width="200" height="400" name="iframe1" src="/default.asp" scrolling="yes"></iframe>
</td>
<td>
<iframe width="300" height="300" name="iframe2" src="/default.asp" scrolling="yes"></iframe>
</td>
</tr>
<tr>
<td>
<iframe width="300" height="100" name="iframe3" src="/default.asp" scrolling="yes"></iframe>
</td>
</tr>
</table>
</body>
</html>
I tried doing this in JSF/JSP pages but the result was not as expected. The first left iframe has the specified height, the second right iframe is displayed such that its bottom is aligned with the bottom of the left iframe.
And the third iframe is shown aligned to the left edge of the browser and below the first two frames.
Any ideas why the difference.
<?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" xmlns:ui="http://www.sun.com/web/ui">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<ui:page binding="#{Page1.page1}" id="page1">
<ui:html binding="#{Page1.html1}" id="html1">
<ui:head binding="#{Page1.head1}" id="head1">
<ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
</ui:head>
<ui:body binding="#{Page1.body1}" id="body1">
<ui:form binding="#{Page1.form1}" id="form1"/>
<table bgcolor="yellow" border="5" height="400">
<tr>
<td rowspan="2">
<iframe height="400" name="iframe1" scrolling="yes" src="/default.asp" width="200"></iframe>
</td>
<td>
<iframe height="300" name="iframe2" scrolling="yes" src="/default.asp" width="300"></iframe>
</td>
</tr>
<tr>
<td>
<iframe height="100" name="iframe3" scrolling="yes" src="/default.asp" width="300"></iframe>
</td>
</tr>
<table>
</ui:body>
</ui:html>
</ui:page>
</f:view>
</jsp:root>
thanks,
tsc

JTextPane sucks, the layout really doesn't make sense. To get JLabels which are on the same line as the regular text to line up, you can make the JLabel taller than a line of text and setVerticalAlingment to top... then it will almost be aligned. But it's still off, and it wastes a lot of space between wrapped lines.
There has got to be a better way!

Similar Messages

  • Including JSF application inside iframe

    Hi,
    I have an existing website (based on PHP and HTML), where I want to include a new part that is developed with JSF,
    and currently runs on another webserver.
    I included the JSF part with:
    <iframe name="NewPart" src="http://www.myotherwebsite.com/jsp/welcome.faces" width="600" height="400"
    scrolling="auto" frameborder="0">
    some text.
    </iframe>
    This page appears fine with any simple JSF example. But as soon as I start navigating inside the JSF application to page2 (see below), I get the following exception:
    javax.servlet.ServletException: viewId:/jsp/welcome.faces - View /jsp/welcome.faces could not be restored.
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:249)
    root cause
    javax.faces.application.ViewExpiredException: viewId:/jsp/welcome.faces - View /jsp/welcome.faces could not be restored.
    com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:185)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
    The navigation is defined as:
    <navigation-rule>
    <from-view-id>/jsp/welcome.jsp</from-view-id>
    <navigation-case><from-outcome>page2</from-outcome><to-view-id>/jsp/page2.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    What am I doing wrong (I'm fairly new to JSF..)?
    best regards, Paul.

    Thanks Raymond, I think you've put me on the right track.
    I forgot to stress that if I load the (JSF based) page directly inside the browser it works OK, only when it is loaded inside an <iframe>, the navigation fails. I suspect now that there may be a conflict between the cookie stored by the main page and the inner JSF frame.

  • HTTP Status 403 after logging out of my JSF application

    I have a JSF application that is using form based authentication (using a custom JSF control that creates a form with an action attribute equal to "j_security_check").
    Everything seems to be working just fine except when Firefox browsers logout and then backup (using the browser's back button) and click on a link or button in my JSF application. Instead of just showing the logon page again it shows the following ugly page:
    HTTP Status 403 - The request body was too large to be cached during the authentication process
    type Status report
    message The request body was too large to be cached during the authentication process
    description Access to the specified resource (The request body was too large to be cached during the authentication process) has been forbidden.
    Apache Tomcat/6.0.14IE shows the logon page when you click the back button.
    Is there some way that I can get Firefox to behave differently? Is there another way to handle authentication that would be better for a JSF application?
    Thank you!
    Dave

    Thank you for pointing me to look closer at the server RaymondDeCampo.
    I'm very new to Web development, Java, and JSF.
    I watched the HTTP Monitor (in NetBeans) as I did the following steps with Firefox, Safari (PC version), and IE:
    1. Log on to my app
    2. Change to a page in my app
    3. Log out of my app
    4. Click the browser's back button
    Firefox and Safari seemed to behave the same way. Clicking the back button displayed the previous page correctly, and NO new HTTP requests are added to the HTTP monitor. I assume these browsers are just loading the previous page from cached history or something? If I then click on a link or command button on the page, I get the HTTP Status 403 page in the browsers and once again NO new HTTP requests are added to the HTTP monitor. Is it possible for Tomcat to reply with the HTTP Status 403 page before the HTTP monitor even gets a chance to see the HTTP request? I'm pretty sure that Tomcat is producing the HTTP Status 403 page since the very last line on the page says "Tomcat 6.0.14."
    IE on the other hand caused an HTTP GET to be posted to the HTTP monitor when the browser's back button was clicked. The GET is for the login page which then gets shown in IE.
    Is there something else I should be looking at on the server side?
    Is there a way to stop Firefox and Safari from using cached pages when the back button is clicked and force them to go to the server for the content again?
    Thank you very much for any answers or advice that you can share!
    Dave

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

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

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

  • On iPhoto, I can no longer access the 'Classic' option which would lay out my photos on the page. It will send them as attachments only. I need the page layout for my work. Any thoughts as to why this has changed?

    On iPhoto, I can no longer access the 'Classic' option which would lay out my photos on the page. It will send them as attachments only. I need the page layout for my work. Any thoughts as to why this has changed? It used to fully lay out the photos so I could add notes and detailed information before I sent them. I am thinking it is something simple that I have just missed...

    The "Photos" view has been replaced by the Media Browser.
    Most applications will show you the Photos icon in the Sidebar, when you need to select photos in a file chooser dialoge. Mail, Safari, the iWork apps. See Terence Devlin's User Tip: How to Access Files in iPhoto
    For example, in the File > Open dialogue in Preview I am seeing this in the sidebar.

  • Deploying JSF application on Tomcat 5.0.28

    Hi,
    I am having problems deploying JSF application (developed using Studio Creator) on Tomcat. Any suggessions ....
    HTTP Status 404 - Servlet Faces Servlet is not available....
    Thanks in advance

    I ran into this same problem moving from Tomcat 4.1.31 to Tomcat 5.0.28. This one was definitely a headscratcher, but the solution turned out to be simple as I had an older servlet api jar (2.3) in my J2SE's jre/lib/ext directory. I replaced the existing servlet.api with servlet-api.jar and jsp-api.jar from the Tomcat 5.0.28 common/lib directory, restarted Tomcat, and the problem disappeared.

  • StackOverflowError , Basic JSF Application

    Hi,
    i am new to JSF and running a basic JSF application but facing an exception, kindly see my code and sugguest me to ridof it, thanks :)
    import com.infotech.backingbean.LoginBackingBean;
    * AbstractManagedBean *
    public abstract class AbstractManagedBean {
         protected LoginBackingBean backingBean;
         public String execute(LoginBackingBean backingBean) {     
              return executeRequest(null, null, null, backingBean);
         public abstract String executeRequest(HttpServletRequest request,
                   HttpServletResponse response, HttpSession session, LoginBackingBean backingBean);
         public LoginBackingBean getBackingBean() {
              return backingBean;
         public abstract void setBackingBean(LoginBackingBean backingBean);
    * LoginManageBean *
    public class LoginManageBean extends AbstractManagedBean {
         public LoginManageBean() {
              setBackingBean(new LoginBackingBean());
         @Override
         public String executeRequest(HttpServletRequest request, HttpServletResponse response,
                   HttpSession session, LoginBackingBean backingBean) {
              LoginBackingBean loginBackingBean = (LoginBackingBean)backingBean;
              Boolean flag = (loginBackingBean.getUserName().equals("kb") && loginBackingBean.getUserPassword().equals("kb"));
              String page = flag ? "loginSuccess" : "loginFailed";
              System.out.println(flag);
              System.out.println(page);
              return page;
         @Override
         public void setBackingBean(LoginBackingBean backingBean) {
              this.backingBean = backingBean;          
    * JSP page *
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <html>
    <head>
    <title>A Simple JavaServer Faces Application</title>
    </head>     
              <body>
              <f:view>          
              <h:form>
              <h3>Login</h3>
              <table>
              <tr>
              <td>Name:</td>
              <td><h:inputText value="#{loginManageBean.backingBean.userName}"/></td>
              </tr>          
              <tr>
              <td>Password:</td>
              <td><h:inputSecret value="#{loginManageBean.backingBean.userPassword}"/></td>
              </tr>          
              </table>
              <p>
              <h:commandButton value="Login" action="#{loginManageBean.execute}" />
              </p>
              </h:form>
              </f:view>
              </body>
    </html>
    * faces-config.xml *
    <faces-config>
         <navigation-rule>
         <from-view-id>/main.jsp</from-view-id>
         <navigation-case>
         <from-outcome>loginSuccess</from-outcome>
         <to-view-id>/welcome.jsp</to-view-id>
         </navigation-case>
         <navigation-case>
         <from-outcome>loginFailed</from-outcome>
         <to-view-id>/main.jsp</to-view-id>
         </navigation-case>
         </navigation-rule>
         <managed-bean>
              <managed-bean-name>loginManageBean</managed-bean-name>
              <managed-bean-class>com.infotech.managedbean.LoginManageBean</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
         </managed-bean>
    </faces-config>
    * web.xml *
    <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">
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.jsf</param-value>
    </context-param>
    <context-param>
         <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
         <listener>
              <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
         </listener>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    </web-app>
    * Exception StackOverflowError *
    Exception in thread "http-8080-exec-1" java.lang.StackOverflowError
         at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
         at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:575)
         at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
         at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:575)
         at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
         at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:575)
         at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
         at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:575)
         at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
         at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:575)
         at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
         at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:575)
         at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)
         at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:575)
         at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)

    yes, i fixed it by commeted
    <!--
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    -->

  • Content Management approach in a JSF application

    Hi all,
    I had developed a JSF application. Now I would like to manage my application in the content management approach, that is changing the text content or image by means of an admin console. Kindly suggest me if there is any way to accomplish this.
    Thanks in Advance!!

    The richfaces editor component comes to mind, as a start.
    [http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_editor.html|http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_editor.html]
    But honestly, I would say this is a clear case of too late. If you want the content of your application to be managed, the application should have been designed and developed with that idea in mind from the very beginning. What you have now is probably just some static JSF/facelets pages with perhaps a facelets template here or there, but what you want is dynamic content where you can swap out text, images and probably have some control over where they are placed and how they space. That is not going to happen out of the box, it requires development work and careful planning. Good luck trying to work that into an existing product.

  • Best practices desiging JSF applications

    I have an intermediate level of knowledge on JSF but after completing a component for an application I'm still stumped about the best practices required when designing a Java Server Faces application.
    The issue I faced mostly in the first iteration was Loading of dependant objects.
    Wherever we needed to display an editable view of an object by way of a request parameter there was always the question at what point to load the entity?
    For example, I have a page edit.jspx?itemId=21
    In my faces config, I have a Backing bean which has a managed property:
    <managed-property>
        <property-name>itemId</property-name>
        <property-class>java.lang.Integer</property-class>
        <value>#{param.itemId}</value>
    </managed-property>My backing bean has the getters and setters for this property but at which point is it best to load the item with id of "itemId"?
    It also gets a bit more complex when I depend on other injected properties for example an application scope manager class.
    One thing I have learned is, that the order that you declare the managed-properties in the faces-config appears to be the order that they are injected - I can't make a definitive answer on this as that's just the way it works on Sun App Server 8.1 and JSF 1.1. But I'm still trying to work out when to undertake a simple load for dependant entities in a backing bean.
    One appraoch I have looked at taking is introducing some "Loader" classes - basically a POJO that performs loads based on request param setting events:
        <managed-bean>
            <managed-bean-name>UserLoader</managed-bean-name>
            <managed-bean-class>testfaces.loader.UserLoader</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>invManager</property-name>
                <property-class>testfaces.aspect.InvestigationManager</property-class>
                <value>#{InvestigationManager}</value>
            </managed-property>
            <managed-property>
                <property-name>userId</property-name>
                <property-class>java.lang.Integer</property-class>
                <value>#{param.userId}</value>
            </managed-property>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>ItemBean</managed-bean-name>
            <managed-bean-class>testfaces.jsf.bean.ItemBean</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>user</property-name>
                <property-class>org.ikeda.testfaces.model.UserEntity</property-class>
                <value>#{UserLoader.user}</value>
            </managed-property>
        </managed-bean>Ergo, each time I use the ItemBean in a JSP it will try and set the "user" property which is retrieved from the UserLoader provided the param.userId is set from the query string. Mind you this limits me to using only the request parameter (okay for Portlet integration) as there is no property called userId in the ItemBean - another workaround to work out!
    Of course this kind of functionality can be rolled into the ItemBean, but it's amazing how much of a mess the Backing bean becomes when you encapsulate this logic into the backing bean.
    What experiences has everyone else had with JSF and this kind of situation?
    Does anyone know of any good resources about "designing" JSF applications (writing is one thing, designing is another)?
    Regards,
    Anthony

    I have an intermediate level of knowledge on JSF but after completing a component for an application I'm still stumped about the best practices required when designing a Java Server Faces application.
    The issue I faced mostly in the first iteration was Loading of dependant objects.
    Wherever we needed to display an editable view of an object by way of a request parameter there was always the question at what point to load the entity?
    For example, I have a page edit.jspx?itemId=21
    In my faces config, I have a Backing bean which has a managed property:
    <managed-property>
        <property-name>itemId</property-name>
        <property-class>java.lang.Integer</property-class>
        <value>#{param.itemId}</value>
    </managed-property>My backing bean has the getters and setters for this property but at which point is it best to load the item with id of "itemId"?
    It also gets a bit more complex when I depend on other injected properties for example an application scope manager class.
    One thing I have learned is, that the order that you declare the managed-properties in the faces-config appears to be the order that they are injected - I can't make a definitive answer on this as that's just the way it works on Sun App Server 8.1 and JSF 1.1. But I'm still trying to work out when to undertake a simple load for dependant entities in a backing bean.
    One appraoch I have looked at taking is introducing some "Loader" classes - basically a POJO that performs loads based on request param setting events:
        <managed-bean>
            <managed-bean-name>UserLoader</managed-bean-name>
            <managed-bean-class>testfaces.loader.UserLoader</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>invManager</property-name>
                <property-class>testfaces.aspect.InvestigationManager</property-class>
                <value>#{InvestigationManager}</value>
            </managed-property>
            <managed-property>
                <property-name>userId</property-name>
                <property-class>java.lang.Integer</property-class>
                <value>#{param.userId}</value>
            </managed-property>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>ItemBean</managed-bean-name>
            <managed-bean-class>testfaces.jsf.bean.ItemBean</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>user</property-name>
                <property-class>org.ikeda.testfaces.model.UserEntity</property-class>
                <value>#{UserLoader.user}</value>
            </managed-property>
        </managed-bean>Ergo, each time I use the ItemBean in a JSP it will try and set the "user" property which is retrieved from the UserLoader provided the param.userId is set from the query string. Mind you this limits me to using only the request parameter (okay for Portlet integration) as there is no property called userId in the ItemBean - another workaround to work out!
    Of course this kind of functionality can be rolled into the ItemBean, but it's amazing how much of a mess the Backing bean becomes when you encapsulate this logic into the backing bean.
    What experiences has everyone else had with JSF and this kind of situation?
    Does anyone know of any good resources about "designing" JSF applications (writing is one thing, designing is another)?
    Regards,
    Anthony

  • Lay out spry menu

    I am working with Dreamweaver CS6 and I am having some problems with the spry menus.
    Is there a lay out available on which I can find which items has which name?
    E.g. ul MenubarVertical ul: which item is this in the spry menu?
    David

    Have you read the comments in the CSS file?
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, a fixed width box with no margin or padding */
    ul.MenuBarVertical
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        cursor: default;
        width: 8em;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* Menu item containers, position children relative to this container and are same fixed width as parent */
    ul.MenuBarVertical li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: 8em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarVertical ul
        margin: -5% 0 0 95%;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: absolute;
        z-index: 1020;
        cursor: default;
        width: 8.2em;
        left: -1000em;
        top: 0;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarVertical ul.MenuBarSubmenuVisible
        left: 0;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarVertical ul li
        width: 8.2em;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Outermost menu container has borders on all sides */
    ul.MenuBarVertical
        border: 1px solid #CCC;
    /* Submenu containers have borders on all sides */
    ul.MenuBarVertical ul
        border: 1px solid #CCC;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarVertical a
        display: block;
        cursor: pointer;
        background-color: #EEE;
        padding: 0.5em 0.75em;
        color: #333;
        text-decoration: none;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarVertical a:hover, ul.MenuBarVertical a:focus
        background-color: #33C;
        color: #FFF;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarVertical a.MenuBarItemHover, ul.MenuBarVertical a.MenuBarItemSubmenuHover, ul.MenuBarVertical a.MenuBarSubmenuVisible
        background-color: #33C;
        color: #FFF;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarVertical a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarRight.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarVertical a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarRightHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarVertical iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarVertical li.MenuBarItemIE
            display: inline;
            f\loat: left;
            background: #FFF;

  • Consuming peoplesoft webservices using JSF application gives error

    Hi,
    I am using Jdeveloper 11g to consume a peoplesoft webservice which does the basic datbase operations.
    I have been successful in creating a proxy using the wsdl file and using JAX-WS approach to achieve the same.
    I can connect to the webservice using the proxy client.
    But when i package the proxy( create a jar) and import in my web application (JSF application), i am running into following error.
    <ActionListenerImpl><processAction> com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
    javax.faces.el.EvaluationException: com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:214)
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:222)
         at com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:531)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:127)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
         at $Proxy135.getCompIntfcKCMWEBCASECI(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
         at $Proxy136.getCompIntfcKCMWEBCASECI(Unknown Source)
         at project1.proxy.KCM_WEB_CASE_CISoapClient.getKCMMethod_final(KCM_WEB_CASE_CISoapClient.java:618)
         at login.view.Handler.CRMSearchHandler.getSearchResults(CRMSearchHandler.java:18)
         at login.view.backing.Login.search(Login.java:54)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    I am not sure what else i need to import or rather how to package the proxy classes to get it working.
    Any help will be highly appreciated.
    I even tried creating a webservice proxy in the JSF project instead of importing the jar, yet i am getting the same error, but the irony is that when i run just the proxy class(standalone with main method) i can get access to the webservice.
    Thanks
    Ash
    Edited by: [email protected] on Jun 8, 2010 2:38 PM

    Well,
    There is a issue with analyzer capturing SOAP traffic when using with secure proxies, so that is why you are not seeing any data there.
    And I think if you will try your jax-rpc code again, it might work as there was nothing incorrect in your code, so might be that the whole config was corrupt which was throwing out incorrect error(s).
    About a web service with credentials, you can quickly create one.
    Have a java class like the following:
    import javax.jws.WebService;
    import weblogic.jws.Policy;
    @WebService
    @Policy(uri = "policy:Wssp1.2-2007-Https-UsernameToken-Plain.xml")
    public class Class1 {
    public Class1() {
    super();
    public String sayHello() {
    return "Hi";
    The procy code for this will be something like:
    private static Class1Service class1Service;
    public static void main(String[] args) {
    try {
    class1Service = new Class1Service();
    Class1 class1 = class1Service.getClass1Port();
    Map<String, Object> requestContext = ((BindingProvider) class1).getRequestContext();
    setPortCredentialProviderList(requestContext);
    // Add your code to call the desired methods.
    System.out.println(class1.sayHello());
    } catch (Exception ex) {
    ex.printStackTrace();
    public static void setPortCredentialProviderList(Map<String, Object> requestContext) throws Exception {
    // TODO - Provide the required values
    String username = "weblogic";
    String password = "weblogic1";
    List<CredentialProvider> credList = new ArrayList<CredentialProvider>();
    // Add the necessary credential providers to the list
    credList.add(getUNTCredentialProvider(username, password));
    //credList.add(getBSTCredentialProvider(clientKeyStore, clientKeyStorePassword, clientKeyAlias, clientKeyPassword, serverKeyStore, serverKeyStorePassword, serverKeyAlias, requestContext));
    //credList.add(getSAMLTrustCredentialProvider());
    requestContext.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credList);
    Thanks,
    Vishal

  • Redirect to another jsf application passing parameters

    Hello,
    I'm newbie to JSF, so I hope to explain me almost correctly.
    I have to call from a jsf page the main page of another jsf application (SecondApplication) passing some parameters.
    I thought to pass them in Session. Is it possible, and how ?
    What I've written is totally wrong ?
    Thanks in advance for any help.
    s1a2
    *[FirstApplication]*
    String url="http:/192.168.2.100/SecondApplication";
    FacesContext fC=FacesContext.getCurrentInstance();
    HttpSession session=(HttpSession)fC.getExternalContext().getSession(true);
    session.setAttribute("par1","value1");
    fC.getExternalContext().redirect(url);*[SecondApplication]*
    FacesContext fC=FacesContext.getCurrentInstance();
    HttpSession session=(HttpSession)fC.getExternalContext().getSession(false);
    String Par1=(String)session.getAttribute("par1");
    System.out.println(Par1);

    Astrogobild wrote:
    In the first application, i am doing this way:
    FacesContext.getCurrentInstance().getExternalContext().redirect(sistema.getDiretorio() + "?mat=123456");                   
    FacesContext.getCurrentInstance().responseComplete();In the second application, i can't recovery the value of mat...
    i am doing this way:
    String mat = (String)request.getParameter("mat");but it always returns null...How does the following output look like?sistema.getDiretorio() + "?mat=123456"By the way, there is no need to invoke FacesContext#responseComplete() manually, because this is already done in the ExternalContext#redirect(). Also see its [API doc|http://java.sun.com/javaee/5/docs/api/javax/faces/context/ExternalContext.html].
    String mat = (String)FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("mat");but it always throws a NullPointerException ....What exactly throws NPE? You're invoking 4 method calls here. Maybe the FacesContext#getExternalContext(), because FacesContext#getCurrentInstance() can also return null?

  • How to structure a JSF application (EAR/WAR/JAR)

    Hi All,
    How do you recommend I should structure a JSF application in terms of EARs, WARs and JARs?
    Let me set the context for you: I have a fairly large project which consists of a number of sub components. Each of these sub components are JSF applications in the sense that they have JSF pages connected to each other. So, for instance, I have a company management sub component and a product management subcomponent. Most of these sub components share some Java libraries and/or entities.
    Because of this I decided to have each sub component contained in its own WAR, with no universal libraries in its lib folder, and to then add these WARs to an EAR with all the library JARs in the EAR's lib folder, as so:
    EAR
       |_ component1.WAR
       |_ component2.WAR
       |_ lib
             |_ sharedlib1.JAR
             |_ sharedlib2.JARUnfortunately I'm having more problems than I hoped I would with JSF with this setup. An alternative I have is to create one gigantic WAR which contains all the library archives and then to only deploy this WAR. Although this would probably work, it destroys the nice seperation I had between sub components, where I could for instance just remove the one WAR from the EAR if it was giving problems. That structure would look something like this:
    WAR
       |_ <WebContent>
       |_ WEB-INF
                 |_ classes
                           |_ <JSF classes>
                 |_ lib
                        |_ sharedlib1.JAR
                        |_ sharedlib2.JARFinally, I have a third option where I add all the libraries required by a WAR to its lib folder and I have no shared libraries in the EAR's lib folder. The disadvantages are of course that the EAR will be huge as JARs get duplicated unnecessarily, and I'm not sure that this won't cause conflicts. The structure would look like this:
    EAR
       |_ component1.WAR
                        |_ WEB-INF
                                  |_ lib
                                        |_ sharedlib1.JAR
                                        |_ sharedlib2.JAR
       |_ component2.WAR
                        |_ WEB-INF
                                  |_ lib
                                        |_ sharedlib1.JAR
                                        |_ sharedlib2.JARI believe the first way to be the best, but I'm struggling getting JSF to work like I expect (see [http://forum.java.sun.com/thread.jspa?threadID=5288069|http://forum.java.sun.com/thread.jspa?threadID=5288069] ). What are your suggestions?
    Thank you,
    Ristretto

    Dear hiwa,
    thank you very much for your response. I have had a look into the book and found out that it provides indeed half of the solution i need. Now I can generate a JSF response to my non-JSF request which has been issued by the main application.
    Unfortunately this is only the first half of the solution, because the JSF framework of the child application will still render URIs into HTML-forms (e.g. for the <f:view>) that point to the faces servlet and not to the non-JSF servlet of the main application.
    I'll try to solve this problem by providing my own ViewHandler that provides other URIs. But I still don't know how to encode the view ID into the generated HTML-form as a hidden field.
    After all, I am really surprised at how difficult it is to integrate the JSF framework into a non-JSF application. I don't think this is a very uncommon scenario. In my case, we integrate into an existing large application of our customer in order to extend his application with our product. I would expect this to work out of the box with JSF (sigh).
    I will post my progress in this matter if I found some interesting solution.
    Bye, Marcus

  • Need a login strategy for JSF application

    I have inherited a JSF application (prototype) and need to modify this application to require a user login. Right now, the application requires a login only for a sub-portion of the application, well after JSF is up and running. That has to change to require the login before the JSF application is invoked.
    Basically, what I want to do is present a standard login form (user name, password, and "submit" button). This information will be sent to "j_security_check" where the servlet engine will validate the user against an LDAP server and then look up some user role information. I have no control over user authentication. Once the user has logged in, the application will be looking at user roles to determine what elements of the JSF application they are permitted to access.
    In addition, I need to be able to detect when the user's session has expired. When this occurs, I need to automatically reroute the user back to the login page. The prototype I inherited currently has all of the JSF backing beans check to see if the Session is still valid before executing any actions. This seems rather tedious and error-prone to me.
    I am not very familiar with security and user authentication issues (somebody else always wrote that part). I think the approach I need to take is: (1) create a login page. (2) create a login error page. (3) create a filter to check to see if the user's session has expired and, if so, re-route the request to the login page.
    My questions:
    1. Is this the best approach? If not , what is a better approach?
    2. Can I use JSF elements for the various login pages, or do I need to use JSP or HTML elements only?
    3. Can you point me to an example or tutorial that explains what I need to do?
    I've looked at a couple of servlet books, a JSF book, and Sun's online Java tutorials, but I don't see anything that looks quite like what I think I need to do here.
    Once I get passed security handling, the rest of the application is all JSF and will be easy to build.
    Thanks for your thoughts, comments, and assistance.

    I have three macs and use one of them as the TM backup destination (that mac has 4 large external disks, I devote one disk at a TM backup for each of the macs) - that mac is also the file server. (I do also use an externally attached HD on one of the other macs as redundancy.) The system works very well and when set up requires no administration, it's automatic! Since the backups are made hourly, I have fresher data than my old system of doing nightly backups using a traditional backup app.
    I even had to do a full restore last week on one of the macs and found the process worked flawlessly, had the mac up and running after the 2 hour restore finished.
    For critical data (business or professional) I also recommend doing occasional boot disk backups using another backup app. I do that with one of my macs. Note: although I have wireless capability with each mac, I use wired Ethernet connections for speed and reliability.

  • Why does ical on icloud have a different lay out than on my mac

    Why does iCal on my MacBook Pro have a different lay out than on iCloud? I like the iCloud layout better, the only missing niceties is the year calendar. How do I get both iCals to look the same? The ideal iCal? The one from iCloud WITH the year calendar.

    Do a malware check with some malware scanning programs on the Windows computer.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br /><br />
    *http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    *http://www.superantispyware.com/ - SuperAntispyware
    *http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    *http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    *http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
    Please update Firefox to the latest version via "Help > Check for Updates or Help > About Firefox"<br />
    The Firefox version that you use is no longer maintained with security and stability updates.<br />
    Using unsupported Firefox versions is at your own risk and makes you vulnerable to attacks.<br />
    *Firefox 7.0.x: http://www.mozilla.com/en-US/firefox/all.html

Maybe you are looking for

  • Pages docs not showing on ipad

    Downloaded Mountain Lion ... edited a doc in pages on mbp ... saved to icloud ... can see it on icloud.com and in pages on mbp ... but it does NOT appear on my ipad.  Other docs which were there before DO show up.

  • Software update to 5.1

    I keep getting the same error message when I try to do the latest software update. I am getting the same error message with I Pad too. I have rebooted all devices. I tunes is up to date the mac book pro and mac mini is up to date. I have tried for tw

  • How do I get iPhoto to not copy photos into its own folder, read originals?

    I was wondering how you could get iPhoto 6 to 'read' photos from it's original file. I normally keep my photos in their own folder, separate from the iPhoto file. Now I kind of want to have them all organized nicely in the iPhoto file so I don't have

  • De-Interlace or leave as Interlaced? (iMovie 6.0.4)

    iMac 10.8.5 (Mountain Lion);  Video Editing: Imovie HD6 exported to iDVD;  Camcorders: Canon MVX25i and Canon HV30.  DVDs to be played on modern flat screen televisions. Although I have been working with iMovie HD6 (6.0.4) and iDVD (7.1.2) for severa

  • Inbound IDoc error with status 51 : No unique SA could be determined

    Hello, when I would like to create AAU by EDI info; ORDERS05, DELORD type how can I set mandatory item for AAU? Please help Edited by: Hiroko Numano on Apr 9, 2008 7:13 AM