Bean not working in 9i ids

hello,
i have a prograss bar bean class and i saved this bean in
/form90/java and set the property of beans item " implement class" with this bean name but not working or display.
urgent help.
thanks

Syed,
does it show in the demos ? It's unusual that something doesn't show without an error message. Its hard to guess what the prolem is, but since you don't get Java errors in the Jinitiator panel, the Jar file seems to be there or the Bean conatiner doesn't reference it in his implementation property. However, even if you have a misspelled reference of the Java class in teh implementation class property, the Jinitiator console would show a file not found error. Java Beans are initiated when the canvas that they are placed on shows. This means that setting Bean properties before initialization does not have an effect (as far as I know even this raises an error).
Which Jintiator version do you have? I am having 1.3.1.13 and experience some problem with the bean demos. It used to work with 1.3.1.9, which is the recommended version. Maybe your problem is similar.
Fran

Similar Messages

  • Bean not working in jsp

    OK, maybe I'm oversharing, but I want to be thorough. Note I asked this question a different way using very different code.
    Here's my jsp file - myq.jsp
    <%@ page language="java" import="java.util.*,com.serco.inquire.*" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="inq" tagdir="/WEB-INF/tags" %>
    <inq:displayCollection>
    <jsp:attribute name="mgr">Chris Novish</jsp:attribute>
    </inq:displayCollection>Here's displayCollection.tag used by that jsp:
    <%@ tag body-content="scriptless" import="com.serco.inquire.*" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ attribute name="mgr" required="true" %>
    <jsp:useBean id="irc" scope="session" class="com.serco.inquire.IrCollection">
      <jsp:setProperty name="irc" property="mgrid" value="${mgr}" />
    </jsp:useBean>
    ${irc.size} | ${irc.mgrid}Here's the java class IrCollection (used as a bean in the tag):
    package com.serco.inquire;
    import java.sql.*;
    import java.util.*;
    public class IrCollection {
         public ArrayList iRecords = new ArrayList<InquireRecord>();
         public int size;
         public String mgrid;
         public irCollection() {
              super();
         public void populateCollection() {
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   String filename = "inquire.mdb";
                   String database = "jdbc:odbc:Driver={Microsof Access Driver (*.mdb)};DBQ=";
                   database+= filename.trim() + ";DriverID=22;READONLY=true}";
                   Connection con = DriverManager.getConnection( database ,"","");
                   Statement s = con.createStatement();
                   s.execute ("SELECT * FROM inquiries WHERE manager = '" + this.mgrid + "'");
                   ResultSet rs = s.getResultSet();
                   int cur;
                   while (rs.next()) {
                        cur = rs.getRow()-1;
                        InquireRecord localIR = new InquireRecord();
                        int curID = rs.getInt("ID");
                        localIR.setID(curID);
                        String cursub = rs.getString("submitter");
                        localIR.setSubmitter(cursub);
                        this.iRecords.add(cur, localIR);
                   con.close();
                   this.size = iRecords.size();
              catch (Throwable e) {
                   System.out.println(e);
         public int getSize () {
              return this.size;
         public void setMgrid(String datum) {
              this.mgrid = datum;
              this.populateCollection();
         public String getMgrid() {
              return this.mgrid;
    }and here's the InquireRecord java class used by IrCollection:
    package com.serco.inquire;
    public class InquireRecord {
         private int ID;
         private String submitter;
         public InquireRecord() {
              super();
         public InquireRecord(String asubmitter) {
              this.submitter = asubmitter;
         public int getID(){
              return this.ID;
         public void setID(int datum) {
              this.ID = datum;
         public String getSubmitter() {
              return this.submitter;
         public void setSubmitter(String datum) {
              this.submitter = datum;
    }The JSP does this: set the mgr variable, which is passes to the tag, the tag then creates an instance of IrCollection using that mgr variable. (Yes, putting that populateCollection() method call in the setMgrid() method is probably Bad Practice, but it works, usually). The IrCollection objects builds an ArrayList of InquireCollection objects from an Access database. It then sets it's size property based on how many InquireCollection instances it put into the ArrayList. Once that's all done, the tag spits out 2 things: The size property and the mgrid property.
    When I view the JSP, it gives me 0 for the size and Chris Novish for the mgrid.
    I think this could be one of the following:
    *Not finding any matching records of the database
    *Not actually executing the populateCollection() method
    *some how forgetting the information it put into that ArrayList?
    I"m sure there's another possibility, but I don't know.
    Here's what gets me. Here's a test class I made called TestCollection:
    {code}package com.serco.inquire;
    import java.util.*;
    import java.text.*;
    public class TestCollection {
         public static void main(String[] args) {
              IrCollection myCollection = new IrCollection();
              myCollection.setMgrid("Chris Novish");
              System.out.println(myCollection.getSize());
              System.out.println(myCollection.getMgrid());
    }{code}
    if I run that I get a size of 4 and a mgrid of Chris Novish.
    Same data in, and it works as expected.
    So... why won't JSP do it?

    You have defined a session scope for that bean. You have to make sure that the bean is instantiated by this jsp and not earlier. If the bean is located in the session because it was set earlier, then the body tags within useBean are not evaluated.
    Look here - http://java.sun.com/products/jsp/tags/syntaxref.fm14.html#8865
    An easy way to test it would be to change the scope of the bean to request.
    ram.

  • Payload Swap bean not working

    Hi All,
    We are working on PI 7.11. We are trying to retrieve the attachments from the mails and convert them into files. We have enabled Keep Attachments in sender mail adapter. For swapping the payload we used payload swap bean. We referred the below blog
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    We are just trying with XML attachments.
    The problem now is the payloads are not swapping. The file contains only the body of the mail not the attachment. I dont know what I'm missing. Please advice
    Regards,
    Malini

    Hi abhishek,
    Please find below the config done in adapters
    1     localejbs/AF_Modules/PayloadSwapBean                          Local Enterprise Bean     1
    2     sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean     Local Enterprise Bean     mail
    1     swap.keyName     Content-Description
    1     swap.keyName     Content-Disposition
    1     swap.keyValue     MailAttachment-1
    1     swap.keyValue     attachment;filename="MailAttachment-1.xml"
    Regards,
    Malini

  • Sender adapter request response bean not working for calling a webservice

    Hi All,
    In PI 7.31, My scenario :  SOAP sender Asynch-> PI -> HTTP Receiver Sync ->take response to call another webservice  (SOAP)
    I have configured request response bean and response one way bean in the sender adapter to make this work.
    Attached the screenshot of the module config in  the sender soap adapter. The final response from HTTP has to be used to call another webservice (not sender webservice)
    This giving an error "couldn't retrieve binding values for sender to receiver etc etc ----------"
    Has anyone configured response one way bean to call a webservice to submit? If so, please share the configuration details. And let me know if I am doing anything wrong
    thx
    mike

    Hi Michael,
    I think the adapter type is for the receiver channel looking at the documentation SAP Library - SAP Exchange Infrastructure
    Have you checked your receiver channel doesn't belong to a party?
    I havent tried this bridge with the http_aae but looks to be problematic according with Michal comment here http://scn.sap.com/community/pi-and-soa-middleware/blog/2014/01/28/generic-pi-async-sync-bridge-configuration-for-any-adapters#comment-454463
    Regards.

  • @EJB annotation in JSF managed beans not working

    Hi all,
    I've been trying to get the @EJB annotation to work in a JSF manged bean without success.
    The EJB interface is extremely simple:
    package model;
    import javax.ejb.Local;
    @Local
    public interface myEJBLocal {
    String getHelloWorld();
    void setHelloWorld(String helloWorld);
    and the bean code is simply:
    package model;
    import javax.ejb.Stateless;
    @Stateless
    public class myEJBBean implements myEJBLocal {
    public String helloWorld;
    public myEJBBean() {
    setHelloWorld("Hello World from myEJBBean!");
    public String getHelloWorld() {
    return helloWorld;
    public void setHelloWorld(String helloWorld) {
    this.helloWorld = helloWorld;
    When I try to use the above EJB in a managed bean, I only get a NullPointerException when oc4j tries to instantiate my managed bean. The managed bean looks like:
    package view.backing;
    import javax.ejb.EJB;
    import model.myEJBLocal;
    import model.myEJBBean;
    public class Hello {
    @EJB
    private static myEJBLocal myBean;
    private String helloWorld;
    private String helloWorldFromBean;
    public Hello() {
    helloWorld = "Hello from view.backing.Hello!";
    helloWorldFromBean = myBean.getHelloWorld();
    public String getHelloWorld() {
    return helloWorld;
    public void setHelloWorld(String helloWorld) {
    this.helloWorld = helloWorld;
    public String getHelloWorldFromBean() {
    return helloWorldFromBean;
    Am I missing something fundamentally here? Aren't you supposed to be able to use an EJB from a JSF managed bean?
    Thanks,
    Erik

    Well, the more I research this issue, the more confused I get. There have been a couple of threads discussing this already, and in this one Debu Panda states that:
    "Support of injection in JSF managed bean is part of JSF 1.1 and OC4J 10.1.3.1 does not support JSF 1.1"
    10.1.3.1 Looking up a session EJB with DI from the Web tier
    But if you look in the release notes for Oracle Application Server 10g R3, it is explicitly stated that JSF 1.1. is supported. So I'm not sure what to believe.
    I've also tried changing the version in web.xml as described here:
    http://forums.java.net/jive/thread.jspa?threadID=2117
    but that didn't help either.
    I've filed a SR on Metalink for this, but haven't got any response yet.
    Regards,
    Erik

  • My first bean not working... is it classpath?

    I am doing my first Javabean ever and it is a very basic one. I have uploaded the bean to a server but it is not running. I am pretty sure that the code is right. My guess is something about classpath but I am not sure. Please read this and let me know if I making a bean in right way???
    1- In the first line in my java file (myBean.java) I write package user;
    2- I put myBean.java in C:\Program Files\Java\jdk1.6.0_11\bin
    3- From the console I run javac myBean.java and get BeanClass.class
    4- I upload myBean.class to the server in directory WEB-INF\classes (I have already asked the web hotel and it should be there)
    5- I run the file and get a org.apache.jasper.JasperException
    Am I compiling in the right place in the right way??? Is it something with the classpath???
    Thanks!!!

    I am going to be straight and to the point with you. I would take a step back and start at the basics again because you seem horribly confused about several things, one of which is the basics of the basics (how to compile java classes).
    You shouldn't even be thinking about web development before you have a firm grasp on Java itself. Have you gone through the introductory tutorial?
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
    That should at least explain to you how to use the tools properly. When you have a little knowledge of how Java ticks and you can write command line programs with it, I would first study how java web applications work. Read about servlets and JSPs and how to deploy a web application properly.

  • Java Bean Not Working

    i am installing 10.1.2 on redhat3 update 7
    When i run my OCIConnectionPool bean or any bean following error occurs
    [oracle@appserver beansource]$ java OCIConnectionPool
    libgcj-java-placeholder.sh
    This script is a placeholder for the /usr/bin/java
    master link required by jpackage.org conventions. libgcj's
    rmiregistry, rmic and jar tools are now slave symlinks to these
    masters, and are managed by the alternatives(8) system.
    This change was necessary because the rmiregistry, rmic and jar tools
    installed by previous versions of libgcj conflicted with symlinks
    installed by jpackage.org JVM packages.
    This script was designed to be overridden by the supported RHEL3 JRE
    packages, java-1.4.2-bea and java-1.4.2-ibm. It is installed as an
    alternative symlink as /usr/bin/java. It will override a third-party
    (non-RHEL3) JRE's java command if the JRE's bin directory is listed
    after /usr/bin in PATH. In that case, it is recommended that the
    third-party JRE's bin directory be listed first in PATH instead.
    Exception in thread "main" java.lang.UnsatisfiedLinkError: ocijdbc9: file not found
    at 0x00bb6ca3: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x00ba9b1e: java.lang.Error.Error(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x00bab546: java.lang.LinkageError.LinkageError(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x00bb6f76: java.lang.UnsatisfiedLinkError.UnsatisfiedLinkError(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x00b99b97: java.lang.Runtime._load(java.lang.String, boolean) (/usr/lib/./libgcj.so.3)
    at 0x00bad329: java.lang.Runtime.loadLibrary(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x00bb46f6: java.lang.System.loadLibrary(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x00cd1007: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x00cd0fc7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x00b7e658: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7ef64: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7c4fa: JvInterpMethod.run_synch_object(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x00cd0e7c: ?? (??:0)
    at 0x00cd1007: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x00cd0fc7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x00b7e658: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7ef64: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7c474: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x00cd0e7c: ?? (??:0)
    at 0x00cd1007: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x00cd0fc7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x00b7e658: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7ef64: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7c474: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x00cd0e7c: ?? (??:0)
    at 0x00cd1007: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x00cd0fc7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x00b7e658: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7ef64: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7c474: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x00cd0e7c: ?? (??:0)
    at 0x00cd1007: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x00cd0fc7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x00b7e658: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7ef64: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7c474: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x00cd0e7c: ?? (??:0)
    at 0x00c4aad8: java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties) (/usr/lib/./libgcj.so.3)
    at 0x00cd1007: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x00cd0fc7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x00b7e658: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7ef64: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7c474: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x00cd0e7c: ?? (??:0)
    at 0x00cd1007: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x00cd0fc7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x00b7e658: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7ef64: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7c474: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x00cd0e7c: ?? (??:0)
    at 0x00cd1007: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x00cd0fc7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x00b7e658: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7ef64: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x00b7c474: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x00cd0e7c: ?? (??:0)
    at 0x00b90d68: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/./libgcj.so.3)
    at 0x00bfae99: gnu.gcj.runtime.FirstThread.run() (/usr/lib/./libgcj.so.3)
    at 0x00b9daec: JvThreadRun(java.lang.Thread) (/usr/lib/./libgcj.so.3)
    at 0x00b6a82c: JvRunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/./libgcj.so.3)
    at 0x08048930: ?? (??:0)
    at 0x006a979a: __libc_start_main (/lib/tls/libc.so.6)
    at 0x080486e1: ?? (??:0)
    Chetan

    One way is to change the "break;" line to "return true;" and remove the current "return true;" line. Then move the "return false;" line outside the catch section. It seems whatever you are doing is not throwing an exception, so whatever else it does, it always falls thru to the return true line.

  • Custom event on a bean not working!

    I'm trying to set a beans properties by using the propertyEventsDescriptors method and have the 2 following classes 'Person' and 'PersonBeanInfo'.
    When I add a bean to my program I want to be able to select the nameChange event but at the moment nothing is coming up when I choose event.
    Its the getEventSetDescriptors() in PersonBeanInfo where I think something is wrong can you have a look.
    package explicit;
    import java.beans.EventSetDescriptor;
    import java.beans.IntrospectionException;
    import java.beans.PropertyDescriptor;
    import java.beans.SimpleBeanInfo;
    public class PersonBeanInfo extends SimpleBeanInfo {
         public Person person;
         public PropertyDescriptor[] getPropertyDescriptors() {
         try {
              PropertyDescriptor nameDescriptor = new PropertyDescriptor("name", Person.class);
              PropertyDescriptor addressDescriptor = new PropertyDescriptor("home address", Person.class, "getAddress", "setAddress");
              PropertyDescriptor[] propertyDescriptorArray = {nameDescriptor, addressDescriptor};
              return propertyDescriptorArray;
         } catch (IntrospectionException e) {
              System.out.println("error");
         return null;
         @Override
         public EventSetDescriptor[] getEventSetDescriptors() {
              Class sourceClass = Person.class;
              String eventSetName = "NameChangedEvent";
              Class listenerClassType = NameChangeListener.class;
              String[] listenerMethodName = { "nameChanged" };
              String addListenerMethodName = "registerNameChangeListener";
              String removeListenerMethodName = "deregisterNameChangeListener";                              
                   try {
                        EventSetDescriptor nameChangeEventDescriptor = new EventSetDescriptor(sourceClass, eventSetName, listenerClassType, listenerMethodName, "nameChanged", addListenerMethodName, removeListenerMethodName);
                        EventSetDescriptor[] descriptors = {nameChangeEventDescriptor};
                        return descriptors;
                   } catch (IntrospectionException e) {
                        return null;
    package explicit;
    import java.util.ArrayList;
    import java.util.List;
    public class Person {
         private String name;
         private String address;
         private int age;
         private List<NameChangeListener> listeners = new ArrayList<NameChangeListener>();
         public String getAddress() {
              return address;
         public void setAddress(String address) {
              this.address = address;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
              this.fireNameChangeEvent();
         public void registerNameChangeListener(NameChangeListener listener) {
              listeners.add(listener);
         public void deregisterNameChangeListener(NameChangeListener listener) {
              listeners.remove(listener);
         private void fireNameChangeEvent() {
              NameChangeEvent event = new NameChangeEvent(this, name);
              for(NameChangeListener listener : listeners)
                   listener.nameChanged(event);
    I can't get my head around it, thanks for any help.

    Sorry yeah everything complies perfectly. getEventSetDescriptors() is not being called in any other class no. What I want to do is when I put a bean on a window I want to be able to choose the event.
    I'll post the other 2 classes I have sorry i forgot them
    package explicit;
    import java.util.EventListener;
    public interface NameChangeListener extends EventListener {
         public void nameChanged(NameChangeEvent event);
    package explicit;
    import java.util.EventObject;
    public class NameChangeEvent extends EventObject {
         private String name;
         public NameChangeEvent(Object source, String name) {
              super(source);
              this.name = name;
         public String getName() {
              return name;
    }At the moment all the code compiles perfectly but its not doing what i want it to do. Thanks

  • Bean not working

    when runing my disclaimer.jsp i get this compile error can someome tell me what i'm doing wrong thanks
    init:
    deps-jar:
    compile:
    compile-jsps:
    org.apache.jasper.JasperException: The value for the useBean class attribute cci.disclaimer is invalid.
    /root/build/web/disclaimer.jsp(5,0)
    /root/nbproject/build-impl.xml:233: Java returned: 1
    BUILD FAILED (total time: 0 seconds)
    Here is where i declare my bean
    <%@page import="cci.*"%>
    <jsp:useBean id="_DisclaimerBean" class="cci.disclaimer" scope="session"/>
    <jsp:setProperty name="_DisclaimerBean" property="*"/>
    Here is where my bean gets used
    <form name="frmDisclaimer" method=POST action="" onSubmit="return false;" >
    <p>
    <textarea name="textarea" class="disclaimer"><%=(((rsDisclaimer_data = rsDisclaimer.getObject("info"))==null || rsDisclaimer.wasNull())?"":rsDisclaimer_data)%></textarea>
    </p>
    <p align="right">I do not agree
    <input name="chkdisagree" type="checkbox" class="checks" id="disagree" value="disagree">
    I Agree
    <input name="chkagree" type="checkbox" class="checks" id="agree" value=<jsp:getProperty name="_DisclaimerBean" property="agree"/>>
    <input name="conti" type="submit" id="conti" value="Continue">
    Here is my disclaimer bean
    * disclaimer.java
    * Created on February 11, 2005, 9:06 AM
    package cci;
    * @author bilfo71
    import javax.servlet.http.*;
    import cci.jsputil.*;
    public class disclaimer {
    private String session_name;
    private String agree;
    private String disagree;
    HttpServletResponse res;
    public String getSession_name() {
    return this.session_name;
    public void setSession_name(String session_name) {
    this.session_name = session_name;
    public String getAgree() {
    if(agree == ""){
    try {
    res.sendRedirect("../login.jsp");
    catch (Exception e){}
    return this.agree;
    public void setAgree(String agree) {
    this.agree = agree;
    * Getter for property disagree.
    * @return Value of property disagree.
    public String getDisagree() {
    return this.disagree;
    * Setter for property disagree.
    * @param disagree New value of property disagree.
    public void setDisagree(String disagree) {
    this.disagree = disagree;
    public disclaimer(String cokie) {
    System.out.print("Creating cookie");
    String ckdisclaimer;
    ckdisclaimer = session_name ;
    Cookie cookie1 = new Cookie("CookieDisclaimer",ckdisclaimer);
    cookie1.setPath("/");
    cookie1.setMaxAge(60*60*247*52); //
    //cookie1.setValue(newValue);
    res.addCookie(cookie1);
    try{
    res.sendRedirect("index.jsp");
    catch(Exception e){}
    //////////////////////////////////////////////////////

    Your bean disclaimer uses which response? You cannot use response object out of context! Your JSP page has to pass the current response object to your disclaimer bean class and after that bean can use it in context. So you have to pass the response as a HttpServletResponse object to disclaimer bean first.

  • Dynamic Configuratin Bean Not working in PI 7.0 (SP 9)

    Hi,
    According to service pack(SP9) it should work.  We can do your requirement by using simple java code, for more information find below link.
    Same filename from a sender to receiver :: DO we really need UDF ?

    Hi Stefan,
    Thanks for your reply.
    I accept this
    >The module is also available in your system, otherwise you would have an error message when you try to use it
    But the same configuration is working in XI 3.0 & SP 19. (The PI 7.0 configuration scenario exported/imported into XI3.0 as a TPZ file). So there is no chance for "trailing spaces".
    Any further help ..................
    Thanks,
    - Gujjeti.

  • Message Driven Bean Not Working

    I'm trying to make run in WebLogic 7 an MDB,
    it seems well configured,
    in the XML descriptor ,JNDI names of the destination and the ConnectionFactory
    correspond respectively to a destination wich I have created after having created a JMS server in WBL7 and to a ConnectionFactory
    in the client ,
    I have
    -first obtain an InitialContext
    -then a look-up on the QueueConnectionFactory
    -then createQueueConnectionFactory
    -after createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    -after a look-up on the Queue
    -and then .createSender(queue)
    - and finally createTextMessage();
    to have a simple Textmessagen
    in the administration console of Weblogic
    in "monitor all MDB du .jar"
    for this MDB there 0 bean in Pool,0bean in use
    and the JmsConnectionAlive indicate False,
    it seems curious
    and then in the doc they says something about permission
    an "run as principal" wich need to be put to "receive"
    but I didn't exactly understand where
    because the doc isn't completle up-to-date
    and refer to 6,it seems
    because int the WBL7 the ACL are suppressed
    somebody could help me,
    thanks in advance

    Arman & bzoler,
    Make that three of us. I, am using Weblogic 7 (patch 2) and JBuilder Weblogic edition 7.01. I have configured my JMS topic and can successfully send and receive messages with BEA's sample topic sender and receiver (found in
    C:\bea\weblogic700\samples\server\src\examples\jms\topic, but modified for my factory and topic).
    However, when I try to deploy my MDB and send messages to the topic via their client, no messages are received by the MDB. I know it is deploying OK, because I added a println to the ejbCreate method and it is getting displayed when the server is started.
    Any ideas from anyone out there of where we may be going wrong? Is it possible that you are forced to use Security when using MDB?
    -David

  • bean:message/ tag is not working in tiles:insertAttribute/

    I have a bean:message tag inside my tiles:insertAttribute as shown below.
    <tiles:insertAttribute name='<bean:message="user.menu"/>'/>But <bean:message/> is not getting the value from resource bundle, my resource bundle is in correct place. If i hard code the value then it s working fine.
    How to make it work? Any help?

    sunish_jose wrote:
    <tiles:insertAttribute><bean:message="user.menu"/></tiles:insertAttribute>this way it s not working. Could you pls tell how solve it by using EL. I was not able to find a similar sample evenafter searching for some time.
    thanks in advance.I did say that I don't know if it will or not, I was just giving a sample of how it would work if the tag allowed the value for 'name' to be put in the body.
    I'm not very familiar with the Struts bean tags and in any case, I believe you should use the JSTL tags where ever possible. So you'd pick the <fmt:message> tag from there. I don't think the <bean:message> tag allows you to get the value in to a variable.
    <fmt:message var="tilesAttributeNameValue" key="user.menu" />
    //create an EL variable named tilesAttributeNameValue with the value from the resource bundle
    <tiles:insertAttribute name="${tilesAttributeNameValue}"></tiles:insertAttribute>
    //use EL to put the valueTake a look here [1] for a JSTL introduction:
    [1] http://www.ibm.com/developerworks/java/library/j-jstl0415/

  • Bean is not worked  in the jsff page

    Hi
    JDeveloper Studio Edition Version 11.1.2.2.0
    I Have a bean for run a jasperreport
    package Reports;
    import javax.faces.event.ActionEvent;
    import sp11.model.apm.clubImpl;
    import java.io.ByteArrayOutputStream;
    import java.io.InputStream;
    import java.math.BigDecimal;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.util.HashMap;
    import java.util.Map;
    import javax.faces.context.FacesContext;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletResponse;
    import net.sf.jasperreports.engine.JasperExportManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JasperReport;
    import net.sf.jasperreports.engine.type.WhenNoDataTypeEnum;
    import net.sf.jasperreports.engine.util.JRLoader;
    import net.sf.jasperreports.view.JasperViewer;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.binding.BindingContainer;
    import oracle.jbo.client.Configuration;
    public class CardFrontBean {
    public CardFrontBean() {
    public String runReportAction(){
    DCIteratorBinding rleIter = (DCIteratorBinding)getBindings().get("RealentityIterator");
    String RleId = rleIter.getCurrentRow().getAttribute("RleId").toString();
    BigDecimal ID = new BigDecimal(RleId);
    Map parameter = new HashMap();
    parameter.put("ID", ID);// where ID is a jasper report parameter
    try
    runReport("card_front.jasper", parameter);
    catch (Exception e)
    return null;
    public BindingContainer getBindings(){
    return BindingContext.getCurrent().getCurrentBindingsEntry();
    public ServletContext getContext(){
    return (ServletContext)getFacesContext().getExternalContext().getContext();
    public HttpServletResponse getResponse(){
    return (HttpServletResponse)getFacesContext().getExternalContext().getResponse();
    public static FacesContext getFacesContext(){
    return FacesContext.getCurrentInstance();
    public void runReport(String repPath, java.util.Map param) throws Exception {
    Connection conn = null;
    try
    HttpServletResponse response = getResponse();
    ServletOutputStream out = response.getOutputStream();
    response.setHeader("Cache-Control", "attachment;filename=\"CardFront.pdf\"");
    response.setContentType("application/pdf");
    ServletContext context = getContext();
    InputStream fs = context.getResourceAsStream("/ReportsFolder/" + repPath);
    JasperReport template = (JasperReport) JRLoader.loadObject(fs);
    template.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);
    PreparedStatement statement = null;
    String amDef = "sp11.model.apm.club";
    String config = "clubLocal";
    clubImpl am = (clubImpl)Configuration.createRootApplicationModule(amDef,config);
    statement = am.getDBTransaction().createPreparedStatement("select 1 from dual", 0);
    conn = statement.getConnection();
    JasperPrint print = JasperFillManager.fillReport(template, param, conn);
    //JasperViewer.viewReport(print, false);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    JasperExportManager.exportReportToPdfStream(print, baos);
    out.write(baos.toByteArray());
    out.flush();
    out.close();
    FacesContext.getCurrentInstance().responseComplete();
    catch (Exception jex)
    jex.printStackTrace();
    finally
    close(conn);
    public void close(Connection con){
    if (con != null)
    try
    con.close();
    catch (Exception e)
    and a commandButton in the .jsff page
    <af:commandButton id="Realentitycardfront"
    textAndAccessKey="#{nls['REALENTITY_CARDFRONT']}"
    shortDesc="#{nls['REALENTITY_CARDFRONT_HINT']}"
    action="#{CardFront.runReportAction}"/>
    my .jsff page is in a bounded task flow with Use Page Fragments = true
    when i click the button. ........>nothing
    what is the matter
    i read in a post that it is not work in jsff page with page fragmentation
    please help me
    thanks

    One problem is that you write into the output stream from an action method and don't know what's already in the output stream. Once there is one byte written to hte stream (which you can't know from inside the action method) the pdf stream does not behave as you think it would.
    Next thing is that you use createRootApplicationModule but never release it. This will get you out of resources error eventually.
    A better approach would be to put this code in a servlet and stream the report from there. In the servlet you have control over the output stream.
    Check my blog http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/ where I show how to serve images from a servlet which can even use the application module pool from the application (no need to use createRootApplicationModule at all). All you have to do is to exchange the part where I get and stream the image data to your needs.
    Timo

  • Urgent: SAX parser bean is not working in JSP page

    Hi All,
    I have created a bean "ReadAtts" and included into a jsp file using
    "useBean", It is not working. I tried all possibilities. But Failed Plz Help me.
    Below are the details:
    Java Bean: ReadAtts.java
    package sax;
    import java.io.*;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import java.util.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.ParserConfigurationException;
    public class ReadAtts extends DefaultHandler implements java.io.Serializable
         private Vector attNames = new Vector(); //Stores all the att names from the XML
         private Vector attValues = new Vector();
         private Vector att = new Vector();
         private Locator locator;
         private static String start="",end="",QueryString="",QString1="",QString2="";
    private static boolean start_collecting=false;
         public ReadAtts()
         public Vector parse(String filename,String xpath) throws Exception
    QueryString=xpath;
         StringTokenizer QueryString_ST = new StringTokenizer(QueryString,"/");
         int stLen = QueryString_ST.countTokens();
         while(QueryString_ST.hasMoreTokens())
              if((QueryString_ST.countTokens())>1)
              QString1 = QueryString_ST.nextToken();
    else if((QueryString_ST.countTokens())>0)
                   QString2 = QueryString_ST.nextToken();
         SAXParserFactory spf =
    SAXParserFactory.newInstance();
    spf.setValidating(false);
    SAXParser saxParser = spf.newSAXParser();
    // create an XML reader
    XMLReader reader = saxParser.getXMLReader();
    FileReader file = new FileReader(filename);
    // set handler
    reader.setContentHandler(this);
    // call parse on an input source
    reader.parse(new InputSource(file));
         att.add("This is now added");
         //return attNames;
    return att;
    public void setDocumentLocator(Locator locator)
    this.locator = locator;
    public void startDocument() {   }
    public void endDocument() {  }
    public void startPrefixMapping(String prefix, String uri) { }
    public void endPrefixMapping(String prefix) {  }
    /** The opening tag of an element. */
    public void startElement(String namespaceURI, String localName,String qName, Attributes atts)
    start=localName;
    if(start.equals(QString2))
    start_collecting=true; //start collecting nodes
    if(start_collecting)
    if((atts.getLength())>0)
    for(int i=0;i<=(atts.getLength()-1);i++)
    attNames.add((String)atts.getLocalName(i));
    attValues.add((String)atts.getValue(i));
    /** The closing tag of an element. */
    public void endElement(String namespaceURI, String localName, String qName)
    end = localName;
    if(end.equals(QString2))
         start_collecting=false; //stop colelcting nodes
    /** Character data. */
    public void characters(char[] ch, int start, int length) { }
    /** Ignorable whitespace character data. */
    public void ignorableWhitespace(char[] ch, int start, int length){ }
    /** Processing Instruction */
    public void processingInstruction(String target, String data) { }
    /** A skipped entity. */
    public void skippedEntity(String name) { }
    public static void main(String[] args)
    String fname=args[0];
    String Xpath=args[1];
    System.out.println("\n from main() "+(new ReadAtts().parse(fname,Xpath)));
    //System.out.println("\n from main() "+new ReadAtts().attNames());
    //System.out.println("\n from main() "+new ReadAtts().attValues());
    JSP File:
    <%@ page import="sax.*,java.io.*,java.util.*,java.lang.*,java.text.*;" %>
    <jsp:useBean id="p" class="sax.ReadAtts"/>
    Data after Parsing is.....
    <%=p.parse"E:/Log.xml","/acq/service/metrics/system/stackUsage")%>
    Expected Output:
    The jsp file should print all the vector objects from the "ReadAtts" bean
    Actual Output:
    Data after Parsing.......[]
    Thanks for your time.....
    Newton
    Bangalore. INDIA

    the problem is not because of java code insdie jsp page
    I have removed all things but the form and it is still not working
    here is the modified code:
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.print("addBTN");
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input name="addBTN" type="submit" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

  • Java bean, works in Integration Engine but does not work in Adapter Engine.

    In connection to the following thread:
    PayloadZipBean - variable filename inside the archive
    I am trying to use the same bean.
    However I can see, that the bean is working correctly when I use Integration Engine.
    But if I am using ICo (AAE) and using the same bean in the receiver, I can see, that the bean gets called but does not work correctly.
    The audit log added to my bean shows, that the bean could read the filename correctly from the Dyanic Config in the message, but it cannot write the same into the message.
    Could you please help on this?

    Your above posted system details show multiple Java Console extensions.
    You can uninstall (remove) the Java Console extensions and disable the Java Quick Starter extension, you do not need them to run Java applets.
    See http://kb.mozillazine.org/Java#Multiple_Java_Console_extensions
    See also http://www.java.com/en/download/help/quickstarter.xml - What is Java Quick Starter (JQS)? What is the benefit of running JQS? - 6.0
    Disable the Java Quick Starter extension: Tools -> Addons -> Extensions
    Control Panel -> Java -> Advanced tab -> Miscellaneous -> Java Quick Starter (disable)
    You can try a direct connection: <br />
    Control Panel > Java > General tab > "Network Settings...": "Direct Connection" (enable)

Maybe you are looking for