Replace VBX Control with Java Bean

Hi All,
While compiling 6i forms in 10g I got this error of VBX Control (Obsolete)
The document says replace it with JavaBeans.
I don’t know how to replace a VBS Control with Java Bean but this is what I did, I selected the item type as Bean Area.
But the item do have a trigger
begin
control_lib.when_tab_changed(:control.tab_ctl)
end
The Package CONTROL_LIB is coded as below.
Will this code work, technically I think yes, but its always better to ask experts before I move this to test...
package body control_lib is
g_tab_id number := 0
procedure when_tab_changed
(p_tab_id number) is
l_err_txt varchar2(255);
begin
if :system.block_status != 'QUERY' then
if not good_quiet_post(l_err_txt) then
raise form_trigger_failure;
end if
end if
if p_tab_id = 0 then
rpt_ln_lib.new_tab;
elsif p_tab_id = 1 then
stat_lib.new_tab;
elsif p_tab_id = 2 then
per_acc_rl_lib.new_tab;
end if
g_tab_id := p_tab_id
exception
when form_trigger_failure then
:control.tab_ctl := g_tab_id
synchronize
end when_tab_changed
Thanks to all.
Habeeb

A Java bean is another technology than VBX control.
If some document says: Replace it with java bean it certainly means to use a similar java bean with a similar functionality.
I do not know a java bean, which runs VBX controls.
So you surely have to look at what yout VBX does an than to look after a proper java bean (or to write an own one).

