Configuring velocity to use into JSF pages

Hello to all,
I am newer with JSF and, I don't know how to insert Velocity code into JSF page. Is it possible? How I must configure my webapp to use Velocity+JSF?
This is an example of a JSF page that I would be using:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
     pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="/WEB-INF/tld/veltag.tld" prefix="vel"%>
<html>
<f:view>
     <head>
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <title>Login</title>
     <f:loadBundle basename="com.tutorial.messages" var="msg" />
     </head>
     <body>     
     #set( $imperial = ["Munetaka","Koreyasu","Hisakira","Morikune"] )  
        #foreach( $shogun in $imperial )
               $shogun
        #end
     <h:form>
          <h:outputLabel rendered="true" value="#{msg.name}"></h:outputLabel>
     </h:form>
     </body>
</f:view>
</html>I'm sorry by my poor English
Thanks and best regards,
Shaggy

Hi,
I am also trying to develop a similar application but I dont know how to do. Can you please help me regarding that?
I need to get user's smartcard based certificate to store in server.

Similar Messages

  • How to Use another JSF page that I load by XMLHttpRequest?

    Hi everyone, I'm a newbie of JSF and curisous about how to load page content seperately by AJAX.
    I saw example of Java Blue Print. It's load some data to use in page. What I want is to load another JSF page when click a link or button, (Like include another page). And work with functions privoided by loaded JSF Page.
    My example is, In a main page. I request a JSF page and set it into a div layer.
    var requestURL = "/admin/customer/customer-list-body.faces";
    var content = postDataWithoutContent(requestURL);     divContent.innerHTML = content;     
    All JSF components are required under <f:view>, thus action of form is set as "action='"/admin/customer/customer-list-body.faces'"
    But my page is main.jsp. Each time I click command button in customer-list-body.faces, the url will change to customer-list-body.faces, I want to request and hold in main.jsp.
    What can I do then? Any advices?

    Hi,
    the list doesn't seem to be your problem. You need to track down the illegal argument exception. Once you have that sorted out, expose the method on the AM so it gets shown as a method binding. The return values then could be picked up in a managed bean to create the select Item list
    Frank

  • How to determine which configuration is being used within a page/view?.

    If I click on the little cog icon to take me into the AET for a given assignment block, how do I know which configuration is being used?. Usually one is highlighted, but the case of the Accounts main address assignment block these details are not shown. As there probably 30 of them I though there must be a quick way to determine which is being used from within the view/page.
    Anyone
    Jas

    Hi Jason, (great performance at the Transporter, but go easy on the steroids )
    There are 2 ways to know that:
    1. put your focus (not in the configuration mode) on one of the fields that are on the block. then press F2. Here you get a popup where there is the configuration searched for and the configuration found.
    2. Within the configuration, when there is no configuration with the configuration key linked to your business role present, the system takes the <DEFAULT> one. there should at least one be highlighted, otherwise you get a dump NO_CONFIG_FOUND.
    When you just press the copy button on the configurations tab, you get your configuration defaulted, this being, the configuration key linked to your business role + the search for component, usage, and subcomponent. here you see what was searched for.
    Hopefully this helps you out a bit.
    KR,
    Micha
    Edited by: Micha Van Nijen on Apr 20, 2010 3:03 PM
    Edited by: Micha Van Nijen on Apr 20, 2010 3:07 PM

  • Embed manually created servlet/dyamically built html into JSF Page.

    Hi there,
    I am wondering if anybody has ever tried embedding manually created pages (ie: using servlets to dyamically build an HTML page), inside of a JSF Page?
    The reason I ask is I have about 3000 of these pages already in production and can't really take advantage of JSF, without massive rewrites.
    Is there a way for the embedded page to communicate with the outer JSF Page?

    That works fine Thanks. Now the issue i am facing is if i have one chart and one table in one form , the form is always displayed first then table even if the table is drawn first in design time. IS there any way to Hide the graph Because this component does not have the rendered property.
    I want to render the graph conditionaly.Also Is it possible to change the graph type dynamically ie on selection of any radio button. I can get the handle of button in my Backing Bean.
    I tried to put the graph in Form PAnelBorder as well as in table and set the rendered property to false but still the graph is showing.
    Please help us....Pleas point us to some sample examples where thsi kind of scnario is done.
    Thanks
    Anshu

  • How do I pass input values from a html page to a jsf page

    hi,
    In my project,for front view we have used html pages.how can I get input values from that html page into my jsf page.for back end purpose we have used EJB3.0
    how can I write jsf managed bean for accessing these entities.we have used session facade design pattern and the IDE is netbeans5.5.
    pls,help me,very urgent
    thanx in advance

    Simplest way is to rewrite html page into jsf page.
    You can use session bean in your managed bean like this:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class ManagedBean {
    private Context  ctx;
    private Object res;
    // session bean interface
    private Service service;
              public ManagedBean() {
                try{
                     ctx = new InitialContext();
                     res = ctx.lookup("Service");
                     service = (Service) res;
               catch(Exeption e){
    }Message was edited by:
    m00dy

  • Visual JSF pages

    am having a problem with a web app i am making using visual JSF pages.
    I am interacting with a MYSQL database. I have a problem with displaying the blob types from the database in the actual visual table and on screen,.
    I have tried converting it to image them using image component to display it but it dosent work. Also when i set that field to image for table layout i get an error invaild type.
    Please someone help me out.

    I tried to create servlet as how the blog site said it should be done but the page is freezing up now. Its not Loading but its also not crashing its like its stuck in a loop.
    this is what i wrote in jsp part to get servlet running.
    <h:graphicImage value="image?id=#{ItemPage.txtItemNum}" />
    Please tell me how to resolve this issue if you need screen shots of servlets i can supply them. Please help me though I have been trying to rectify this problem for a couple of weeks now.
    Thx.

  • JSF Page Template error in Visual Editor

    Hi!
    I've developed a jsp page template with an attribute called BackingBean. This attribute is a mypackage.view.BackingBeanTemplate class and it works perfectly when I open the template in visual editor.
    When I create a new JSF page using my jsf page template and fill attribute BackingBean with a class that extends mypackage.view.BackingBeanTemplate, the visual editor send me the following error in Messages - Log:
    WARNING: A problem was encountered executing the page. Using fallback rendering.
    javax.el.PropertyNotFoundException: The class 'oracle.adf.view.rich.component.fragment.UIXPageTemplate$AttrMap' does not have the property 'BackingBean'.
    When I run my jsf it works perfectly. Just in visual editor it doesn't render my page.
    Can I use only primitive types and wrappers (String, Boolean, Integer, etc) in jsf template pages?
    Anybody could help me?
    Thanks
    Gleber

    Hi,
    actually i used a template that references a type DCIteratorBinding using EL and this works fine. So there is no limitation in the type you pass as an argument. My assumption is that the IDE doesn't instantiate super classes, which is why the property is not found. Does the subclass call super() in its constructor? Anyway, feel free to file a bug
    Frank

  • JSF Page Creation wizard title configuration uses old values!

    I just noticed that if you don't explicit change the value of the page's title in the JSF Page Creation Wizard, the page created will get the title from the last page where you changed the title.
    Tested in JDev 10.1.3.1Production and JDev 10.1.3.1 Preview

    I'm thinking this has to do with the fact that the UIComponents use the localValue after validation fails. This prevents the values from being overwritten when re-rendering the page, i.e. the inputs keep the value set by the user.
    The solution is to manipulate the components directly during the AJAX request when the first pull down is changed. Use the binding attribute to place them into your bean and clear the value directly. That way it will not matter that the expression is not evaluated.

  • Using Business Components in JSF pages

    I have several questions about using BCs in JavaServer Faces pages. I'm new to the JSF-BC development world.
    Here's what I'm trying to accomplish: a salesperson gets a call from a customer requesting a quote. The salesperson selects the URL for my RFQ form and begins filling it out. If there is an existing customer record in the company's database, the salesperson wants to be able to load customer info into the form from the database, rather than typing it all in. Reasonable enough, and probably simply enough.
    But it's kickin' my butt. I've created the domain objects (including one for the customer database, call it "CU") and the model objects (a View Object that filters out all fields but those needed on the form, an Application Module with a View Object Instance). Initially I am routing from the main form window to a dialog window where I am hosting the customer selection components, intending to return to the main window with the selection. On the dialog window I've dropped the VO and configured it to be an ADF Navigation List (which gets implemented as an af:selectOneChoice component). So far so good. The navigation to and from is working fine. The selectOneChoice list is being populated with the first range of returned records. Here's where I'm stuck.
    First of all I can't figure out how to kick the iterator into sending additional records after it's first range. You can scroll down to the end of the list in the selectOneChoice component but nothing happens after that. I know I can set the iterator's range to 0 to get all of the records dumped in at once, but that takes way too long. Any ideas?
    Secondly, when a selection is made, how do I access the selected data? I have set up a ValueChangeListener method in my dialog's backing bean that gets the NewValue() from the event object, but that value turns out to be the index into the collection of selectItems. How do I get the value of the data that shows in the list? Is that the label of the selectItem? If so, how do I access it? What I really want is to get the entire row of data represented by the returned index, but I'm lost as to how to do that. Any help would be much appreciated.
    At some point I want to let the salesperson type in a partial customer name and then retrieve only records matching the query's where clause. I see where I can create a bind variable on the view object, but am not sure how to pass the partial name value from the main form to the dialog. Currently I use an EL expression in the Action attribute of an af:selectInputText component to navigate to the dialog and I don't think I can pass parameters with that. I guess I would have to switch to using a method binding to a backing bean, eh? But even if I can get the partial name value to the dialog, how do I bind that value to the bind variable of the VO? (the VO that is already bound to the af:selectOneChoice component in the dialog.)
    And I am totally open to alternative suggestions for how to accomplish the original intention of all of this. Thanks for any guidance.
    Johnny Lee

    Thanks, Shay. That has gotten me a few steps further along. I modified my VO by creating a bind variable and modified the SQL to use this variable in it's where clause. I generated Java for my AppMod (which I hadn't done before, preferring to keep things simple) and created a method to supply a value to my VO's new bind variable. I need a little more hand-holding, though, to wire an input text field & button (or af:selectInputText?) to both the AppMod's new method AND the data component that will display the query results.
    "...drag the exposed method as a button onto a JSF page." That's easy enough, but I haven't yet figured out from the examples how to associate the value of an input component with the parameter of the AppMod's new method. It's getting late, I'm starting to see cross-eyed so I will sleep on this and take another look in the morning. Thanks for your help.
    Johnny Lee

  • Wiki file attachments - can the wiki be configured to link to a file already on the server rather than uploading it into the page?

    Can the wiki be configured to link to a file already on the server rather than uploading it into the page? This would enable users to open (and edit) the original server hosted document rather than downloading a static copy that can't be edited and synced back into the wiki page.
    As a workaround I've tried attaching an alias to a file but it doesn't work - the wiki instead uploads the aliased file.
    From what I can work out, the default wiki behaviour is to upload a document to a wiki page, which creates a copy of the uploaded document in the wiki database. This copy has no connection to the original document. It can be downloaded and edited, but the edits are not saved back into the wiki hosted version of the document.
    I'd like to be able to upload a link or alias to a document (with preview please!) already on the server. A user could then preview the document or click to open and edit it.
    The only way I can do this at the moment is to create a link "afp://123.../doc.rtf" to the original. This is timeconsuming and confusing for non-technical users and doesn't offer the benefits of the attach function (ie document preview).
    Is there any way the wiki can be configured to link to documents already on the server using the attach functionality?

    An update for anyone in a similar situation.
    Patch 3944727 for 9.0.4.1 that solves this issue: "USER LOV IASM11SHIP EDIT USER LOV SHOULD SHOW THE NICKNAME ATTRIBUTE." However, the patch is mutually exclusive with the latest CPU's and there's no plan to merge the pacthes given the dwindling support for 9.0.4.1. So that patch is pretty much worthless.
    I've been told that this patch is included in newer portal versions, so the real solution is an upgrade.
    Trenton

  • How to use Apache MyFaces components in JSF pages + Eclipse?

    I've managed to write my JSF web app. in Eclipse jee, and test it on JBoss 4.2 GA, within Eclipse, but how to import Apache MyFaces components into Eclipse JSF plug-in?
    If I can't import it nicely, how to use those components directly in JSF pages?

    The Tomahawk component library provides MyFaces components. Install it as you would any other component library.
    http://myfaces.apache.org/tomahawk/

  • Importing visual jsf page into another jsp page

    Hi
    I am developing a web application using jsp and struts. I want to embed a visual jsf page that Ive created into another jsp page (which is a normal jsp page, not a jsf one.)
    Ive tried quite a few things but nothing seems to work..
    <jsp:include page="Page2.jsp">
    Ive surrounded the code in the f:subview tags. still doesnt work.
    Ive tried using <jsp:useBean id="Page2" scope="page" class="visualwebapplication.Page2" > .. It does not give me an error, but does not embed the page as well. Do I need to some other code after this to use the above bean to display the page.
    Any help would be greatly appreciated.
    Regards
    Sparsh Agarwal

    Hi
    This is the error message that is generated in the tomcat log once i try to load the homePage.do
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationContext log
    SEVERE: Cannot forward after response has been committed
    java.lang.IllegalStateException: Cannot forward after response has been committed
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
            at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jsp.view.main_005fright_jsp._jspService(main_005fright_jsp.java:54)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
            at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
            at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
            at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.IllegalStateException: Cannot forward after response has been committed
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
            at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jsp.view.main_005fright_jsp._jspService(main_005fright_jsp.java:54)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
            at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
            at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
            at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalStateException: Cannot forward after response has been committed
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
            at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jsp.view.main_005fright_jsp._jspService(main_005fright_jsp.java:54)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
            at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
            at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
            at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: ServletException in '/view/main_right.jsp': Cannot forward after response has been committed
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:923)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet action threw exception
    javax.servlet.jsp.JspException: ServletException in '/view/main_right.jsp': Cannot forward after response has been committed
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:923)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)

  • Including a JSP page into a JSF page

    Hi !!
    I have read some posts here about <f:subwview>. There says to use:
    <f:subview>
       <jsp:include page="somepage.jsp"/>
    </f:subview>But it does not work.
    How can i include a jsp page into a JSF page?
    Thanks !!!

    Hi,
    Replace <jsp:include page="somepage.jsp">
    with <%@ include file="datasetView.jspf" %>
    See thread: http://forum.java.sun.com/thread.jspa?messageID=3413354&#3413354

  • Want to integrate all jsf pages into one application like globle mene

    Hi,
    i have created lot of jsf pages, that all are in diffrenet-2- systems. Now i want to integrate all page in one system for one application. please tell me how i can integrate these in jdeveloper.
    Thanks in Advance.
    Sanjay

    Hi,
    if you want them all under one J2EE context root during runtime then you have to move the files to one project root, which is a manual configuration to do. For build requirements like this i think looking into Apache Maven could hep.
    Frank

  • How to use ocx with javascript in jsf page

    Hello,
    Please i create a jsf page which purpose is to scan.
    I used in a source of my jsf page an OCX with object tag like
    <OBJECT ID="Ranger"
    CLASSID="CLSID:1C5C9095-05A8-11D4-9AF9-00104B23E2B1">
    </OBJECT>
    i wrote my functions which use this ocx in javascript. Function that i call with clientlistener rear adf button
    but it doesn't work
    Could you please help me please VERY IMPORTANT

    This my html code:
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportNewState(newState,previousState)>  
    // Transport new state, fired every time the State changes on the control
    // input params , are the new state and the previous state
    //alert(newState);
    var RangerTransportStates = {TransportUnknownState: -1, TransportShutDown: 0, TransportStartingUp: 1,
                                  TransportChangeOptions: 2, TransportEnablingOptions: 3, TransportReadyToFeed: 4,
                                  TransportFeeding: 5, TransportExceptionInProgress:6, TransportShuttingDown: 7};
    if(newState == RangerTransportStates.TransportShutDown)
          document.getElementById('StartRanger').disabled = false;
          document.getElementById('EnableRanger').disabled = true;
          document.getElementById('StopFeeding').disabled = true;
          document.getElementById('StartFeeding').disabled = true;
          document.getElementById('ChangeOptions').disabled = true;
          document.getElementById('Shutdown').disabled = true;     
          document.getElementById('UserInstructions').innerHTML = "Press 'Startup Ranger' to initialize the Ranger control"
    if(newState == RangerTransportStates.TransportChangeOptions)
          document.getElementById('StartRanger').disabled = true;
          document.getElementById('StartFeeding').disabled = true;
          document.getElementById('EnableRanger').disabled = false;
          document.getElementById('Shutdown').disabled = false;
          document.getElementById('UserInstructions').innerHTML = "<b>Ranger Started</b> <br> Press 'Enable Ranger' to enable the current Ranger Options and prepare to start feeding"
    if(newState == RangerTransportStates.TransportReadyToFeed)
          document.getElementById('EnableRanger').disabled = true;
          document.getElementById('StopFeeding').disabled = true;
          document.getElementById('StartFeeding').disabled = false;
          document.getElementById('ChangeOptions').disabled = false;
          document.getElementById('Shutdown').disabled = false;
          document.getElementById('UserInstructions').innerHTML = "<b>Ready to feed </b><br> Press 'Start Feeding' to start Ranger Feeding checks from main hopper"
    if(newState == RangerTransportStates.TransportFeeding)
          document.getElementById('StartFeeding').disabled = true;
          document.getElementById('ChangeOptions').disabled = true;
          document.getElementById('Shutdown').disabled = true;
          document.getElementById('StopFeeding').disabled = false;     
          document.getElementById('UserInstructions').innerHTML = "<b>Feeding... </b><br> Press 'Stop Feeding' to stop Ranger from Feeding checks"
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportChangeOptionsState(previousState)>  
    //Fired when Ranger reaches the change option state, input params are previous state
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportReadyToFeedState(previousState)>  
    //Fired when ranger is ready to feed the next item
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportFeedingStopped(reason,itemsFed,itemsrequested)>  
    //Fired when feeding has stopped
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportItemInPocket(itemID)>  
    //Fired when the item has been fed into the pocket
    var RangerSides = {TransportFront: 0, TransportRear: 1};
    var RangerImageColorTypes = {ImageColorTypeBitonal:0, ImageColorTypeGrayscale: 1, ImageColorTypeColor: 2};
    // Note: SaveImageToFile() below is used to save gray scale images.  Please verify that 'NeedFrontImage2' and
    //       'NeedRearImage2' are set to 'true' in the GenericOptions.ini file.  If bitonal images are to be saved,
    //       please set 'NeedFrontImage1'/'NeedRearImage1' to 'true' before calling SaveImageToFile() for bitonal images.
    document.getElementById('MICR').innerHTML = 'MICR: ' + Ranger.GetMicrText(1);
    temp = Ranger.SaveImageToFile(RangerSides.TransportFront, RangerImageColorTypes.ImageColorTypeGrayscale, "C:\\test\\Testfront.jpg");
    temp = Ranger.SaveImageToFile(RangerSides.TransportRear, RangerImageColorTypes.ImageColorTypeGrayscale,"C:\\test\\Testback.jpg");
    //Here you could check to see if the images were saved, putting alternate
    //text in place of the image if they werent saved.
    document.getElementById('PIC').innerHTML = '<img height=200 width=400 src=' + '"Testfront.jpg">' + '<br>' + '<img height=200 width=400 src=' + '"Testback.jpg">';
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportNewItem()>  
    // Fired when a new item has entered the track
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportShutDownState(currentState,previousState)>  
    //Fired when the Ranger control has been shutdown
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportSetItemOutput(itemID)>  
    //fired when the item is ready to have params set(pocketing decisions)
    getstatus();
    </SCRIPT> 
    <!-- End of Events ------------- -->
    <SCRIPT LANGUAGE="javascript">
    function getstatus()
         document.getElementById('Status').innerHTML = 'Status: ' + Ranger.GetTransportStateString();
    </SCRIPT>
    </head>
    <body>
    <OBJECT ID="Ranger"
    CLASSID="CLSID:1C5C9095-05A8-11D4-9AF9-00104B23E2B1">
    </OBJECT>
    <div id="container">
         <div id="banner" >
         </div>
         <div id="left">
              <h2>Ranger Control Buttons</h2>
              <br><div id="Status">Status:</div><br>
              <input class="controlbutton" id="StartRanger" type=button value="Startup Ranger" onclick="Ranger.Startup();">
              <input class="controlbutton" id="EnableRanger" disabled type=button value="Enable Ranger" onclick="Ranger.EnableOptions();">
              <input class="controlbutton" id="StartFeeding" disabled type=button value="Start Feeding" onclick="Ranger.StartFeeding(0,0);">
              <input class="controlbutton" id="StopFeeding" disabled type=button value="Stop Feeding" onclick="Ranger.StopFeeding();">
              <input class="controlbutton" id="ChangeOptions" disabled type=button value="Change Options" onclick="Ranger.PrepareToChangeOptions();">
              <input class="controlbutton" id="Shutdown" disabled type=button value="Shutdown Ranger" onclick="Ranger.Shutdown();">
         </div>
         <div id="content">
              <div id="UserInstructions">Press 'Startup Ranger' to initialize the Ranger control</div>
              <br>
              <div id="MICR"></div>
              <br>
              <div id="PIC"></div>
         </div>
         <div id="footer"><h1>Ranger Control</h1></div>
    </div>
    them jsf code:
    <f:view>
    <OBJECT ID="Ranger"
        CLASSID="CLSID:1C5C9095-05A8-11D4-9AF9-00104B23E2B1">
    </OBJECT>   
      <af:document id="d1" title="Fiche Bordereau">
        <af:messages id="m1"/>
        <af:form id="f1">
          <af:pageTemplate viewId="/tempCompens.jspx" id="pt1">
           <af:resource type="javascript">
            // Transport new state, fired every time the State changes on the control
            // input params , are the new state and the previous state
            //alert(newState);
            var RangerTransportStates = {TransportUnknownState: -1, TransportShutDown: 0, TransportStartingUp: 1,
                                  TransportChangeOptions: 2, TransportEnablingOptions: 3, TransportReadyToFeed: 4,
                                  TransportFeeding: 5, TransportExceptionInProgress:6, TransportShuttingDown: 7};
            ok =false;
            var i = 0;
            if(newState == RangerTransportStates.TransportShutDown)
                document.getElementById('btn_demarre').disabled = false;
                document.getElementById('btn_active').disabled = true;
                document.getElementById('btn_arretscan').disabled = true;
                document.getElementById('btn_scan').disabled = true;
                document.getElementById('btn_changetat').disabled = true;
                document.getElementById('btn_arret').disabled = true;
                document.getElementById('UserInstructions').value = "Appuyer sur Demarrer pour initiliser le scanner"
            if(newState == RangerTransportStates.TransportChangeOptions)
                document.getElementById('btn_demarre').disabled = true;
                document.getElementById('btn_scan').disabled = true;
                document.getElementById('btn_active').disabled = false;
                document.getElementById('btn_arret').disabled = false;
                document.getElementById('UserInstructions').value = "Demarrage... Appuyer sur Activer pour preparer le scanning "
                ok = false;
            if(newState == RangerTransportStates.TransportReadyToFeed)
                document.getElementById('btn_active').disabled = true;
                document.getElementById('btn_arretscan').disabled = true;
                document.getElementById('btn_scan').disabled = false;
                document.getElementById('btn_changetat').disabled = false;
                document.getElementById('btn_arret').disabled = false;
                document.getElementById('UserInstructions').value = "Pret a scanner.   Appuyer sur Scanner pour lancer le scanning"
                ok = true;
            if(newState == RangerTransportStates.TransportFeeding)
                document.getElementById('btn_scan').disabled = true;
                document.getElementById('btn_changetat').disabled = true;
                document.getElementById('btn_arret').disabled = true;
                document.getElementById('btn_arretscan').disabled = false;
                document.getElementById('UserInstructions').value = "Scanning...  Appuyer sur Arret scanning pour stopper le scanning"
            getstatus();
           </af:resource>
           <af:resource type="javascript">
            //Fired when the item has been fed into the pocket
                var RangerSides = {TransportFront: 0, TransportRear: 1};
                var RangerImageColorTypes = {ImageColorTypeBitonal:0, ImageColorTypeGrayscale: 1, ImageColorTypeColor: 2};
            //alert(Ranger.GetGenericOptionFileName());
                Ranger.SetGenericOption("OptionalDevice","NeedFrontImage1",true);
                Ranger.SetGenericOption("OptionalDevice","NeedRearImage1",true);
                document.getElementById('cmc7').value = 'CMC7= '+Ranger.GetMicrText(1);
                var cmc7 = trim(Ranger.GetMicrText(1));
                cmc7 = cmc7.replace(" ","_");
                cmc7 = cmc7.replace(" ","_");
            //cmc7 = cmc7.substring(0,15);
                cmc7R = cmc7+"_R.jpg";
            //alert(Ranger.GetImageAddress(RangerSides.TransportFront, RangerImageColorTypes.ImageColorTypeGrayscale))
                function trim(myString)
                    return myString.replace(/^\s+/g,'').replace(/\s+$/g,'')
                temp = Ranger.SaveImageToFile(RangerSides.TransportFront, RangerImageColorTypes.ImageColorTypeGrayscale, "C:\\Documents and Settings\\Koffi Ernest\\Mes documents\\NetBeansProjects\\Scan-project\\web\\"+cmc7R);
                window.onload = function()
                  document.getElementById("verso").src = monfichierV();
                function monfichierR()
                //  nomfichier = nomfichier+"_R.jpg";
                    var nomfichier = trim(Ranger.GetMicrText(1))+"_R.jpg";
                    return  nomfichier
                cmc7V = cmc7+"_V.jpg";
                temp = Ranger.SaveImageToFile(RangerSides.TransportRear, RangerImageColorTypes.ImageColorTypeGrayscale,"C:\\Documents and Settings\\Koffi Ernest\\Mes documents\\NetBeansProjects\\Scan-project\\web\\"+cmc7V);
                window.onload = function()
                    document.getElementById("verso").src = monfichierV();
                function monfichierV()
                    var nomfichierV = trim(Ranger.GetMicrText(1))+"_V.jpg";
                    return nomfichierV
                function getRImageUrl(img)
                    var imageSrc = trim(Ranger.GetMicrText(1))+"_R.jpg";
                    if(img.src != imageSrc)
                    // don't get stuck in an endless loop
                    img.src = imageSrc;
                function getVImageUrl(img)
                 var imageSrc = trim(Ranger.GetMicrText(1))+"_V.jpg";
                 if(img.src != imageSrc)
                 { // don't get stuck in an endless loop
                  img.src = imageSrc;
            document.getElementById('recto').source = cmc7R;
            document.getElementById('verso').source = cmc7V;
            getstatus();
           </af:resource>
            <af:resource type="javascript">
                 document.getElementById('status').value = Ranger.GetTransportStateString();
            </af:resource>
            <f:facet name="temp">
              <af:panelSplitter id="ps1" splitterPosition="329"
                                inlineStyle="width:709px;">
                <f:facet name="first">
                  <af:panelGroupLayout layout="scroll"
                                       xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                       id="pgl5">
                    <af:panelGroupLayout id="pgl1">
                      <af:outputText value="Saisie des informations du bordereau"
                                     id="ot1"
                                     inlineStyle="font-size:small; font-family:inherit; color:Gray; font-weight:bold;"/>
                    </af:panelGroupLayout>
                    <af:panelFormLayout id="pfl1">
                      <f:facet name="footer">
                        <af:panelGroupLayout id="pgl4" layout="horizontal">
                          <af:commandButton text="Annuler" id="cb4"/>
                          <af:spacer width="5" height="10" id="s14"/>
                          <af:commandButton text="Scanner" id="cb5"
                                            action="success"/>
                        </af:panelGroupLayout>
                      </f:facet>
                      <af:spacer width="10" height="30" id="s2"/>
                      <af:panelGroupLayout id="panelGroupLayout1"
                                           layout="horizontal" valign="middle">
                        <af:inputText label="N° de compte                   " id="it1"/>
                        <af:spacer width="10" height="10" id="s16"/>
                        <af:commandButton text="..." id="cb3"/>
                      </af:panelGroupLayout>
                      <af:spacer width="5" height="3" id="s12"/>
                      <af:panelGroupLayout id="pgl2" layout="horizontal"
                                           valign="middle">
                        <af:inputText label="Nom du client         " id="it3"/>
                      </af:panelGroupLayout>
                      <af:spacer width="5" height="3" id="s17"/>
                      <af:panelGroupLayout id="pgl11" layout="horizontal"
                                           valign="middle">
                        <af:inputText label="N° bordereau    " id="it4"/>
                        <af:spacer width="5" height="10" id="s11"/>
                        <af:commandButton text="New" id="cb1"/>
                        <af:spacer width="2" height="10" id="s13"/>
                        <af:commandButton text="Find" id="cb2"/>
                      </af:panelGroupLayout>
                      <af:spacer width="5" height="3" id="s18"/>
                      <af:panelGroupLayout id="pgl3">
                        <af:inputText label="Nbre de chèque" id="it2"/>
                        <af:spacer width="5" height="3" id="s19"/>
                        <af:inputDate label="Date d'operation                  " id="id1"/>
                      </af:panelGroupLayout>
                      <af:spacer width="1000" height="10" id="s1"/>
                    </af:panelFormLayout>
                  </af:panelGroupLayout>
                </f:facet>
                <f:facet name="second">
                  <af:panelGroupLayout layout="scroll"
                                       xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                       id="pgl6">
                    <af:outputText value="Resultat scanning" id="ot2"
                                   inlineStyle="font-size:small; font-weight:bold; color:Gray;"/>
                    <af:panelTabbed id="pt2"
                                    inlineStyle="height:498px; width:680px;">
                      <af:showDetailItem text="Scanning" id="sdi1">
                        <af:panelSplitter id="ps2" splitterPosition="103"
                                          inlineStyle="width:433px; height:436px;">
                          <f:facet name="first">
                            <af:panelGroupLayout id="pgl7" layout="vertical">
                              <af:outputText value="Liste de contrôles" id="ot3"
                                             inlineStyle="font-weight:bold; color:Gray;"/>
                              <af:spacer width="10" height="10" id="s20"/>
                              <af:outputText id="status"/>
                              <af:spacer width="10" height="10" id="s8"/>
                              <af:commandButton text="Demarrer      "
                                                id="btn_demarre">
                                <af:clientListener type="click"
                                                   method="Ranger.Startup()"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s7"/>
                              <af:commandButton text="Activer              "
                                                id="btn_active"
                                                disabled="true">
                                <af:clientListener method="Ranger.EnableOptions()"
                                                   type="click"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s6"/>
                              <af:commandButton text="Scanner       "
                                                id="btn_scanne"
                                                disabled="true">
                                <af:clientListener method="Ranger.StartFeeding(0,0)"
                                                   type="click"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s3"/>
                              <af:commandButton text="Arrêt Scan   "
                                                id="btn_arretscan"
                                                disabled="true">
                                <af:clientListener method="Ranger.StopFeeding()"
                                                   type="click"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s4"/>
                              <af:commandButton text="Changer Etat"
                                                id="btn_changetat"
                                                disabled="true">
                                <af:clientListener method="Ranger.PrepareToChangeOptions()"
                                                   type="click"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s5"/>
                              <af:commandButton text="Arrêter         "
                                                id="btn_arret"
                                                disabled="true">
                                <af:clientListener method="Ranger.Shutdown()"
                                                   type="click"/>
                              </af:commandButton>
                            </af:panelGroupLayout>
                          </f:facet>
    ....Edited by: nesta on 21 juil. 2010 07:07

Maybe you are looking for

  • What is the difference in Interactive reports and Drill down reports?

    What is the difference in Interactive reports and Drill down reports? Are they same?

  • RFC adapter problems.

    Hello All, Thank you very much for trying to help me. Here is the problem, I have a synchronous interface (RFC to XI to SOAP). when I try to push the RFC through SE37 I am getting the following error. Sender channel 'RFCCommunicationChannelCRD' for p

  • XPath expression with multiple namespaces?

    Hello all. I have been scouring the forums and Google and can't seem to find anything similar to my problem. I have the following XML with three namespaces. Two are defined in the root element and the third is defined in the the IdSession element. To

  • Include "Comments" as caption in slideshow?

    I am putting together a slideshow of vacation pictures. Is it possible to have iPhoto add captions to the pictures of what I type in the "comments" section? This would be more convenient than going into iMovie and adding captions, I think.

  • Nokia Ovi Suite 2.0 and Calendar Sync

    Why did Nokia get rid of the calendar sync function that allows a user to sync years into the future and past.  Nokia Ovi Suite is a poor replacement for Nokia PC Suite. Switching back.