Static Resources problem

Hi,
I am currently programming a web application and have stored my images in <webapprootdir>/images/image.jpg. However when i attempt to access the image through a jsp in the application's context i.e. www.mywebsite.com/mayapplicationcontext/jspwithimage.jsp, the image is not found.
Is there any way to elegantly load the image without using hard wiring??
thank you
Arnold Oree

What's the url for the image?
Things can get tricky when you're using a relative path and switching between servlet and jsp contexts, since the servlet has a component in its url (typically 'servlet') that does not exist in the filesystem. For this reason I usually use an absolute path from the webserver root when referencing images.
For example, the 'key' image on the page has this url:
http://uk.parallaxict.com/images/gui/clientlogin.gif
which I would reference in a tag as:
<img src="/images/gui/clientlogin.gif">
Which will work on any page served from the site "http://uk.parallaxict.com/"
Remember that each image in the page is a separate http request from the browser. Although relative paths are allowed, the browser must extrapolate them into a full url before making the request. If there is a leading '/', then it prepends only the site name. If there is no leading '/', then it prepends everything before the last '/' of the full url of the requested page.

Similar Messages

  • A solution for Secure Static Versioning problem in 1.5.0_10

    Hi,
    I have JRE 1.3.1_09 and 1.5.0_10 on my computer and I think I have solved static versioning problem.
    My test computer:
    - Windows XP sp2
    - Internet Explorer 7 (on another computer also IE 6)
    - Firefox 2.0.0.1
    - JRE 1.3.1_09
    - JRE 1.5.0_10
    I. Solution for Internet Explorer 6 and Internet Explorer 7
    1. Edit registry and add:
    HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Deployment\Policy
    DWORD: EnableSecureStaticVersioning = 0 (Hex)
    2. Restart browser if started.
    3. Start web page with java applet.
    II. Solution for Firefox 2.0.0.1:
    1. Install 1.3 JRE in the same parent directory as 1.5 JRE.
    Because default default installation path for 1.5 JRE is C:\Program Files\Java\jre1.5.0_10 you need to modify
    1.3 installation path from default C:\Program Files\JavaSoft\JRE\1.3.1_09 to C:\Program Files\Java\jre1.3.1_09
    After installation check out that "bin" directory is in the following path:
    C:\Program Files\Java\jre1.3.1_09\bin
    2. Install 1.5 JRE in default installation directory: C:\Program Files\Java\jre1.5.0_10.
    After installation check out that "bin" directory is in the following path:
    C:\Program Files\Java\jre1.3.1_09\bin
    3. Restart browser if started.
    4. Start web page with java applet.
    Note: HTML page must use <object> tabs for Internet Explorer or <embed> tabs for any other browser (e.g. Firefox). You need to specify correct classid in object and/or embed tag.
    P.S. If anyone would like to discuss with me send me an e-mail to [email protected], but please post question to forum and just mail me a link to forum. I will write my answer to forum.
    Hope this helps,
    Grofaty

    I have been trying to find a solution for this issue at our organization for over 6 months. Finally, we have a work around to run multiple java versions for newer and aging java apps.
    Thanks,
    Adunlow

  • No More Resource problem

    Hi:
    I have a J2EE application using Connection Pool and JDBC.
    I am using Weblogic 6.1 and JDK 1.3.1.
    I am running into a 'No More Resource' problem. I did some debugging and think the cause is due to all my 80 database connections are used up so no new connection is available. But all the 80 connections shouldn't be used up because I did the statement.close() and rs.close() in the finally{} statement in all my DAO methods. But it seems like the connections are not released back to the free pool.
    I thought I read something that I might need to do a conn.close() too in order for the connections to be returned to the pool and marked as available. Don't the statement.close() do that? Thanks for any help!
    Stella

    Any resolution on this? We're getting the same problem - using weblogic 6.1 and jdk131. We should never reach the max # of connections specified in the pool but periodically we do. Scraped through all the code and confirmed that for every connection we call ResultSet.close; Statement.close; Connection.Close in the finally block of the try/catch statements. But we still periodically reach the max. It's sporadic so we can't reproduce. Also, after we get the error and we check the weblogic console, we see the # of active connections drop back down below the max capacity (we have shrinking turned on). Any ideas?
    thx.
    --S.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Authorisation of the static resources OAS10g R2

    Hi,
    I have some static resources (folders with html and image files) referenced in the web server of my OAS 10g release 2.
    The alias ‘myalias’ is defined in the oas10gr2/Apache/Apache/conf/httpd.conf
    <IfModule mod_alias.c>
    /myAlias/ “/folder_root/folder_web_ressources/”
    And this alias is secured (SSO – OID – LDAP) in oas10gr2/Apache/Apache/conf/mod_osso.conf
    <IfModule mod_osso.c>
    <Location /myAlias >
    require valid-user
    AuthType Basic
    </Location>
    When I access a file by his URL, the authentification page is display and having a user and a password I can display my page, which is ok.
    Now I need to restrict the access of certain folders to a given role.
    For eg the user accessing www.domain.com/myAlias/customer/c.html must have the CUSTOMER_ROLE and the user accessing www.domain.com/myAlias/owner/c.html must have the OWNER_ROLE.
    All my roles are defined in LDAP, but I don’t know how I can modify my configuration files to make this role verification.
    It is possible to have something like that ?
    <Location /myAlias/customer >
    require valid-user
    AuthType Basic
    PRIVILEGE CUSTOMER_ROLE
    </Location>
    <Location /myAlias/owner >
    require valid-user
    AuthType Basic
    PRIVILEGE OWNER_ROLE
    </Location>
    Thanks for any suggestion,
    Ivat

    Hi again,
    I do it differently:
    In my web application I have created a virtual directory to my static content (which is dynamically updated by another application).
    1. In WEB-INF\orion-web.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-web-app PUBLIC "-//Evermind//DTD Orion Web Application 2.3//EN" "http://xmlns.oracle.com/ias/dtds/orion-web.dtd">
    <orion-web-app servlet-webdir="/servlet/" directory-browsing="deny" autoreload-jsp-beans="true" autoreload-jsp-pages="true" persistence-path="./persistence">
    <web-app-class-loader search-local-classes-first="true"/>
    <virtual-directory real-path="/server/folder_root/folder_web_ressources" virtual-path="/resources" />
    </orion-web-app>
    2. This alias is secured (SSO – OID – LDAP) in oas10gr2/Apache/Apache/conf/mod_osso.conf
    <IfModule mod_osso.c>
    <Location MyAppRoot/resources >
    require valid-user
    AuthType Basic
    </Location>
    3. I use a servlet filter where, after the authorisation, I do my ROLE check.
    Web.xml
    <filter>
    <filter-name>Filter_VIRTUAL_DIR</filter-name>
    <filter-class>mydomain.servlet.RoleCheckFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>Filter_VIRTUAL_DIR</filter-name>
    <url-pattern>/ resources/*</url-pattern>
    </filter-mapping>
    This “workaround” do my job. I hope that this can help someone.
    Thanks,
    Ivat

  • Using static resources

    PortalWebAssets is the default static application resources project, which can include static resources like HTML and images.
    At the moment I'm able to use an image defined under PortalWebAssets using something like this
    <af:image shortDesc="my image" id="img1" source="#{preferenceBean.baseResourceURL}/myImage.png"/>
    Now I need to include a html page in a jspx file.
    How can I do it?
    I already tried to use jsp:include but without success.

    Hi.
    You can achieve it using *<af:inlineFrame>*
    For example if you have a sample.html stored in Web Content folder of PortalWebAssers.jpr you can reference it with:
    *<af:inlineFrame source="#{preferenceBean.baseResourceURL}/sample.html"/>*
    Regards.

  • Serve static resources

    Can somebody share their experience of serving static resources lke mpg, avi, swf, pdf, gif resources? how do I configure a static folder within my application context to render all these different resources rather than dropping all these files in the JCOO deployment folder?
    Please share your experience.
    Thanks

    Hi,
    I've found a little method and it work fine.
    Don't forget to reward points
    <u>The method is:</u>
    Create an HTTP aliases in the J2EE AS JAVA.
    1. Create a folder where you want to put your static files :
    ex: c:/folder1
    put your index.html file and other ressources
    2. Create an aliases in the http provider
    Go to Visual Admin Tool.
    Go to your server node -> services -> HTTP PROVIDER
    In Virtual Host tab
    click on default
    then on the right, go to Aliases tab
    in field Alias put the name you want: ex=test
    in field path put the path you have created: ex=c:/folder1
    click on Add button
    click on save properties
    Don't forget to clear cash, some time you have to restart the server.
    Go to :
    http://<your host>:<your port>/test
    It's working !
    I hope it can help a lot of people.
    Don't forget to reward points
    Thanks
    Regards
    Gregory

  • Thread with static resources fails in Sun JVM. Why?

    Hi All,
    My applet uses threads to put locks on 2 static resources (a Hashtable and a Vector). It works smoothly in browsers with Microsoft JVM. When i changed browser plugin to Sun's JVM 1.3, the applet failed to run and following exceptions thrown to Java Console continuously:
    java.lang.NullPointerException
    at sun.awt.SunToolkit.postEvent(Unknown Source)
    at sun.awt.windows.WComponentPeer.postEvent(Unknown Source)
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source) Here is the code:
    Resource declaration:
    public static Hashtable stateTable = new Hashtable();
    public static Vector vtElementOrder = new Vector(); 2 methods to add/remove resource elements
    private static void addElementHashTable(String ObjectName, ViewPanel viewPanel)
            try
                stateTable.put(ObjectName, viewPanel);
                vtElementOrder.addElement(ObjectName);
            catch(Exception _ex) { }
    private static void removeElementHashTable(String s)
            try
                for(; stateTable.containsKey(s); stateTable.remove(s));
                for(; vtElementOrder.contains(s); vtElementOrder.removeElement(s));
            catch(Exception _ex) { }
        }Main method for manipulation
    private static synchronized void performHashTable(boolean flagInOut, String ObjectName, ViewPanel viewPanel)
            if(flagInOut)
                addElementHashTable(ObjectName, viewPanel);
            else
                removeElementHashTable(ObjectName);
        }The performHashTable() method is called at init() and stop() events of the Applet.
    Please note that if I remove "static" from all resources and methods above, the applet works smoothly.
    Please let me know the reason and how to fix it?
    Thanks in advance.
    Chinh

    egads!
    for(; stateTable.containsKey(s); stateTable.remove(s));
    time for thedailywtf.com !

  • Caching static resources of Webapp on WLS8.1?

    Hi,
    Are there any possibility to cache static resources of Webapp on WLS8.1? Or is the only possibility to use Squid?
    BR Mervi

    Can you show me the error you receive?
    Another simple test would be to deploy your application to a new, empty
    server.
    You can create a new domain as easy as this:
    mkdir testDomain;
    cd testDomain;
    java weblogic.Server
    Type in the username/password that you want and answer 'Yes' when it
    asks if you want to create a new domain.
    Try deploying your jar to this new domain, and let me know if it still
    fails.
    -- Rob
    Jeff Dooley wrote:
    Hi,
    I have an jar file under applications which I have deployed fine on WLS 8.1 in the past. I changed the method signature on one of the EJB classes in the jar. One of the parameters now takes a different Java class type. I have recompiled everyone and repackaged the jar but when I try to deploy the jar it gives me an error because the the local interface of the EJB does not have the old Java class parameter type.
    I have checked the jar, classes in the jar, and the ejb-jar.xml and weblogic-ejb-jar.xml in the jar and it is looks fine. I have cleaned out my server deployment directories and verified the classpath in case the older jar was in there and everything looks OK. It seems for some reason 8.1 is caching the old ejb-jar.xml or somehow is remembering the old method signature and will not process the updated jar. Has anyone seen anything like this?
    Thanks for any help or recommendations

  • MSI GE70 2OE static electricity problems!

    Hi, i bought an MSI GE70 2OE gaming laptop and right away i noticed some static electricity where i put my hands on the pc case. Anyone else having problems like these, and is it dangerous? I mean even right now when i type this article i have my hands resting on the pc and i can feel some static electricity. Yesterday i even had a small discharge when i touched the corner of my pc... since the pc is metallic or aluminium or whatever, i guess it builds up charge. First i thought it was my power outlet, so i changed them and still static electricity...then i thought all sockets in my apartment were screwed up so i went to a friend across town, plugged it in...and still static electricity problems.... I mean i just bought the pc 2 weeks ago and i don't want it fried or destroyed because of this...is this dangerous?  Whenever i unplug the pc and run it on battery, everything is 100% fine and i feel no static electricity at all... and as soon as i plug it in, i feel it again when i touch my pc.

    Quote from: James D on 16-November-13, 13:05:03
    Just a note. I bet it was the first time you saw notebook exploded from wi-fi antenna from inside.
    I guess what if there is a connection? Who knows. That laptop's case is from plastic but who knows.
    OP, ask someone else to touch laptop. Not on the carpet) maybe it is just you.
    Actually, on the GT laptops it's metal....the handrest is actually metal.
    But yeah. indranil's suggestion makes more sense.

  • A non-solution to the static distortion problem

    I don't know if there's any chance of the following "solution" having value to anyone else but I'll submit it to be filed in the "For What It's Worth" folder.
    First, by way of preamble, I've upgraded iTunes a number of times now (going back to v. 4.6.0.15) and this is the first time I have had any sort of issue - the static/distortion problem that is presently being much-discussed in these forums.
    Following the leads in the early threads on this topic, I played a handful of song files with QuickTime and confirmed that everything sounded fine with that player.
    I went back to iTunes and the problem remained, although it struck me that it wasn't as severe as it had been.
    I continued playing songs, hoping for some sort of insight into what had gone wrong when it slowly dawned on me that the static/distortion had ended ... and I hadn't done anything - changed settings or anything else - except simply play songs.
    iTunes has been playing for a couple of hours now with no further sign of the problem.
    One final point of information, I'm guessing it was after having played in the area of 10-15 songs when the problem seems to have solved itself.

    I'll also add that I've since re-enabled the options I originally changed to "fix" my problem. I'm no longer getting the distortion, even with the options I changed.
    I'm not sure what's going on.. I guess I'm just glad my music is back to normal and that I can browse the Internet AND listen to music!

  • Static resource is not available

    Hi,
    i want to show a static html page as a portal component.
    My html page "my.html" is in a folder "PORTAL-INF/html/".
    I have a AbstractPortalComponent "MyPortalComponent" with following code:
    public void doContent(IPortalComponentRequest request,
           IPortalComponentResponse response) {
        IResource myHtml = request.getResource(
            IResource.STATIC_PAGE, "html/my.html");
        if (myHtml.isAvailable()) {
            response.include(request, myHtml);
         return;
        String url = myHtml.getResourceInformation().
            getURL(request);
        response.write("Resource is not available: <a href='"
            + url + "'>" + url + "</a><br>");
    My html page is not available. What is wrong with my code. Can you help me?
    Regards,
    Matthias

    I solved the problem. The folder "html" has to be under "dist" and not under "PORTAL-INF".
    Regards, Matthias

  • Adobe Flash Resource Problems

    I seem to be having problems with Flash Player in all my browsers when watching streaming videos. Flash Player tends to hoard a very large percentage (often 100%) of my CPU resources.  The effect on my computer is frame loss. I do not have this problem on web video like netflix. I have already stopped almost all non essential processes to maximize available CPU.
    My computer specs are as follows:
    Chrome: Version 34.0.1847.131 m
    ActiveX Version of adobe: 13,0,0,206
    Plug-in Version: 13,0,0,206
    Adobe Air: 13.0.0.83
    ------------------Overview------------------
    Processor : Intel(R) Core(TM)2 Duo CPU     T9600  @ 2.80GHz
    Memory : 8156MB(1066)
    Mother Board : 0Y536R
    Windows Version : Microsoft Windows 7 Professional Service Pack 1
    Video Adapter : ATI Mobility Radeon HD 4670
    Disk Drive : OCZ-AGILITY4 ATA Device(238GB,IDE)
    DVD/CD-ROM Drive : HL-DT-ST DVDRWBD CA10N ATA Device
    ------------------Operating System------------------
    OS Name : Microsoft Windows 7 Professional Service Pack 1
    OS Version : 6.1.7601
    Internet Explorer : 9.11.9600.17041
    DirectX : 4.09.00.0904
    ------------------System Devices------------------
    Motherboard Name : 0Y536R
    Motherboard Manufacturer : Dell Inc.
    BIOS Version : A15
    System BIOS Date : 04/09/11
    Video BIOS Date : 09/06/09
    CPU Identification : Intel(R) Core(TM)2 Duo CPU     T9600  @ 2.80GHz
    CPU Generic Name : Intel64 Family 6 Model 7 Stepping 10
    CPU Vendor : GenuineIntel
    CPU Frequency : 2772 MB
    L1 Code Cache : Code L1 Cache, 32 KB, 8 ways, 64 byte lines
    L1 Data Cache : Data L1 Cache, 32 KB, 8 ways, 64 byte lines
    L2 Cache :
    CPU Socket : U2E1
    Core Per Package : 2
    Logical Per Core : 2
    ------------------Drives------------------
    (C:)
    Disk Letter : C:
    Device Type : Local Fixed Disk
    File System : NTFS
    Total Bytes : 255,953,203,200 B
    Bytes Free : 88,843,386,880 B
    Bytes Used : 167,109,816,320 B
    File Compression Enabled : Yes
    Volume is Compressed : No
    Long File Name Enabled : Yes
    Unicode File Name Enabled : Yes
    Encrypted File System : Yes
    Numbers of Clusters : 62,488,575
    Free Clusters : 21,690,280
    Used Clusters : 40,798,295
    Bytes per Cluster : 4,096 bytes
    Sectors per Cluster : 8
    Used Sectors : 326,386,360
    Free Sectors : 173,522,240
    Bytes per Sector : 4,096 bytes
    Total Sectors : 499,908,600
    -----------------Display------------------
    Device Description : ATI Mobility Radeon HD 4670
    Adapter String : ATI display adapter (0x9488
    BIOS String : -
    Chip Type : ATI display adapter (0x9488)
    DAC Type : Internal DAC(400MHz)
    Driver Date : 2013-04-29
    Driver Version : 8.970.100.1100
    Driver Provider : Advanced Micro Devices, Inc.
    Memory Size : 1024 MB
    ------------------Network------------------
    Network Adapter : Bluetooth Device (Personal Area Network)
    Network Adapter : Broadcom NetLink (TM) Gigabit Ethernet
    Network Adapter : Intel(R) WiFi Link 5300 AGN
    ------------------Other Devices------------------
    Bluetooth Hands-free Audio
    AMD High Definition Audio Device
    IDT High Definition Audio CODEC

    Problem is with Adobe On-line installer of Flash player, which is very buggy and almost always crashes with some error. Please use full Off-line installer of Flash player, download from here:
    http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_f lash_player_11_osx.dmg

  • K9N Platinum onboard ethernet resource problem

    I am having a problem getting my onboard ethernet to work on the MSI K9N Platinum motherboard.
    The device manager is giving me Error Code 12 which stands for Not enough available resources.
    I have tried everything short of reinstalling Windows to get this resolved.  This is a fresh windows install.  Right after the install I installed the chipset drivers.  Since then I have reinstalled the drivers, disabled anything that I am not using in the device manager, and even disabled everything but the onboard lan and IDE controller in the bios.  Nothing has worked.
    Does anybody know what I could do to get the onboard ethernet to work?
    Specs:
    AMD AM2 3800X2
    MSI K9N Platinum (non-SLI)
    Old Nvidia PCI graphics card (X1800XT is not working)
    Western Digital IDE 80 gig hard drive
    Generic DVD burner
    XCLIO 450 watt power supply

    Quote from: syar2003 on 08-July-06, 15:19:54
    Did you use the "Load Optimized Defaults" in cmos settings before win-install.
    Sounds to me windows didn't install the correct HAL ,meaning you may have had wrong bios settings for ACPI & MPS.
    This worked.  I just did a repair install of windows after loading optimized defaults in bios.  Thanks for the help.

  • The Good Old Static Reference Problem

    Hey All,
    I know you are probabely all sick of this question but non-static variable RobotServerStatusConditionLabel cannot be referenced from a static context
    I dont know how to go about fixing this problem, i have read the other feeds on this and more or less understood why the error is happening but cant think of a way to solve it. I am developing a GUI progam in Netbeans The code is shown below.
    The prolem i am having is that i have a thread called ModuleThreadRobot which is in a class called final class ModuleThreadRobot. I need to be able to access the variables in the GUI so that i can update them for the user so for example i want to change the text of a label in the gui:
    LabANTServerProxyGUI.RobotServerStatusConditionLabel.setText("wagamma!!");
    And the error i get is as follows:
    non-static variable RobotServerStatusConditionLabel cannot be referenced from a static context
    So if anyone can help me out here, i more or less get why its happening just don't know a way around it.
    Thanks inadvance,
    Richard
    * LabANTServerProxyGUI.java
    * Created on 26 December 2005, 07:58
    package LabANTServerProxy;
    * @author  Yap
    import javax.swing.*;
    import java.io.*;
    import java.net.*;
    public class LabANTServerProxyGUI extends javax.swing.JFrame {
        /** Creates new form LabANTServerProxyGUI */
        public LabANTServerProxyGUI() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
        private void initComponents() {
            LabANTTabbedPane = new javax.swing.JTabbedPane();
            LabANTSplashPanel = new javax.swing.JPanel();
            Title = new javax.swing.JLabel();
            Author = new javax.swing.JLabel();
            UniversityMark = new javax.swing.JTextArea();
            Copyright = new javax.swing.JTextArea();
            PicturePanel = new javax.swing.JPanel();
            jLabel2 = new javax.swing.JLabel();
            EmailLabel = new javax.swing.JLabel();
            WebAddressLabel = new javax.swing.JLabel();
            ServerControlPanel = new javax.swing.JPanel();
            StepOnePanel = new javax.swing.JPanel();
            RobotServerSettingsPanel = new javax.swing.JPanel();
            ServerIPAddressLabel = new javax.swing.JLabel();
            ServerIPAddressTextField = new javax.swing.JTextField();
            ServerPortLabel = new javax.swing.JLabel();
            ServerPortTextField = new javax.swing.JTextField();
            RobotServerSettingsTextArea = new javax.swing.JTextArea();
            StatusLabel = new javax.swing.JLabel();
            RobotServerStatusConditionLabel = new javax.swing.JLabel();
            RobotServerSettingsConnectButton = new javax.swing.JButton();
            StepTwoPanel = new javax.swing.JPanel();
            DatabaseSettingsPanel = new javax.swing.JPanel();
            DatabaseIPAddressLabel = new javax.swing.JLabel();
            DatabasePortLabel = new javax.swing.JLabel();
            DatabaseIPTextField = new javax.swing.JTextField();
            DatabasePortTextField = new javax.swing.JTextField();
            DatabaseSettingsTextArea = new javax.swing.JTextArea();
            UsernameLabel = new javax.swing.JLabel();
            PasswordLabel = new javax.swing.JLabel();
            UsernameTextField = new javax.swing.JTextField();
            PasswordTextField = new javax.swing.JPasswordField();
            DatabaseSaveButton = new javax.swing.JButton();
            TestStatusPanel = new javax.swing.JPanel();
            TestStatusConditionLabel = new javax.swing.JLabel();
            DatabaseTestButton = new javax.swing.JButton();
            StepThreePanel = new javax.swing.JPanel();
            ServerStatus = new javax.swing.JPanel();
            LabANTServerPortLabel = new javax.swing.JLabel();
            LabANTServerPortTextField = new javax.swing.JTextField();
            ServerStatusTextArea = new javax.swing.JTextArea();
            StartServerButton = new javax.swing.JButton();
            ServerMonitorPane = new javax.swing.JPanel();
            SensorDataScrollPane = new javax.swing.JScrollPane();
            SensorDataTextArea = new javax.swing.JTextArea();
            CommandDataScrollPane = new javax.swing.JScrollPane();
            CommandDataTextArea = new javax.swing.JTextArea();
            ServerMonitorNoteLabel = new javax.swing.JLabel();
            ClientDataPane = new javax.swing.JPanel();
            ClientIPAddressLabel = new javax.swing.JLabel();
            ClientIPAddressConditionLabel = new javax.swing.JLabel();
            LogsPanel = new javax.swing.JPanel();
            LogsTextArea = new javax.swing.JTextArea();
            HelpPanel = new javax.swing.JPanel();
            HelpScrollPane = new javax.swing.JScrollPane();
            HelpTextArea = new javax.swing.JTextArea();
            jPanel5 = new javax.swing.JPanel();
            AboutScrollPane = new javax.swing.JScrollPane();
            AboutTextArea = new javax.swing.JTextArea();
            getContentPane().setLayout(null);
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            LabANTTabbedPane.setFont(new java.awt.Font("Tahoma", 1, 11));
            LabANTSplashPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
            LabANTSplashPanel.setFont(new java.awt.Font("MS Sans Serif", 1, 11));
            Title.setFont(new java.awt.Font("Tahoma", 1, 36));
            Title.setText("LabANT Version 1.0");
            LabANTSplashPanel.add(Title, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 20, -1, -1));
            Author.setFont(new java.awt.Font("Tahoma", 0, 18));
            Author.setText("Author: Richard McElligott ");
            LabANTSplashPanel.add(Author, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 60, -1, -1));
            UniversityMark.setBackground(javax.swing.UIManager.getDefaults().getColor("Button.background"));
            UniversityMark.setFont(new java.awt.Font("Tahoma", 0, 12));
            UniversityMark.setText("The University of Reading\nActive Robotics Laboratory");
            LabANTSplashPanel.add(UniversityMark, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 440, -1, -1));
            Copyright.setBackground(javax.swing.UIManager.getDefaults().getColor("Button.background"));
            Copyright.setFont(new java.awt.Font("Tahoma", 0, 12));
            Copyright.setText("Copyright Richard McElligott");
            LabANTSplashPanel.add(Copyright, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 470, -1, -1));
            PicturePanel.setLayout(null);
            PicturePanel.setBorder(new javax.swing.border.TitledBorder("Picutre"));
            jLabel2.setIcon(new javax.swing.ImageIcon("C:\\Documents and Settings\\Yap\\My Documents\\My Pictures\\leafcutterant1.jpg"));
            PicturePanel.add(jLabel2);
            jLabel2.setBounds(10, 20, 800, 300);
            LabANTSplashPanel.add(PicturePanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 90, 820, 340));
            EmailLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            EmailLabel.setText("[email protected]");
            LabANTSplashPanel.add(EmailLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 450, -1, -1));
            WebAddressLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            WebAddressLabel.setText("www.arl.reading.ac.uk");
            LabANTSplashPanel.add(WebAddressLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 470, -1, -1));
            LabANTTabbedPane.addTab("LabANT", LabANTSplashPanel);
            ServerControlPanel.setLayout(null);
            ServerControlPanel.setMinimumSize(new java.awt.Dimension(861, 485));
            ServerControlPanel.setPreferredSize(new java.awt.Dimension(861, 485));
            StepOnePanel.setLayout(null);
            StepOnePanel.setBorder(new javax.swing.border.TitledBorder(null, "Step One", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            RobotServerSettingsPanel.setLayout(null);
            RobotServerSettingsPanel.setBorder(new javax.swing.border.TitledBorder(null, "Robot Server Settings", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            ServerIPAddressLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            ServerIPAddressLabel.setText("Server IP Address:");
            RobotServerSettingsPanel.add(ServerIPAddressLabel);
            ServerIPAddressLabel.setBounds(30, 20, 100, 14);
            ServerIPAddressTextField.setFont(new java.awt.Font("Tahoma", 0, 11));
            ServerIPAddressTextField.setText("127.0.0.1");
            RobotServerSettingsPanel.add(ServerIPAddressTextField);
            ServerIPAddressTextField.setBounds(30, 40, 180, 14);
            ServerPortLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            ServerPortLabel.setText("Server Port:");
            RobotServerSettingsPanel.add(ServerPortLabel);
            ServerPortLabel.setBounds(30, 60, 70, 14);
            ServerPortTextField.setFont(new java.awt.Font("Tahoma", 0, 11));
            ServerPortTextField.setText("4444");
            RobotServerSettingsPanel.add(ServerPortTextField);
            ServerPortTextField.setBounds(30, 80, 50, 14);
            RobotServerSettingsTextArea.setBackground(javax.swing.UIManager.getDefaults().getColor("Button.background"));
            RobotServerSettingsTextArea.setFont(new java.awt.Font("Tahoma", 0, 12));
            RobotServerSettingsTextArea.setLineWrap(true);
            RobotServerSettingsTextArea.setText("Please supply the settings to connect to the robots wireless rs232 to tcp/ip module. This module recieves a wireless RS232 signal via a transiever on board the robot and one on the modlue and sends this data to a small embeded server to which you must connect. To connect you need to supply the IP Address and Port Number of the module. The Default is IP Address is 127.0.0.1 and Port Number is 4444. The MAC address of the module is:  00-33-44-55-55-66\n");
            RobotServerSettingsTextArea.setWrapStyleWord(true);
            RobotServerSettingsPanel.add(RobotServerSettingsTextArea);
            RobotServerSettingsTextArea.setBounds(390, 20, 440, 110);
            StatusLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
            StatusLabel.setText("Status:");
            RobotServerSettingsPanel.add(StatusLabel);
            StatusLabel.setBounds(30, 110, 50, 14);
            RobotServerStatusConditionLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            RobotServerStatusConditionLabel.setText("Disconnected");
            RobotServerSettingsPanel.add(RobotServerStatusConditionLabel);
            RobotServerStatusConditionLabel.setBounds(80, 110, 290, 14);
            RobotServerSettingsConnectButton.setFont(new java.awt.Font("Tahoma", 1, 11));
            RobotServerSettingsConnectButton.setText("Connect");
            RobotServerSettingsConnectButton.setBorder(new javax.swing.border.EtchedBorder());
            RobotServerSettingsConnectButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    RobotServerSettingsConnectButtonActionPerformed(evt);
            RobotServerSettingsConnectButton.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseReleased(java.awt.event.MouseEvent evt) {
                    RobotServerSettingsConnectButtonMouseReleased(evt);
            RobotServerSettingsPanel.add(RobotServerSettingsConnectButton);
            RobotServerSettingsConnectButton.setBounds(140, 70, 80, 30);
            StepOnePanel.add(RobotServerSettingsPanel);
            RobotServerSettingsPanel.setBounds(10, 20, 850, 140);
            ServerControlPanel.add(StepOnePanel);
            StepOnePanel.setBounds(0, 0, 870, 170);
            StepTwoPanel.setLayout(null);
            StepTwoPanel.setBorder(new javax.swing.border.TitledBorder(null, "Step Two", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            DatabaseSettingsPanel.setLayout(null);
            DatabaseSettingsPanel.setBorder(new javax.swing.border.TitledBorder(null, "Database Settings", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            DatabaseIPAddressLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            DatabaseIPAddressLabel.setText("Database IP Address:");
            DatabaseSettingsPanel.add(DatabaseIPAddressLabel);
            DatabaseIPAddressLabel.setBounds(30, 30, 110, 14);
            DatabasePortLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            DatabasePortLabel.setText("Database Port:");
            DatabaseSettingsPanel.add(DatabasePortLabel);
            DatabasePortLabel.setBounds(30, 70, 80, 14);
            DatabaseIPTextField.setFont(new java.awt.Font("Tahoma", 0, 11));
            DatabaseIPTextField.setText("127.0.0.1");
            DatabaseSettingsPanel.add(DatabaseIPTextField);
            DatabaseIPTextField.setBounds(30, 50, 170, 14);
            DatabasePortTextField.setFont(new java.awt.Font("Tahoma", 0, 11));
            DatabasePortTextField.setText("4443");
            DatabaseSettingsPanel.add(DatabasePortTextField);
            DatabasePortTextField.setBounds(30, 90, 70, 14);
            DatabaseSettingsTextArea.setBackground(javax.swing.UIManager.getDefaults().getColor("Button.background"));
            DatabaseSettingsTextArea.setFont(new java.awt.Font("Tahoma", 0, 12));
            DatabaseSettingsTextArea.setLineWrap(true);
            DatabaseSettingsTextArea.setText("Supply settings to connect to the database, which is used for authenthicating clients and checking timetable. You must save before pressing test.");
            DatabaseSettingsTextArea.setWrapStyleWord(true);
            DatabaseSettingsPanel.add(DatabaseSettingsTextArea);
            DatabaseSettingsTextArea.setBounds(630, 20, 210, 90);
            UsernameLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            UsernameLabel.setText("Username:");
            DatabaseSettingsPanel.add(UsernameLabel);
            UsernameLabel.setBounds(250, 30, 60, 14);
            PasswordLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            PasswordLabel.setText("Password: ");
            DatabaseSettingsPanel.add(PasswordLabel);
            PasswordLabel.setBounds(250, 70, 60, 14);
            UsernameTextField.setFont(new java.awt.Font("Tahoma", 0, 11));
            UsernameTextField.setText("Enter Your Username");
            DatabaseSettingsPanel.add(UsernameTextField);
            UsernameTextField.setBounds(250, 50, 170, 14);
            DatabaseSettingsPanel.add(PasswordTextField);
            PasswordTextField.setBounds(250, 90, 170, 17);
            DatabaseSaveButton.setFont(new java.awt.Font("Tahoma", 1, 11));
            DatabaseSaveButton.setText("Save");
            DatabaseSaveButton.setBorder(new javax.swing.border.EtchedBorder());
            DatabaseSettingsPanel.add(DatabaseSaveButton);
            DatabaseSaveButton.setBounds(440, 20, 70, 30);
            TestStatusPanel.setLayout(null);
            TestStatusPanel.setBorder(new javax.swing.border.TitledBorder("Test Status"));
            TestStatusConditionLabel.setText("Disconnected");
            TestStatusPanel.add(TestStatusConditionLabel);
            TestStatusConditionLabel.setBounds(40, 20, 70, 15);
            DatabaseSettingsPanel.add(TestStatusPanel);
            TestStatusPanel.setBounds(440, 60, 150, 50);
            DatabaseTestButton.setFont(new java.awt.Font("Tahoma", 1, 11));
            DatabaseTestButton.setText("Test");
            DatabaseTestButton.setBorder(new javax.swing.border.EtchedBorder());
            DatabaseSettingsPanel.add(DatabaseTestButton);
            DatabaseTestButton.setBounds(520, 20, 70, 30);
            StepTwoPanel.add(DatabaseSettingsPanel);
            DatabaseSettingsPanel.setBounds(10, 20, 850, 130);
            ServerControlPanel.add(StepTwoPanel);
            StepTwoPanel.setBounds(0, 170, 870, 160);
            StepThreePanel.setLayout(null);
            StepThreePanel.setBorder(new javax.swing.border.TitledBorder(null, "Step Three", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            ServerStatus.setLayout(null);
            ServerStatus.setBorder(new javax.swing.border.TitledBorder(null, "Server Status:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            LabANTServerPortLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            LabANTServerPortLabel.setText("LabANT Server Port:");
            ServerStatus.add(LabANTServerPortLabel);
            LabANTServerPortLabel.setBounds(30, 40, 100, 14);
            LabANTServerPortTextField.setFont(new java.awt.Font("Tahoma", 0, 11));
            LabANTServerPortTextField.setText("5000");
            ServerStatus.add(LabANTServerPortTextField);
            LabANTServerPortTextField.setBounds(30, 60, 100, 14);
            ServerStatusTextArea.setBackground(javax.swing.UIManager.getDefaults().getColor("Button.background"));
            ServerStatusTextArea.setFont(new java.awt.Font("Tahoma", 0, 12));
            ServerStatusTextArea.setLineWrap(true);
            ServerStatusTextArea.setText("Before starting the server ensure that you have sucessfully completed both step one and step two. Then please set the port number you whish the server to run on. Once the server is started clients can then connect to the server and log on and control the robot via the website client. \nServer Monitor will display live data and logs.\n");
            ServerStatusTextArea.setWrapStyleWord(true);
            ServerStatus.add(ServerStatusTextArea);
            ServerStatusTextArea.setBounds(230, 30, 580, 80);
            StartServerButton.setFont(new java.awt.Font("Tahoma", 1, 11));
            StartServerButton.setText("Start Server");
            StartServerButton.setBorder(new javax.swing.border.EtchedBorder());
            ServerStatus.add(StartServerButton);
            StartServerButton.setBounds(30, 90, 120, 30);
            StepThreePanel.add(ServerStatus);
            ServerStatus.setBounds(10, 20, 850, 130);
            ServerControlPanel.add(StepThreePanel);
            StepThreePanel.setBounds(0, 330, 870, 160);
            LabANTTabbedPane.addTab("Server Control", ServerControlPanel);
            ServerMonitorPane.setLayout(null);
            ServerMonitorPane.setBorder(new javax.swing.border.TitledBorder(null, "Server Monitor:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            SensorDataScrollPane.setBorder(new javax.swing.border.TitledBorder(null, "Sensor Data", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            SensorDataScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            SensorDataTextArea.setFont(new java.awt.Font("Tahoma", 0, 12));
            SensorDataTextArea.setLineWrap(true);
            SensorDataTextArea.setText("There once was a tree a very beautiful tree");
            SensorDataTextArea.setWrapStyleWord(true);
            SensorDataScrollPane.setViewportView(SensorDataTextArea);
            ServerMonitorPane.add(SensorDataScrollPane);
            SensorDataScrollPane.setBounds(10, 20, 470, 330);
            CommandDataScrollPane.setBorder(new javax.swing.border.TitledBorder(null, "Command Data From Client", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            CommandDataScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            CommandDataTextArea.setFont(new java.awt.Font("Tahoma", 0, 12));
            CommandDataTextArea.setLineWrap(true);
            CommandDataTextArea.setText("The only way is up ... you and me babe");
            CommandDataTextArea.setWrapStyleWord(true);
            CommandDataScrollPane.setViewportView(CommandDataTextArea);
            ServerMonitorPane.add(CommandDataScrollPane);
            CommandDataScrollPane.setBounds(490, 20, 380, 330);
            ServerMonitorNoteLabel.setFont(new java.awt.Font("Tahoma", 0, 11));
            ServerMonitorNoteLabel.setText("NOTE: Logs of both Sensor Data and Command Data along with users IP address are saved in log files for later analysis.");
            ServerMonitorPane.add(ServerMonitorNoteLabel);
            ServerMonitorNoteLabel.setBounds(130, 470, 590, 20);
            ClientDataPane.setLayout(null);
            ClientDataPane.setBorder(new javax.swing.border.TitledBorder(null, "Client Data:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            ClientIPAddressLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
            ClientIPAddressLabel.setText("Client IP Address:");
            ClientDataPane.add(ClientIPAddressLabel);
            ClientIPAddressLabel.setBounds(20, 20, 110, 20);
            ClientIPAddressConditionLabel.setFont(new java.awt.Font("Tahoma", 0, 12));
            ClientIPAddressConditionLabel.setText("Unknown");
            ClientDataPane.add(ClientIPAddressConditionLabel);
            ClientIPAddressConditionLabel.setBounds(130, 20, 70, 20);
            ServerMonitorPane.add(ClientDataPane);
            ClientDataPane.setBounds(10, 360, 230, 60);
            LogsPanel.setLayout(null);
            LogsPanel.setBorder(new javax.swing.border.TitledBorder(null, "Logs", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
            LogsTextArea.setBackground(javax.swing.UIManager.getDefaults().getColor("Button.background"));
            LogsTextArea.setLineWrap(true);
            LogsTextArea.setText("The logs from Sensor Data, Command Data and Client Details are save in the following files sensor.log, command.log and client.log respectfully. They are saved in the same folder that the server is run in.");
            LogsTextArea.setWrapStyleWord(true);
            LogsPanel.add(LogsTextArea);
            LogsTextArea.setBounds(10, 20, 570, 60);
            ServerMonitorPane.add(LogsPanel);
            LogsPanel.setBounds(260, 370, 600, 90);
            LabANTTabbedPane.addTab("Server Monitor", ServerMonitorPane);
            HelpPanel.setLayout(null);
            HelpPanel.setBorder(new javax.swing.border.TitledBorder("Help"));
            HelpScrollPane.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            HelpScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            HelpTextArea.setLineWrap(true);
            HelpTextArea.setText("The standard Lorem Ipsum passage, used since the 1500s\n\n\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"\n\nSection 1.10.32 of \"de Finibus Bonorum et Malorum\", written by Cicero in 45 BC\n\n\"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?\"\n\n1914 translation by H. Rackham\n\n\"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?\"\n\nSection 1.10.33 of \"de Finibus Bonorum et Malorum\", written by Cicero in 45 BC\n\n\"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.\"\n\n1914 translation by H. Rackham\n\n\"On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.\" ");
            HelpTextArea.setWrapStyleWord(true);
            HelpScrollPane.setViewportView(HelpTextArea);
            HelpPanel.add(HelpScrollPane);
            HelpScrollPane.setBounds(50, 60, 770, 310);
            LabANTTabbedPane.addTab("Help", HelpPanel);
            jPanel5.setLayout(null);
            jPanel5.setBorder(new javax.swing.border.TitledBorder("About"));
            jPanel5.setMinimumSize(new java.awt.Dimension(861, 485));
            AboutScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            AboutScrollPane.setAutoscrolls(true);
            AboutScrollPane.setMinimumSize(new java.awt.Dimension(100, 340));
            AboutTextArea.setLineWrap(true);
            AboutTextArea.setText("The standard Lorem Ipsum passage, used since the 1500s\n\n\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"\n\nSection 1.10.32 of \"de Finibus Bonorum et Malorum\", written by Cicero in 45 BC\n\n\"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?\"\n\n1914 translation by H. Rackham\n\n\"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &nbs

    You got flack for not providing - in your own words - the solution to your own problem
    (from which someone might be able to see where you went wrong).
    Also, try not to "break" the forum formatting with those annoyingly long lines,
    see how nice it looks when refactored.
            AboutTextArea.setText("The standard Lorem Ipsum passage, used since the 1500s\n"+
                    "\n\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor "+
                    "incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud "+
                    "exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute "+
                    "irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. "+
                    "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit "+
                    "anim id est laborum.\"\n"+
                    "\nSection 1.10.32 of \"de Finibus Bonorum et Malorum\", written by Cicero in 45 BC\n"+
                    "\n\"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium "+
                    "doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore "+
                    "veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam "+
                    "voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur "+
                    "magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam "+
                    "est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non "+
                    "numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat "+
                    "voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam "+
                    "corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? "+
                    "Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil "+
                    "molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?\"\n"+
                    "\n1914 translation by H. Rackham\n\n\"But I must explain to you how all this mistaken "+
                    "idea of denouncing pleasure and praising pain was born and I will give you a complete "+
                    "account of the system, and expound the actual teachings of the great explorer of the "+
                    "truth, the master-builder of human happiness. No one rejects, dislikes, or avoids "+
                    "pleasure itself, because it is pleasure, but because those who do not know how to "+
                    "pursue pleasure rationally encounter consequences that are extremely painful. "+
                    "Nor again is there anyone who loves or pursues or desires to obtain pain of itself, "+
                    "because it is pain, but because occasionally circumstances occur in which toil and "+
                    "pain can procure him some great pleasure. To take a trivial example, which "+
                    "of us ever undertakes laborious physical exercise, except to obtain some advantage "+
                    "from it? But who has any right to find fault with a man who chooses to enjoy a pleasure "+
                    "that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?\"\n"+
                    "\nSection 1.10.33 of \"de Finibus Bonorum et Malorum\", written by Cicero in 45 BC\n"+
                    "\n\"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis "+
                    "praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias "+
                    "excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia "+
                    "deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum "+
                    "facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi "+
                    "optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, "+
                    "omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem "+
                    "quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et "+
                    "voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic "+
                    "tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur "+
                    "aut perferendis doloribus asperiores repellat.\"\n\n1914 translation by H. Rackham\n"+
                    "\n\"On the other hand, we denounce with righteous indignation and dislike men who "+
                    "are so beguiled and demoralized by the charms of pleasure of the moment, so "+
                    "blinded by desire, that they cannot foresee the pain and trouble that are bound to "+
                    "ensue; and equal blame belongs to those who fail in their duty through weakness "+
                    "of will, which is the same as saying through shrinking from toil and pain. These cases "+
                    "are perfectly simple and easy to distinguish. In a free hour, when our power of choice "+
                    "is untrammelled and when nothing prevents our being able to do what we like best, "+
                    "every pleasure is to be welcomed and every pain avoided. But in certain circumstances "+
                    "and owing to the claims of duty or the obligations of business it will frequently occur that "+
                    "pleasures have to be repudiated and annoyances accepted. The wise man therefore "+
                    "always holds in these matters to this principle of selection: he rejects pleasures to "+
                    "secure other greater pleasures, or else he endures pains to avoid worse pains.\" \n");

  • Static member problem in multiple instance of  web application

    Problem
    I am working on a product which is java based. I have a war file. I have to deploy this war file in JBoss. Further, I need to run multiple instance of this war file in same JBoss instance.
    Issue
         In that war file there is servlet Start.java. That servlet calls an other class from its init method. Here is code
    public class Start extends HttpServlet
         public void init(ServletConfig config) throws ServletException
              super.init(config);
              DB.loadProperties (�db.properties�);
         } // init
         public void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException
                   } // doGet
         public void doPost(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException
                   } // doPost
    } // Start
    public final class DB implements Serializable
         public static final String     P_UID = "ApplicationUserID";
         private static final String     DEFAULT_UID = "System";
         public static final String     P_PWD = "ApplicationPassword";
         private static final String     DEFAULT_PWD ="System";
         public static final String     P_STORE_PWD = "StorePassword";
         private static Properties           s_prop = new Properties();
    public static boolean loadProperties (String filename)
         {    // looks for properties file
    s_prop = new Properties();
              FileInputStream fis = null;
              try
                   fis = new FileInputStream(filename);
                   s_prop.load(fis);
                   fis.close();
              catch (FileNotFoundException e)
                   log.warning(filename + " not found");
                   loadOK = false;
         �}
    As you can see if I deployed two instance of this war in JBoss and assume each instance point to its own properties file. The �Static� members are problem.
    Restriction
         I am not allowed change the code or logic of the product. I must be able to get some thing outside or apply a patch to solve this problem.
    Please Help
    Possible option that I have thought
    1 Using multiple JVM - Not an option in this project
    2 Using multiple JBoss � Not the requirement (need to run only on single Instance of JBoss)
    3 Use own class loader for war/ear � don�t know how in JBoss need help.
    I am using JBoss 3.2.3
    Thanks,
    Kumaran

    Static members belong to the class. So, you needto
    think of multiple JVMs for your problem.Thanks for reply.
    don�t know how in JBoss need helpJust guessing... clustered environment MAYBE
    RichThanks Rich,
    I don�t know how Cluster environment solve my problem. I need more information on your thought. Cloud you explain it.
    Kumaran

Maybe you are looking for