Similar Messages

  • Replace the wait with java embedding thread.sleep() function

    Hi,
    How to replace the wait with java embedding thread.sleep() function. Can anyone help.
    Thanks.

    drag and drop the java embedding component
    include the following code in it.
    try{ 
    Thread.sleep(60000);
    }catch(Exception e)
    --Prasanna                                                                                                                                                                                                                                                                                                                           

  • Creating a user defined control using java Beans

    Hi,
    I want to create a user defined control which is used to draw a line ...
    same as we using in VB as Line control.In java we will create the component using using Beans . I created a code
    which will draw a line in the run time .For tat i extend the class with JPanel,but i cant use the same program in beans....b'coz it simply draws the jpanel when we drag and drop that control in the form....
    so can u give me some ideas to create a control which is used to draw a line .....i am attaching the same which i did .....
    thank u in advance...
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Line extends JPanel
    BufferedImage image;
    Color color;
    Stroke stroke;
    Point start = new Point();
    Point end = new Point();
    public Line()
    color = Color.blue;
    stroke = new BasicStroke(1f, BasicStroke.CAP_BUTT,
    BasicStroke.JOIN_MITER);
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    if(image == null)
    initImage();
    g.drawImage(image, 0, 0, this);
    // Draw temp line over image.
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(Color.red);
    g2.drawLine(start.x, start.y, end.x, end.y);
    public void setTempPoints(Point p1, Point p2) {
    start = p1;
    end = p2;
    repaint();
    public void draw(Point p1, Point p2)
    Graphics2D g2 = image.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(color);
    g2.setStroke(stroke);
    g2.drawLine(p1.x, p1.y, p2.x, p2.y);
    g2.dispose();
    start = end;
    repaint();
    private void clearImage()
    Graphics g = image.getGraphics();
    g.setColor(getBackground());
    g.fillRect(0, 0, image.getWidth(), image.getHeight());
    g.dispose();
    repaint();
    private void initImage()
    int w = getWidth();
    int h = getHeight();
    image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = image.createGraphics();
    g2.setPaint(getBackground());
    g2.fillRect(0,0,w,h);
    g2.dispose();
    public static void main(String[] args)
    Line wbclient = new Line();
    DrawingListener listener = new DrawingListener(wbclient);
    wbclient.addMouseListener(listener);
    wbclient.addMouseMotionListener(listener);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(wbclient);
    f.setSize(400,400);
    f.setLocation(200,200);
    f.setVisible(true);
    class DrawingListener extends MouseInputAdapter
    Line wbclient;
    Point start;
    Point end;
    final int MIN_DIST = 5;
    public DrawingListener(Line fh)
    this.wbclient = fh;
    public void mousePressed(MouseEvent e)
    start = e.getPoint();
    public void mouseReleased(MouseEvent e)
    end=e.getPoint();
    if(start.distance(end) > MIN_DIST)
    wbclient.draw(start, end);
    public void mouseDragged(MouseEvent e)
    wbclient.setTempPoints(start, e.getPoint());
    }

    Hi Ravi,
    How about something like this:
    IUserMaint user = UMFactory.getUserFactory().newUser("myNewUser");
    user.setFirstName("1st Name");
    user.setLastName("2nd Name");
    user.setEmail("[email protected]");
    user.save();
    user.commit();
    IUserAccount uacc = UMFactory.getUserAccountFactory().newUserAccount("myNewUser", user.getUniqueID());
    uacc.setPassword("initial");
    uacc.setPasswordChangeRequired(false);
    uacc.save();
    uacc.commit();
    Hope this helps.
    Daniel

  • Problem with java beans and jsp on web logic 6.0 sp1

              HI ,
              I am using weblogic6.0 sp1.
              i have problem with jsp and java beans.
              i am using very simple java bean which stores name and email
              from a html form.
              but i am getting following errors:
              Full compiler error(s):
              D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              cannot resolve symbol
              symbol : class userbn
              location: class jsp_servlet._savename2
              userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              ^
              D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              cannot resolve symbol
              symbol : class userbn
              location: class jsp_servlet._savename2
              userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              ^
              D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:94:
              cannot resolve symbol
              symbol : class userbn
              location: class jsp_servlet._savename2
              ud = (userbn) java.beans.Beans.instantiate(getClass().getClassLoader(),
              "userbn"); //[ /SaveName2.jsp; Line: 7]
              ^
              3 errors
              in which directory should i place java bean source file(.java file)
              here is my jsp file:
              <%@ page language = "java" contentType = "text/html" %>
              <html>
              <head>
              <title>bean2</title>
              </head>
              <body>
              <jsp:usebean id = "ud" class = "userbn" >
              <jsp:setProperty name = "ud" property = "*" />
              </jsp:usebean>
              <ul>
              <li> name: <jsp:getProperty name = "ud" property = "name" />
              <li> email : <jsp:getProperty name = "ud" property = "email" />
              </ul>
              </body>
              <html>
              here is my bean :
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              import java.io.*;
              public class userbn implements Serializable
                   private String name ;
                   private String email;
                   public void setName(String n)
                        name = n;
                   public void setEmail(String e)
                        email = e;
                   public String getName()
                        return name;
                   public String getEmail()
                        return email;
                   public userbn(){}
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              pls help me.
              Thanks
              sravana.
              

              You realy can do it like Xiang says, but the better way is to use packages. That's
              the way BEA is designed for. If you use packages you can but your bean classes
              in every subfolder beneath Classes. Here for example we have the subfolders test
              and beans:
              You have to declare the package on top of your Bean Source Code:
              package test.beans;
              In your JSP you don't need the import code of Xiang. You only have to refer the
              path of your bean class:
              <jsp:useBean id="testBean" scope="session" class="test.beans.TestBean" />
              There are some other AppServers that only can deploy Java Beans in packages. So
              if you use packages you are always on the right side.
              ciao bernd
              "sravana" <[email protected]> wrote:
              >
              >Thank you very much Xiang Rao, It worked fine.
              >Thanks again
              >sravana.
              >
              >"Xiang Rao" <[email protected]> wrote:
              >>
              >><%@ page import="userbn" language = "java" contentType = "text/html"
              >>%> should
              >>work for you.
              >>
              >>
              >>"sravana" <[email protected]> wrote:
              >>>
              >>>HI ,
              >>>
              >>>I am using weblogic6.0 sp1.
              >>>
              >>>i have problem with jsp and java beans.
              >>>
              >>>i am using very simple java bean which stores name and email
              >>>
              >>>from a html form.
              >>>
              >>>but i am getting following errors:
              >>>
              >>>________________________________________________________________
              >>>
              >>>Full compiler error(s):
              >>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              >>>cannot resolve symbol
              >>>symbol : class userbn
              >>>location: class jsp_servlet._savename2
              >>> userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              >>> ^
              >>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
              >>>cannot resolve symbol
              >>>symbol : class userbn
              >>>location: class jsp_servlet._savename2
              >>> userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
              >>> ^
              >>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:94:
              >>>cannot resolve symbol
              >>>symbol : class userbn
              >>>location: class jsp_servlet._savename2
              >>> ud = (userbn) java.beans.Beans.instantiate(getClass().getClassLoader(),
              >>>"userbn"); //[ /SaveName2.jsp; Line: 7]
              >>> ^
              >>>3 errors
              >>>
              >>>____________________________________________________________
              >>>
              >>>in which directory should i place java bean source file(.java file)
              >>>
              >>>here is my jsp file:
              >>>--------------------------------------------------------
              >>>
              >>><%@ page language = "java" contentType = "text/html" %>
              >>><html>
              >>><head>
              >>><title>bean2</title>
              >>></head>
              >>><body>
              >>><jsp:usebean id = "ud" class = "userbn" >
              >>><jsp:setProperty name = "ud" property = "*" />
              >>></jsp:usebean>
              >>><ul>
              >>><li> name: <jsp:getProperty name = "ud" property = "name" />
              >>><li> email : <jsp:getProperty name = "ud" property = "email" />
              >>></ul>
              >>></body>
              >>><html>
              >>>
              >>>-------------------------------------------------------------
              >>>
              >>>here is my bean :
              >>>
              >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              >>>
              >>>import java.io.*;
              >>>
              >>>public class userbn implements Serializable
              >>>{
              >>>
              >>>     private String name ;
              >>>
              >>>     private String email;
              >>>
              >>>     public void setName(String n)
              >>>     {
              >>>
              >>>          name = n;
              >>>     }
              >>>
              >>>     public void setEmail(String e)
              >>>     {
              >>>
              >>>          email = e;
              >>>     }
              >>>
              >>>     public String getName()
              >>>     {
              >>>
              >>>          return name;
              >>>     }
              >>>
              >>>     public String getEmail()
              >>>     {
              >>>
              >>>          return email;
              >>>     }
              >>>
              >>>     public userbn(){}
              >>>}
              >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              >>>
              >>>pls help me.
              >>>Thanks
              >>>sravana.
              >>>
              >>
              >
              

  • Crystal report generation with Java Bean AS  Data source on RAD

    <p>Hi,</p><p>&#160;</p><p>          Our company wants report generation in IBM RAD 7.0  using crystal reports with a Java Bean as data source. i HAVEN&#39;T FOUND ANY ARTICLES TO WORK ON RAD. Any inputs appreciated..</p><p>&#160;</p><p>Thanks,</p><p>Manju</p>

    Look for Java POJO in the doc, i'm using RAD 7.0 and it's working like RAD 6.0

  • Problems with Java-Beans-Connectivity

    Post Author: dweise
    CA Forum: JAVA
    I'm new in crystal reports and try to connect a sample bean class to the java beans conectivity. Problem is that i only get JavaServerType=JavaBeans|JavaBeanName= for selection. Can anyone tell me what the problem is with my configuration. I followed the steps of the POJOTutorial.doc and the Configuration-Infos of the java_beans_connectivity.My System is w2k professional and for Crystal Reports i use the developer installation with Product Version 11.5.0.313 Thanks by now

    Post Author: pabhijit
    CA Forum: JAVA
    Could you send me the detailed steps and what point you are stucked.? I recently did something simillar and may be I would be able to help.

  • Customize out-of-box taskflow with java bean.

    Hi,
    I have created a Taskflow Customization Appl. for changing out-of-the-box Profile (.jsff) pages. I create a Java bean under ‘ViewController’ project. I’ve tried to register the bean in either adfc-config.xml or faces-config.xml file. However, using EL in jsff pages to access the bean’s attribute give me errors. I referenced the bean's attribute by #{EmployeeBean.department} in .jsff file.
    Where should I register the bean? What’s the difference between two config files?
    <Jan 24, 2012 3:16:22 PM EST> <Warning> <oracle.adf.view.rich.component.fragment.UIXRegion> <ADF_FACES-00009> <Error processing viewId: /edit-basic/view1 URI: /oracle/webcenter/peopleconnections/profile/view/jsf/regions/ootbedit/editbasic.jsff actual-URI: /oracle/webcenter/peopleconnections/profile/view/jsf/regions/ootbedit/editbasic.jsff.
    javax.el.PropertyNotFoundException: Target Unreachable, identifier ‘EmployeeBean' resolved to null
    at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
    at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:486)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.cacheReadOnly(EditableValueRenderer.java:416)
    adfc-config.xml:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <managed-bean id="__3">
    <managed-bean-name id="__1">EmployeeBean</managed-bean-name>
    <managed-bean-class id="__4">WCTaskflowCustomization.model</managed-bean-class>
    <managed-bean-scope id="__2">request</managed-bean-scope>
    </managed-bean>
    </adfc-config>
    faces-config.xml:
    <?xml version="1.0" encoding="windows-1252"?>
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
    <application>
    <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
    </application>
    <referenced-bean>
    <referenced-bean-name></referenced-bean-name>
    <referenced-bean-class></referenced-bean-class>
    </referenced-bean>
    <managed-bean>
    <managed-bean-name>EmployeeBean</managed-bean-name>
    <managed-bean-class>xxx.yyy.customization.view.Employee</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    </faces-config>
    Employee.java
    =========
    package xxx.yyy.customization.view;
    public class Employee {
    public Employee() {
    super();
    private String userName;
    private String department;
    public void setUserName(String userName) {
    this.userName = userName;
    public String getUserName() {
    return userName;
    public void setDepartment(String department) {
    this.department = department;
    System.out.println("setDepartment():" + department);
    public String getDepartment() {
    System.out.println("getDepartment():" + department);
    return "Informaton Technology";
    Thanks a lot.

    Hi,
    if you want to access the bean from within a bounded task flow then you configure it in the task flow definition. If the El accesses the bean from the unbounded task flow then you configure it in adfc-config.xml. When working with the ADF controller you don't use the faces-config.xml file for defining managed beans
    Frank

  • Is it possible to create crystal reports on IBM RAD with Java Bean as Data Source

    <p>Hi,</p><p>&#160;</p><p>          Our company wants report generation in IBM RAD 7.0  using crystal reports with a Java Bean as data source. i HAVEN&#39;T FOUND ANY ARTICLES TO WORK ON RAD. Any inputs appreciated..</p><p>&#160;</p><p>Thanks,</p><p>Manju</p>

    Look for Java POJO in the doc, i'm using RAD 7.0 and it's working like RAD 6.0

  • Help with java beans on initialisation

    hi
    I'm trying to use java beans for the first time
    I'm calling a bean from a JSP page; the bean will not exist when the page is first called
    <jsp:useBean id="user" scope="session" class="business.User" />I want to use properties/private attributes of the user bean to make a form "sticky" on the page, so that once the user has entered something, their input is there the next time they visit the page (eg back or via an href)
    The problem is that the bean creates a user on the first call with properties that are null, which means that "null" is displayed on my form when it first appears
    <td><input type="text" name="firstName" value="<jsp:getProperty name ='user' property='firstName' />"></td>I can code this out using a scriptlet but this defeats the beauty of java beans and jsp tags. How do I translate a null property so that nothing is displayed on the form?
    Thanks for your help

    So.. my mini-designer should be something like an editor,with a pallette with beans(like JavaBeans) and when a user is dragging a bean into a form,my applicaton should generate the code fr that bean....something like that :)

  • Need help with Java Beans and PDA

    How can I get Java Bean applets to work on a PDA, with either Palm or Pocket PC?

    first hit on google
    thankyou for using the georgemc google proxy

  • HOW TO use OCX controls with Java application

    hi
    Is it possible to use microsoft Ocx controls in java applications.

    Anything is possible. You might want to ask if it's a good idea, but look at some of the people who have asked before. It looks like there are products out there to help.
    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3Aocx&col=javaforums&x=19&y=13

  • I can't work with java Beans in IWS6

    I have been trying to get my iWS6 to run java bean but has not been able to do so. I tried a few beans and I get the same message on the log:
    [27/May/2002:18:30:50] info ( 3160): JSP: JSP1x compiler threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP/local/iplanet/https-hdesk-1/config/../ClassCache/_jsps/_otro_jsp.java:60: Class _jsps.UserData not found.
    UserData user = null;
    ^
    /local/iplanet/https-hdesk-1/config/../ClassCache/_jsps/_otro_jsp.java:63: Class _jsps.UserData not found.
    user= (UserData)
    ^
    /local/iplanet/https-hdesk-1/config/../ClassCache/_jsps/_otro_jsp.java:68: Class _jsps.UserData not found.
    user = (UserData) Beans.instantiate(this.getClass().getClassLoader(), "UserData");
    ^
    3 errors
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
    at com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.java:252)
    at com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.java:173)
    at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:416)
    [27/May/2002:18:30:50] warning ( 3160): Internal error: Failed to get GenericServlet. (uri=/otro.jsp,SCRIPT_NAME=/otro.jsp)
    I read a similar answer in this Forum but I couldn't find good results.
    I'm using Solaris SPARC and JDK 1.3. When I run the Web server I Find these messages:
    Java VM classpath: /local/iplanet/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar:/local/iplanet/docs:/local/iplanet/bin/https/jar/NSServletLayer.jar:/local/iplanet/bin/https/jar/NSJavaUtil.jar:/local/iplanet/bin/https/jar/NSJavaMiscUtil.jar:/local/iplanet/bin/https/jar/servlet.jar:/local/iplanet/bin/https/jar/servlet-2.3-filters-api.jar:/local/iplanet/bin/https/jar/jsp092.jar:/local/iplanet/bin/https/jar/jaxp.jar:/local/iplanet/bin/https/jar/crimson.jar:/local/iplanet/bin/https/jar/xalan.jar:/local/iplanet/bin/https/jar/jspengine.jar:
    [27/May/2002:18:29:21] info ( 3160): Loading IWSSessionManager by default.
    [27/May/2002:18:29:21] info ( 3160): IWSSessionManager: Maximum number of sessions is 1000
    [27/May/2002:18:29:23] info ( 3160): Successfully initialized web application environment (web-apps.xml) for virtual server (https-hdesk-1)
    [27/May/2002:18:29:23] warning ( 3160): The server configuration may require more file descriptors than the operating system provides. If you encounter PR_PROC_DESC_TABLE_FULL_ERROR errors, you may wish to increase the operating system hard file descriptor limit from 1024 to 5763 (see your operating system documentation) or decrease one or more of the following settings: MaxFiles in nsfc.conf and ConnQueueSize, RqThrottle, and MaxKeepAliveConnections in magnus.conf.
    [27/May/2002:18:30:46] info ( 3160): Internal Info: loading servlet /otro.jsp
    I've run many jsp files without problem, but when I use java Beans it doesn't work.
    Thank you
    P.D. The Classpath already contains the Java Bean file.

    Hola Daniel,
    Make this simple thing, import the class in your jsp, for example, in your case this should be:
    <%@ page import="UserData" %>
    The jasper compiler assumes that any unqualified class is part of the package jsps. I think this is to allow class definitions in the jsps. So if you indicate that the class is not packaged in jsps it will be found.
    Juan

  • JSP tags with java beans !! Design Help needed ..

    Hi,
    I have three tables State,District,College.
    My requirement is to get the fields from three tables one time from the DB and populate them with the JSP(so that the DB connections will not be much).
    For that :::
    I have designed to have three Beans StateBean,DistrictBean and CollegeBean.
    Every row in State table will be a StateBean and will be added to an ArrayList called StateBeanList
    similarly I got two other lists DistrictBeanList and CollegeBeanList.
    And I am using application.setAttribute() to send all the information to the JSP by using RequestDespatcher..
    When I run the servlet on tomcat it is getting OutOfMemory Exception in java Heap..Can I increase the heap size on tomcat ?
    Apart from increasing the heap size I want to know good design...
    My actual requirement is::: in the forwared JSP I need to populate state text field and after selecting state field I need to get the district fileds populated in other text filed, by the value of district field I need to populate college field... we can see it many websites...
    Please suggest me the good design..
    Thanks in Advance,
    Vidhya...

    vidhya517 wrote:
    I have three tables State,District,College.
    My requirement is to get the fields from three tables one time from the DB and populate them with the JSP(so that the DB connections will not be much).
    For that :::
    I have designed to have three Beans StateBean,DistrictBean and CollegeBean.
    Every row in State table will be a StateBean and will be added to an ArrayList called StateBeanList
    similarly I got two other lists DistrictBeanList and CollegeBeanList.I would rather let StateBean have a Set<DistrictBean> property and let DistrictBean have a Set<CollegeBean> property. List instead of Set is also okay.
    And I am using application.setAttribute() to send all the information to the JSP by using RequestDespatcher..
    When I run the servlet on tomcat it is getting OutOfMemory Exception in java Heap..Can I increase the heap size on tomcat ?
    Apart from increasing the heap size I want to know good design...How many states, districts and colleges do you have in total? What is your initial heap size? You can just alter it as startup parameters/arguments.
    My actual requirement is::: in the forwared JSP I need to populate state text field and after selecting state field I need to get the district fileds populated in other text filed, by the value of district field I need to populate college field... we can see it many websites...
    Please suggest me the good design..

  • System control with java, and networking in jave

    Hi, just a couple of questions.
    Ill start witht the networking query. Ive been making a basic network chat program using sockets. The text is transfered through the sockets as strings read in from text field on the interface
    eg
    kkSocket = new Socket("xxx.xxx.xxx.xxx", 80);
    out = new PrintWriter(kkSocket.getOutputStream(), true);
    in = new BufferedReader(new InputStreamReader(kkSocket.getInputStream()));
    String fromUser = (ba.text());
    out.println(fromUser);
    All this works fine, i want to impliment file transfer into the app, but im clueless how to transfer anything other than a basic string over a socket, let alone send it to a specific location on the client computer. Any help / advice would be well recieved.
    Also, as i have basic code, that can connect computers, and send messages between them, i was wondering how i control some of the system functions, like executing files, opening / closing cd tray etc through java. As with this, i could create a mini remote control application.
    Again, any help on this (or even a pointer to relavent things in the java api) would be fantastic as the more i can understand the more inventive i can be when coding
    Cheerz

    You seem to manage well even though you're posting to New To Java Technology, I've seen far worse questions in ALT even...
    All this works fine, i want to impliment file transfer into the app, but im clueless how to transfer anything other than a basic string over a socket, let alone send it to a specific location on the client computer.To send files/binary data, you would use a BufferedInputStream (remember Streams are for binary data, Readers/Writers are for text) in a similar way you're using PrintWriter and BufferedReader now.
    It could go a bit like this (invent your own protocol):
    User1 sends a String that says: FILE C:\directory\file
    User2 receives the String and prepares to save a file to the specified directory.
    User1 sends the binary data to User2.
    User2 reads the binary data and writes it in the file.
    Controlling system functions in Java can be tricky, so you might not get all the functionality in your program that you want. Running programs can be done through System.exec(), but the CD tray might be impossible even.

  • Convert an excel (*.xls) file to a xml file with Java Beans

    Hi to all............
    I am new to this ,
    I have a requirement that
    i want to read excel (*.xls ) file which is having some data going to be persist in database. Before going to persist process i want to read that data from xls file and convert those data into xml file.
    Can any one help me how can i do this using java classes?
    Please guide me what are the necessary libraries and requirements to do this?
    If any one have an idea then help me with some example code
    Thanks in advance for your great replay
    Sathish A

    this is the full stack trace i am getting jboss server console
    09:57:17,922 ERROR [application] org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
    javax.faces.el.EvaluationException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:324)
         at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:299)
         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:256)
         at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:469)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
         at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:86)
         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
         at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
         at java.lang.Thread.run(Thread.java:636)
    Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
         at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown Source)
         at org.domain.DigesterDemo.session.ViewList.generateXML(ViewList.java:275)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:616)
         at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
         at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:52)
         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
         at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
         at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
         at org.domain.DigesterDemo.session.ViewList_$$_javassist_2.generateXML(ViewList_$$_javassist_2.java)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:616)
         at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
         at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
         at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
         at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
         at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
         at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
         ... 51 more
    Thanks for your replay

