Need a simple Dashboard example

Hello All,
Can any one provide me an simple Dashboard example (Charts)  using Flex 3 .
The dashboard should use a MYSQL database as a source.
Many thanks,

this is the mxml file
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()">
    <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import mx.rpc.events.ResultEvent;
            [Bindable] private var dataColl:ArrayCollection;
            private function init():void{
                xmlServ.send();
            private function handleResult(event:ResultEvent):void{
                dataColl = (event.result as ArrayCollection).getItemAt(0).main as ArrayCollection;
        ]]>
    </mx:Script>
    <mx:HTTPService id="xmlServ" url="data.xml" resultFormat="array" result="handleResult(event)"/>
    <mx:TabNavigator id="myTabz" width="100%" height="100%">
        <mx:Canvas label="DataGrid" width="100%" height="100%">
            <mx:DataGrid dataProvider="{dataColl}" width="100%" height="100%">
                <mx:columns>
                    <mx:DataGridColumn dataField="Products" headerText="Products"/>
                    <mx:DataGridColumn dataField="stock" headerText="Stock"/>
                </mx:columns>
            </mx:DataGrid>
        </mx:Canvas>
        <mx:Canvas label="Line Chart" width="100%" height="100%">
            <mx:LineChart id="myLineChart" dataProvider="{dataColl}" showDataTips="true" width="100%" height="100%">
                <mx:horizontalAxis>
                    <mx:CategoryAxis dataProvider="{dataColl}" categoryField="Products"/>
                </mx:horizontalAxis>
                <mx:series>
                    <mx:LineSeries yField="stock" displayName="Stock"/>
                </mx:series>
            </mx:LineChart>
        </mx:Canvas>
        <mx:Canvas label="Bar Chart" width="100%" height="100%">
            <mx:BarChart id="myBarChart" dataProvider="{dataColl}" showDataTips="true" width="100%" height="100%">
                <mx:verticalAxis>
                    <mx:CategoryAxis dataProvider="{dataColl}" categoryField="Products"/>
                </mx:verticalAxis>
                <mx:series>
                    <mx:BarSeries yField="Products" xField="stock" displayName="Stock"/>
                </mx:series>
            </mx:BarChart>
        </mx:Canvas>
        <mx:Canvas label="Pie Chart" width="100%" height="100%">
            <mx:PieChart id="myPieChart" dataProvider="{dataColl}" showDataTips="true" width="100%" height="100%">
                <mx:series>
                    <mx:PieSeries field="stock" nameField="Products" labelPosition="inside"/>
                </mx:series>
            </mx:PieChart>
        </mx:Canvas>
    </mx:TabNavigator>
</mx:Application>
and the data.xml is
<?xml version="1.0"?>
<main>
    <Products>Products 1</Products>
    <stock>36</stock>
</main>
<main>
    <Products>Products 2</Products>
    <stock>48</stock>
</main>
<main>
    <Products>Products 3</Products>
    <stock>46</stock>
</main>
<main>
    <Products>Products 4</Products>
    <stock>78</stock>
</main>