Maybe you are looking for

  • WRT150N - No Internet Connection Found

     Well, that's one of the problems. So, here's the deal. When I connect all my wires up properly (modem to router; router to computer; etc.) and try to install the software, it says that an Internet connection can't be found when I clearly have one. I

  • Will FCP Studio CrossGrade work on my non-Intel Macs?

    Hello, I am having to get the Final Cut Studio Universal Crossgrade for my new Mac Pro 2GHz Intel machine. Will the Crossgrade work on my other machines WITHOUT the new Intel chips (Power Mac G4 733MHz & G4 Powerbook 1.25 Ghz). Thanks, PM

  • Can't Import MPEG-2

    DVDSP doesn't offer an MPEG-2 option in Using QuickTime Conversion. I tried to use Compressor to obtain a 2-pass MPEG-2 encode for a 40 minute show. DVDSP crashes upon every attempt to import. Can anyone help me?

  • All Applications Crash

    Hi, maybe someone here can help me out. Let me first explain the situation. A couple weeks ago, my hard drive failed. Thankfully, I had everything still intact via Carbon Copy Cloner with a bootable backup on my external hard drive. CCC created this

  • User exit  for delivery

    Hi Experts, Whenever  delivery is  blocked, i want  to write reson for  blocking and store in a custom table. please explain  how  should  i do this. Thanks,