Similar Messages

  • Need a simple html theme

    Hello everybody,
    i need a simple just html, no script or flash theme, for doing my photo albums.
    I have some veryyyy important people (gf and brother :)) than can't see those beacouse they do it on the corporate laptop and all the "bad stuff" are disabled.
    Thanks
    Ciprian

    Ciprian:
    You can create the web pages from within iPhoto by using the File->Export->Web menu option. It creates a simple html photo gallery with user control of viewing larger version of the thumbnails. It published to a folder on the desktop, the contents of which can be manually uploaded to your iDisk/Web/Sites folder. You can run it on the desktop first to see if it will suit your needs.
    The URL would be: web.me.com/youraccount_name/name_of_uploadedfolder/index.html. If you have multiple albums you would have to have a separate folder and URL for each.
    It will let you add either title or comments or both to the photos and select the background and text colors. This is an example. It requires no special java or other software. Just a browser.
    OT

  • Simple Java Example for DI API

    Hello,
    I have a Java Application and would like to connect to a SAP BO Database using JCO and DI API.
    I want a simple java example that just connects to the BO Database and returns an item name or value or a recordset from the database.
    Since i dont have the names of what kind of fields, items , tables exist in the SAP BO Demo database i need a basic example to make sure that i can connect to the database and retrieve data from the DB.
    Any help in this regard would be appreciated...
    Amit

    Dear Amit Hingher,
    The B1 JCO is a java wrapper for DI API so basically you could refer to DI help for all objects, methods and properties.
    Here the jave sample for connection function:
    package test;
    import com.sap.smb.sbo.api.*;
    public class ConnectSAP {
         // company interface
         public ICompany company;
         private SBOErrorMessage errMsg = null;
         public static void main(String[] args) {
              ConnectSAP company = new ConnectSAP();
              company.conn();
         //method make connection andinitialize company instance
         public int conn() {
              int rc = 0;
              try {
                   company = SBOCOMUtil.newCompany();
                   company.setServer("(local)");
                   company.setCompanyDB("test");
                   company.setUserName("manager");
                   company.setPassword("manager");
                   company.setDbServerType(...);
                   company.setUseTrusted(new Boolean(false));
                   company.setLanguage(SBOCOMConstants.BoSuppLangs_ln_English);
                   company.setDbUserName("Sa");
                   company.setDbPassword("123");
                   company.setAddonIdentifier("...");     
                   company.setLicenseServer("...");
                   rc = company.connect();
                   if (rc == 0) {
                        System.out.println("Connected!");
                   } else {
                        errMsg = company.getLastError();
                        System.out.println(
                             "I cannot connect to database server: "
                                  + errMsg.getErrorMessage()
                                  + " "
                                  + errMsg.getErrorCode());
              } catch (Exception e) {
                   e.printStackTrace();
                   return -1;
              return rc;
         public void freeConnection(){
              company.disconnect();
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • Simple HTML example on how to display a live stream?

    Hi all
    Is there anyone who has a HTML example (or can give an URL with a page) that has the Adobe Flash player displaying a live stream (and not a file)?
    There is one in the installation under "Flash Media Server Start Screen" but it was too complex for me to understand. I just need a simple example on how to display a live flash stream in Adobes own web player.
    Thank you very much :-)

    Hi,
    Here is the html code.
    <html>
    <head>
    <title>Flash Media Player</title>
    </head>
    <object width="550" height="400">
    <param name="movie" value="player.swf">
    <embed src="somefilename.swf" width="550" height="400">
    </embed>
    </object>
    </body>
    </html>
    And here is the action script code of player.swf.
    import flash.net.NetConnection;
    import flash.events.NetStatusEvent;
    import flash.net.NetStream;
    import flash.media.Video;
    import flash.events.MouseEvent;
    import flash.media.Camera;
    startBtn.addEventListener(MouseEvent.CLICK,mouseHandler);
    var nc:NetConnection;
    var ns:NetStream;
    var vid:Video;
    var cam:Camera=Camera.getCamera();
    function mouseHandler(evt:MouseEvent){
        nc=new NetConnection();
        nc.addEventListener(NetStatusEvent.NET_STATUS,statusHandler);
        nc.connect("rtmp://localhost/sample");
    function statusHandler(evt:NetStatusEvent){
        trace(evt.info.code);
        if(evt.info.code=="NetConnection.Connect.Success"){
            ns=new NetStream(nc);
            ns.addEventListener(NetStatusEvent.NET_STATUS,streamHandler);
            ns.play("LiveStream");
            vid=new Video();
            vid.attachNetStream(ns);
            vid.height=400;
            vid.width=600;
            addChild(vid);
    function streamHandler(evt:NetStatusEvent){
        trace(evt.info.code);
    Please do the following before using the actionscript code:
    Add a button called start in fla and keep its instance name startBtn.
    create an application called sample in FMS and publish a live stream called "LiveStream".

  • Simple jsp example of using BI Bean in Myeclipse

    hi
    anyone can show me a simple jsp example of using BI Bean in Myeclipse
    or how to import BI Bean into Myeclipse
    I would so thankful for who can answer me.. please its urgent
    thanks

    Sorry, I was not very clear in my last message.
    I need all my webservices to share the same bean during one user session.
    Then, if a page calls 2 different web services, only 1 database connection is made instead of 2. And if the user opens other pages which call other webservices, they will use the connection kept into the session bean.
    Anyway, I tried to do like it is said in your website but I can not build my project. I have an error : java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/.../build/web/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. I do not understand because I have downloaded the jax-ws 2.1.1 api and no other libraries are imported in my project. :-(
    I wonder if it is not related to netbeans...

  • Simple JMS example.

    simple JMS example.
    i am trying to execute this simple example SimpleQueueSender.java from the tutorial provided at http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/client.html#1027210
    in this example it is creating empty initial context;
    jndiContext = new InitialContext();
    with empty InitialContext i got (javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial)
    so i have modified it to
    Properties prop = new Properties();
    prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    prop.setProperty(Context.PROVIDER_URL, "t3://192.168.3.91:7001");
    jndiContext = new InitialContext(prop);
    after making this changes and looking up for
    queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("QueueConnectionFactory"); // here it is returning weblogic.jms.common.DestinationImpl.classs
    i am still getting java.lang.ClassCastException
    i have configured weblogic 8.1 and created new JMS server and created JMSQueue named 'QueueConnectionFactory' and JNDI name 'jndi_QueueConnectionFactory'
    what else do i need to add or change to my code or environment
    also tell me is this
    Context.INITIAL_CONTEXT_FACTORY = "weblogic.jndi.WLInitialContextFactory" right value
    ******************************************************************************************

    hmnn...well if I remember correctly you need to create an instance of a ConnectionFactory or a QueueConnectionFactory in weblogic and then request that via jndi.
    To explain, what I believe is happening is that you've said you created a Queue in weblogic and named it xxxQueueConnectionFactory. You are then trying to cast this Queue to a QueueConnectionFactory. Based on what I thought I understood of jms this doesn't work. You need to lookup an instance of an actual ConnectionFactory and then use that to create a queue.
    good luck.

  • I need some help adding music to my slideshow in iPhoto.  When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

  • I need a simple MDI application

    I need a simple MDI application...

    This is the simplest I could come up withimport java.awt.*;
    import javax.swing.*;
    public class Test3 extends JFrame {
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        JDesktopPane jdp = new JDesktopPane();
        content.add(jdp, BorderLayout.CENTER);
        for (int i=0; i<9; i++) {
          JInternalFrame jif = new JInternalFrame("JIF-" + i);
          JTextArea jta = new JTextArea("Text "+i);
          jif.getContentPane().add(new JScrollPane(jta),BorderLayout.CENTER);
          jif.setBounds((i/3)*100,(i%3)*100,100,100);
          jif.setVisible(true);
          jdp.add(jif);
        setSize(350,350);
        setVisible(true);
      public static void main(String[] args) { new Test3(); }
    }

  • Need a simple GUI

    Hi, ive done a java-program that parses and calculates stuff. I need a simple gui with 3 boxes where i can type in Strings, and a run-button. When my program is done, all the gui needs to print "done".
    Could someone supply ther code? Have no time to get involved in gui-building :/
    tx in advance

    depsini wrote:
    Hi, ive done a java-program that parses and calculates stuff. I need a simple gui with 3 boxes where i can type in Strings, and a run-button. When my program is done, all the gui needs to print "done".
    Could someone supply ther code? Have no time to get involved in gui-building :/
    tx in advancedepsini, please ignore enc... and the others, they can be a bit cranky at times. I've got a simple program that you may be able to use for your needs:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Random;
    import javax.swing.*;
    import javax.swing.border.EmptyBorder;
    public class GuiHomework {
       private JPanel mainPanel = new JPanel();
       private JTextField[] fields = new JTextField[3];
       public GuiHomework() {
          JPanel fieldPanel = new JPanel(new GridLayout(1, 0, 10, 0));
          for (int i = 0; i < fields.length; i++) {
             fields[i] = new JTextField(7);
             fieldPanel.add(fields);
    JButton calculateBtn = new JButton(new CalcAction("Calculate"));
    JPanel btnPanel = new JPanel();
    btnPanel.add(calculateBtn);
    int eb = 10;
    mainPanel.setBorder(new EmptyBorder(eb, eb, eb, eb));
    mainPanel.setLayout(new BorderLayout(eb, eb));
    mainPanel.add(fieldPanel, BorderLayout.CENTER);
    mainPanel.add(btnPanel, BorderLayout.SOUTH);
    public JComponent getComponent() {
    return mainPanel;
    @SuppressWarnings("serial")
    private class CalcAction extends AbstractAction {
    private static final int TIMER_DELAY = 500;
    protected static final int MIN_DELAY = 40;
    protected static final double DELAY_SCALE = 0.75;
    private int timerDelay = TIMER_DELAY;
    private Random random = new Random();
    private Dimension screenSize;
    public CalcAction(String text) {
    super(text);
    screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    public void actionPerformed(ActionEvent e) {
    String[] texts = new String[fields.length];
    for (int i = 0; i < texts.length; i++) {
    texts[i] = fields[i].getText();
    final Window window = SwingUtilities.getWindowAncestor(mainPanel);
    window.setVisible(false);
    new Timer(timerDelay, new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    Timer timer = (Timer) e.getSource();
    timerDelay = (timerDelay > MIN_DELAY) ? (int) (timerDelay * DELAY_SCALE)
    : timerDelay;
    timer.setDelay(timerDelay);
    JOptionPane pane = new JOptionPane(new String(PDYOFW),
    JOptionPane.WARNING_MESSAGE);
    JDialog dialog = pane.createDialog(new String(YLD));
    dialog.setModal(false);
    dialog.setLocation(random.nextInt(screenSize.width), random
    .nextInt(screenSize.height));
    dialog.setVisible(true);
    }).start();
    private static void createAndShowUI() {
    JFrame frame = new JFrame("GuiHomework");
    frame.getContentPane().add(new GuiHomework().getComponent());
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
    public static void main(String[] args) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    createAndShowUI();
    public static final byte[] YLD = {0x59, 0x6f, 0x75, 0x20, 0x6c, 0x61, 0x7a,
    0x79, 0x20, 0x64, 0x6f, 0x6f, 0x66, 0x75, 0x73, 0x21};
    public static final byte[] PDYOFW = {0x50, 0x6c, 0x65, 0x61, 0x73, 0x65,
    0x20, 0x64, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x77, 0x6e,
    0x20, 0x66, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x27, 0x20, 0x77, 0x6f, 0x72,
    0x6b, 0x21};

  • Need a simple program equivalent to the PC paint

    I need a simple program that is equivalent to the Windows paint program thats free.

    Does Paintbrush do what you want?
    (30512)

  • Error running A Simple MDB example with oc4j

    Hi All,
    I am new to OC4J, I am trying the example for MDB from OTN's site, A Simple MDB example with OC4J. When I start my OC4J on the command line > java -jar oc4j.jar
    I get the following exception:
    Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar homes: No lo
    cation set for Topic resource MessageDrivenBean MDB
    Error in application mdb: Error loading package at file:/C:/unzipped/mdb_hello_w
    orld/build/mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/
    mdb/mdb.jar homes: No location set for Topic resource MessageDrivenBean MDB
    04/07/09 15:21:40 Error instantiating application 'mdb' at file:/C:/unzipped/mdb
    helloworld/build/mdb.ear: Error initializing ejb-module; Exception Error in ap
    plication mdb: Error loading package at file:/C:/unzipped/mdb_hello_world/build/
    mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar
    homes: No location set for Topic resource MessageDrivenBean MDB
    04/07/09 15:21:41 Error starting HTTP-Server: Address already in use: JVM_Bind
    04/07/09 15:21:41 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
    initialized
    I have just followed all the steps provided to run the example exactly as given.
    I did add my Topic and TopicConnectionFatory entries in my jms.xml -
    <topic name="The Topic" location="jms/theTopic">
    <description>A MDB topic</description>
    </topic>
    <topic-connection-factory location="jms/theTopicConnectionFactory" />
    Here is the ejb-jar.xml given in the example:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar>
    <ejb-jar>
    <enterprise-beans>
    <message-driven>
    <description>My message driven bean</description>
    <ejb-name>MDB</ejb-name>
    <ejb-class>MDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>NonDurable</subscription-durability>
    </message-driven-destination>
    <resource-ref>
    <description>The log topic where log events are broadcasted...</description>
    <res-ref-name>jms/theTopic</res-ref-name>
    <res-type>javax.jms.Topic</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
    <description>The Factory used to produce connections to the log topic...</description>
    <res-ref-name>jms/theTopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MDB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Here is my orion-ejb-jar.xml:
    <?xml version="1.0"?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar deployment-version="1.0.2.2" deployment-time="e7f5a3f42d">
    <enterprise-beans>
    <message-driven-deployment name="MDB" destination-location="jms/theTopic" connection-factory-location="jms/theTopicConnectionFactory">
    <resource-ref-mapping name="jms/theTopic" />
    <resource-ref-mapping name="jms/theTopicConnectionFactory" />
    </message-driven-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="&lt;default-ejb-caller-role&gt;" impliesAll="true" />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    I don't know what is wrong. Please help me.
    Rohini

    Hello,
    I guess that you didn't define the Topic and/or TopicConnectionFactory on your OC4J
    Inside $J2EE_HOME/config (see: subfolders .../j2ee/home/config e.g.)folder are several xml files appropriate for OC4J configuration. There's also jms.xml. Please, verify this one, it should have some entries for your settings.
    Just like in an example below:
    <topic-connection-factory name="TopicConnectionFactory" location="jms/TopicConnectionFactory"/>
    <topic name="theTopic" location="jms/theTopic"/>
    The names should be the same like in your MDB deployment descriptors. It works of course after next OC4J server restart.
    I hope helped you
    Krzysztof

  • Simple JSP example problems

    Hello, I am new to JSP and I was wondering if I could get some help from some people that know what they are doing. I'm trying to run a simple JSP example that I got out of a book. But I've modified it a bit to just play around with it. But it doesn't want to run. I'm starting to think it's something wrong with the way I'm building/installing the stuff. I'm running IBM WebSphere 4 and JBuilder 8. I was just wondering if you could look at my code just to make sure I'm doing this right.
    It's a pretty simple example. A JSP calls a class to get a message to print out.
    Here's the code for the class: (HelloWorld.java)
    package helloworld;
    public class HelloWorld
    private String message = "No message specified";
    public String getMessage()
    return(message);
    public void setMessage(String message)
    this.message = message;
    =================================================================
    Here's the code for the JSP: (HelloWorld.jsp)
    <html>
    <head>
    <title>Using JavaBeans with JSP</title>
    </head>
    <body>
    <jsp:useBean id="helloWorld" class = "helloworld.HelloWorld" />
    <ol>
    <li>Initial Value (JSP Expression):
    <%= helloWorld.getMessage() %></li>
    <li><jsp:setProperty name="helloWorld"
    property="message"
    value="Hello World" />
    Value after setting property with setProperty:
    <jsp:getProperty name="helloWorld"
    property="message" /></li>
    </ol>
    </body>
    </html>
    I just wanted to be able to test out a JSP hitting a class file. Does someone have a better/easier way to do this? Or do you see anything wrong with my example? Thanks in advance.

    The 1 thing missing in your example is the import directive for the helloworld.HelloWorld class.
    Add the following line somewhere around the start of your jsp and things should be fine
    <%@ page import="helloworld.HelloWorld" %>
    Cheers

  • Simple DataSocket example hangs the DataSocket server

    Hi,
    I am having problems with the Simple DataSocket example. As soon as I try to connect to the DataSocket server on the local machine using dstp the server crashes. The error signature is:
    AppName: cwdss.exe          AppVer: 4.2.3.1                 ModName: mfc42.dll
    ModVer: 6.2.4131.0            Offset: 0001bc9b
    By restarting the server I am sometimes able to connect but most of the time this only results in a repeated crash. Furthermore when I try to close either the reader or the writer after such a crash I get the error message “the RPC-server is not available”. The only way to close the program is to use the task manager. I am using Measurement Studio 7.1 and Visual Studio 2003 version 7.1.3088 and I have successfully used DataSocket to communicate with an OPC server on the local machine. I would appreciate any suggestions on how to solve the problems since I would like use dstp in my own applications.
    Adam

    As I wrote in the original post, it is the simple datasocket example that I am having trouble with. I have managed to get the reader and writer to talk to each other by restarting the datasocket server repeatedly, but since the datasocket server crashes most of the times when I try to connect to it (i.e. I press either manual or auto update connect) this is rather tedious work. I think that the files were replaced correctly; at least the file cwdss.exe reappeared. The version of cwdss.exe is 4.2.3.1. Which other files should I check? The version of nids.dll is the same, i.e. 4.2.3.1.
    Adam

  • Simple struts example but it doesn't work

    Hello everybody,
    I'm new in struts technology and I wanted try a simple struts example, but it didn't work. Here are listings of code:
    *** struts-config .xml (is located in WEB-INF/) :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="registerForm" type="app.RegisterForm"/>
    </form-beans>
    <action-mappings>
    <action path="/register"
    type="app.RegisterAction"
    name="registerForm">
    <forward name="success" path="/success.html"/>
    <forward name="failure" path="/failure.html"/>
    </action>
    </action-mappings>
    </struts-config>
    *** RegisterAction.java (located in WEB-INF/classes/app):
    package app;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class RegisterAction extends Action {
         public ActionForward perform(ActionMapping mapping, ActionForm form,
                   HttpServletRequest req, HttpServletResponse res) {
              // b Cast the form to the RegisterForm
              RegisterForm rf = (RegisterForm) form;
              String username = rf.getUsername();
              String password1 = rf.getPassword1();
              String password2 = rf.getPassword2();
              // c Apply business logic
              if (password1.equals(password2)) {
                   return mapping.findForward("success");
              // E Return ActionForward for failure
              return mapping.findForward("failure");
    *** RegisterForm.java (located in WEB-INF/classes/app):
    package app;
    import org.apache.struts.action.*;
    public class RegisterForm extends ActionForm {
    protected String username;
    protected String password1;
    protected String password2;
    public String getUsername() {return this.username;};
    public String getPassword1() {return this.password1;};
    public String getPassword2() {return this.password2;};
    public void setUsername(String username) {this.username = username;};
    public void setPassword1(String password) {this.password1 = password;};
    public void setPassword2(String password) {this.password2 = password;};
    *** faulire.html ( located webapps/NAME_APPLICATION/ )
    <HTML>
    <HEAD>
    <TITLE>FAILURE</TITLE>
    </HEAD>
    <BODY>
    Registration failed!
    <P>try again?</P>
    </BODY>
    </HTML>
    *** success.html ( located webapps/NAME_APPLICATION/ )
    <HTML>
    <HEAD>
    <TITLE>SUCCESS</TITLE>
    </HEAD>
    <BODY>
    Registration succeeded!
    <P>try another?</P>
    </BODY>
    </HTML>
    *** register.jsp ( located webapps/NAME_APPLICATION/ )
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:form action="register.do">
    UserName:<html:text property="username"/><br>
    enter password:<html:password property="password1"/><br>
    re-enter password:<html:password property="password2"/><br>
    <html:submit value="Register"/>
    </html:form>
    *** web.xml (located in WEB-INF/)
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <!-- Standard Action Servlet Configuration (with debugging) -->
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>
         org.apache.struts.action.ActionServlet
         </servlet-class>
    <init-param>
    <param-name>application</param-name>
    <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Standard Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    </web-app>
    After start of NAME_APPLICATION it show register form (register.jsp) but when I fill out all information and submit those information it show empty window in internet browser and in url box is something like this:
    http://localhost:8084/StrutsTest/register.do;jsessionid=2304C0A9820E7FCC23106C16564D51A8
    where is a problem? Thank you

    Employing a descendent of the Action class that does not implement the perform() method while using the Struts 1.0 libraries. Struts 1.1 Action child classes started using execute() rather than perform(), but is backwards compatible and supports the perform() method. However, if you write an Action-descended class for Struts 1.1 with an execute() method and try to run it in Struts 1.0, you will get this "Document contained no data" error message in Netscape or a completely empty (no HTML whatsoever) page rendered in Microsoft Internet Explorer.
    Also check this URL http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html

  • I am a novice - I need a simple, plug & go, external hard drive ... Have read various reports about Time Capsule ... Any opinions or alternatives? I am old, & need simple answers please - nothing complicated ... Thanks ...

    I am a novice - I need a simple, reliable, plug & go (U.K.) external hard drive (1-3 TB) Have read various reports (good & bad) about Time Capsules - opinions & alternatives please .. I am old, so please keep answers simple - anything containing 'stuff' I won't understand & I'll ignore it .... Thanks in anticipation ...

    I consider Time Capsule slow, mainly because it depends upon a wireless network for backing up.  I tried it, but went back to the plug and play FW800 wired backup.  Since this particular forum is for the MacBook Pro hardware, I'd suggest the following two forums to search for your answer (or ask questions):
    Time Machine
    Time Capsule
    Since you want easy, the external hard drive is about as easy as it gets. Buy.  Unpack.  Plug into your Mac. Format (if you don't buy a Mac formatted one, which is unnecessary).  Go to System Preferences>Time Machine.  Choose the disk as the time machine.  Turn on. 

Maybe you are looking for

  • How to populate value in parmetters

    Hi data: wdevent TYPE REF TO CL_WD_CUSTOM_EVENT. call method  onactionsearch( exporting  wdevent =  wdevent ). there are two fields in interface of cl_Wd_custom_Event .. . name  and  parameter

  • Help with StuckThread in java.lang.String.equals(String.java:619)

    I periodically get a stuck Execute thread on my Weblogic 8.15 server during a call to a Stateless Session Bean. When I do thread dumps, the thread is always stuck in the same place (in java.lang.String.equals(String.java:619) or in the call immediate

  • SAX-parser and mapping on the XI

    Helllo everybody, I'm trying to map an xml-document using the SAX-parser. I'm reading the data using an impustream. the problem is, while testing on the XI, the following message comes : Creating Java mapping xmlDataExchangeSAPSample/XMLValidation Lo

  • P65+ RAW files with camera RAW - Not yet

    Folks, I'm just wondering if I'm alone here cos I can't find any mention anywhere online. Just had a shoot come in froma photographer (I'm in an ad' agency and we get all types of files from various photographers) shot on a P65+ back. The RAW TIFs ar

  • MS SQL Server 2000 JDBC driver and databasename

    Hi, I have tried to switch from using WebLogic jDriver for MS SQL Server to using MS SQL Server 2000 JDBC Driver as recommended by Bea for WebLogic 7.0. I can get the connection pooling to work with the new driver but I cannot get it to work for cert