Suggestions/help needed creating portal type page

Let me start by saying I am very new to Java. I'm trying to create a portal - a fairly simple web page where each user who logs in will see only those application links that they are authorized to access. User A will see links to applications X, Y and Z and user B will see links to applications R and Q.
I'm running a Tomcat 6 server, and will be using Java 6 (jsp pages, servlets, etc). I've done some research on things like tomcat realms, ldap, ad, jaas, etc. but I'm still not sure what direction I should be going in. My 'portal'/web page will consist of about 20 application links - some are links out to external web sites/applications (public web sites outside of our network), some are internal applications housed on various in-house servers on our network, some are home-grown, others are 3rd party applications, eventually some will be home-grown java applications. Each application currently has it's own login and password.
I know that I can build a table in a relational database, or update an xml file in Tomcat and use Tomcat realms to determine who has access to what. Are there other options? I can certainly build a table, but I don't want to if there are easier ways - can AD tell me what applications a particular user has access to (so I can determine what links to display)? If so, how? (I don't know much about ad (yet)).
I just don't want to end up building something overly complex, and missing out on something that would make this simpler. Any ideas, suggestions, etc on what I could/should be looking at would be most appreciated.
Thanks!

Unless you know what you're doing with absolute positioning, avoid absolute positioning! Absolute positioning actually takes an element out of the normal HTML document flow and positions it absolutely in relationship with it's first parent with a position other than static - for details read the HTML specs at the W3C.
Ideally you should use the normal HTML document flow. Divs are block level elements meaning that they act like blocks that take up a height (determined by children content) and width (the full width of the page or it's parent container, unless you tell it otherwise).
For your CSS try this:
#techlistcontainer {
    width: 75%;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 30;
    padding-top: 0;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 30;
How does that work with your templates?

Similar Messages

  • Help needed creating consistency across pages

    My site is here:
    http://www.leaningtowermpls.com/index.php
    The horizontal yellow bar at the top is inconsistent across
    the pages Home, Menu and Locations. I haven't taken the time to
    learn CSS properly yet, and most of the layout is table based. (Not
    that I have mastered anything at this point.) This site needs to
    get out the door, so if anyone can let me know how to solve this
    problem I would really appreciate it.
    -Adam

    On Tue, 16 Oct 2007 00:13:52 +0000 (UTC),
    "adam@blueapplestudio"
    <[email protected]> wrote:
    >My site is here:
    >
    >
    http://www.leaningtowermpls.com/index.php
    >
    > The horizontal yellow bar at the top is inconsistent
    across the pages Home,
    >Menu and Locations. I haven't taken the time to learn CSS
    properly yet, and
    >most of the layout is table based. (Not that I have
    mastered anything at this
    >point.) This site needs to get out the door, so if anyone
    can let me know how
    >to solve this problem I would really appreciate it.
    >
    > -Adam
    As discussed - it would be best to base on a simple template
    - with
    the common items like menu, to yellow bar in the template
    etc.
    Also you have the css in each file, far better to move it out
    to an
    external style sheet - so that all pages will behave the
    same.
    Tidy up some of the code with Dw's
    Commands | Apply source formatting
    ~Malcolm N....
    ~

  • Help in create territory type

    Hi,
    I'm trying to setup oracle field service fresh instance,
    In the territory administration page ,
    When i'm trying to create territory type, I found the USAGE field is empty, there is no Choices.
    In vision demo there is choises "Trade management, Sales, ...." those Qualifiers
    is not enabled for me i don not Know why?
    When I'm trying to "Enable Matching Attributes" , I got an error "....., contact your system administrator"
    So why i cannot Enable the Matching Attributes?
    I think it will solve the problem.
    Please help.
    Thanks

    I'm aslo doing a field service fresh implementation and faced the same isssue. Basically, you create a template for a territory type and that fixes the issue. It's one of the tabs on the top left of the jsp page.

  • Help Needed with Dynamic RePort PAges

    I've created a link that dynamically will generate a data
    report from my db. I have about 30 reports the client needs to be
    able to run. Do I have to create a separate page for every single
    recordset?? Is there a more efficient way to do this??

    You could make a drop down menu with the name of the report
    in it and then show that report on the redirect page using an if
    statement to determine which sql statement to run. Also you can
    have multiple recordset on a page.
    Are you using php, asp or cfm?

  • Help in creating a OAF Page

    My requirement is to create a page and in that I need to have the fields like date, employee number, batch number, person type, group name and below these fields I need to have an advance table with other fields. User can enter one batch# and employee number and date and for that employee, user should enter the rows in advance table and all these values should store in a single VO including the fields above the advanced table. I am not sure if this will work as we are entering the above fileds one time and multiple rows in advanced table.
    If you see any similar page in any of the module, please let me know the responsibility and function, I will check the page and code behind that.
    Thanks,
    HC

    it is not recomendated to have both header master and line child in same table.
    But you can create such page. Oracle will not have such page.
    what problem are you facing while development.
    --Parag                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Help Needed Created Standalone Network for iTunes DJ

    I use my MBP to manage backing tracks for a band. I would like to use iTunes DJ for requests from the audience via wireless connection via *iPhone/iPod Touch Remote app*. I would use this option in conjunction with a printed song list and small request cards (for those who don't have iPhones).
    I can't connect to an existing network as most venues do not have wireless. I would like to set up my MBP as a wireless base station that can be accessed via an iPhone/iPod Remote app. Besides, I would prefer to have a network that echo's the band's name.
    I know I have to use the "*Create computer-to-computer Networks*", but I am unsure of what settings I need to get the network working.
    I will use Locations to quickly activate the MBP as the base station.
    Any help or suggestion setting up my MBP as a wireless base station would be greatly appreciated.
    TIA

    TSG wrote:
    yep, tried changing cables....even upto cat6!!! no joy.
    starting to do my head in now.....might call in a network person/tech but i hate the idea of being charged to see him repeat all i have already done!
    Agreed. I'd keep at it yourself. I guarantee it will be something simple.
    what are the benefits of a switcher? (never used one before) any recomends?
    A switch is just like a hub, except that instead of always sending packets to your entire network, it only sends them where they need to go. The benefits grow with the size and speed of your network. Switches used to be much more expensive than hubs but not any more. Normally I'd recommend almost any Linksys device, but in this case dlink seems to have a better one:
    http://www.amazon.com/D-Link-DGS-2205-5-port-Desktop-Switch/dp/B000FIVDIA
    Again, I don't think your dlink hub is responsible for this dramatic bottleneck though.

  • Solution Design questions/suggestions/help needed

    Hi,
    I would appreciate any inputs regarding this.
    I am thinking of designing Solutions in Solman for our landscape which consists of ECC 6 and PI 7.1; each having a 3 system landscape D-Q-P. Is there an issue if I create Solutions Dev, QA and Prod vs Solutions ECC and PI ? I am more in favor of the former because it allows me easier management of the landscape when I implement System Monitoring, EWA, System Administration to see everything for the critical Prod systems together. Do any of you see any downsides to this approach ? Or any advantages of creating Solution ECC and Solution PI ?
    Also, from what I read from the documentation, I would need to create logical component for each system (ZECCDEV,ZECCQA etc) for the systems to show up in the solution landscape ? This is because in the definition of logical components, there is only one field to add the Dev or QA or Prod systems ? I still have to start working on this, so I could be wrong. Please feel free to correct me.
    Any inputs would be appreciated since I am fairly new to this.
    Thanks,
    Shreya

    Hello,
    I am not really sure what you are asking.
    Systems are usually defined (SID) in SMSY, then they are added to a logical component.
    Logicals need to be in the customer name space, so they are copied from SAP References to a unique name prefixed by a "Z".
    Multiple systems  of  any system type (PRD, DEV, QAS, TEST, SANDBOX...etc) can be added to a logical component.
    One or more logical can then be added to a Solution.
    This is basically how the Solution is built. There are some limitations you need to consider when naming systems.
    For certain functions, like EWA reports they need to have a unique Installation # + SID, and in the case of a long_sid, it would be the Installation # + (1st 3 chars of the)Long_SID.
    So if you want to know if you can have a PI system called DEV, QAS and PRD and  a ECC system called DEV, QAS and PRD, you can. But if you name them ECC_DEV, ECC_QAS, and ECC_PRD, then you will have problems.
    A logical name must be unique. But they show up in the system landscape as soon as they have been defined.
    When the logical is added to the Solution, only system Types of Production are automatically set to "Put in Solution"
    Even though you can see the systems of other types in the logical and in the solution. And any system that is not in status "Put in Solution" will not be visible when you try to use it, as an example create an EWA , you would select the solution and not see any other type but production systems to select. This is because system types that are not production need to be manually set to "Put in Solution". This is done in the solution, in Change/Edit mode, and right clicking on the system you want to put in the solution and selecting that option, then saving.
    From your questions am and not exactly sure what you were getting at, but I do hope this general info helps.
    Regards,
    Paul

  • Help needed, Createing Dynamic User input

    Hello,
    I am attempting to create some dynamic user input by "predicting" what the user requires in a text box.
    For example if the user enters "Smi" I have a select list pop up which gives the user all options that begin with "Smi".
    I am able to achieve the popups but the interface is quite jerky and not terribly responsive I am trying to solve this by using a thread which starts and stops when new input is received but it is still not quite right.
    The program uses a Sorted TreeSet to hold the data (I thought this would give me a quick search time) and a simple interface at this stage.
    Any help would be fantastic
    Thanks in advance :P
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.text.*;
    import java.util.*;
       /** This program represents part of a larger user interface for allowing the
       user to select data from a file or database.
       <p>
       When the program starts up, it will read in data from a given file, and hold
       it in some type of container allowing rapid access.
       <p>
       The user may then type in the first few letters of the surname of a person,
       and this program should immediately present in a popup dialog the names which
       match.  The user will be able to click on one of the names in the popup and
       that will cause all data about that person to be displayed in the JTextArea
       at the bottom of the window.
       <p>
       This program requires the FormLayout.class, FormLayout$Placement.class, and
       FormLayout$Constraint.class files in the same directory
       (folder) or in its classpath.  These is provided separately.
    class PartMatch extends JFrame implements Runnable
                        /** Close down the program. */
       JButton quitbtn;
                        /** Field for the surname. */
       JTextField namefld;
                        /** Full details of the person(s). */
       JTextArea  results;
                        /** Popup dialog to display the names and addresses which
                        match the leading characters given in namefld. */
       Chooser matches;
                      /** Default background color for a window. */
       final static  Color            defBackground = new Color(0xD0C0C0);
                      /** Default foreground color for a window. */
       final static  Color            defForeground = new Color(0x000000);
                      /** Default background color for a field */
       final static  Color            fldBackground = new Color(0xFFFFFF);
                      /** Default background color for a button */
       final static  Color            btnBackground = new Color(0xF0E0E0);
       final static  Color            dkBackground = new Color(0xB0A0A0);
                      /** Larger font */
       final static  Font bold = new Font("Helvetica", Font.BOLD, 30);
       TreeSet members;
       String input;
       String[] found;
       public static void main(String arg[])
          UIManager.put("TextField.background",fldBackground);
          UIManager.put("TextField.foreground",defForeground);
          UIManager.put("TextField.selectionBackground",btnBackground);
          UIManager.put("TextArea.background",fldBackground);
          UIManager.put("TextArea.foreground",defForeground);
          UIManager.put("TextArea.selectionBackground",btnBackground);
          UIManager.put("Panel.background",defBackground);
          UIManager.put("Label.background",defBackground);
          UIManager.put("Label.foreground",defForeground);
          UIManager.put("Button.background",btnBackground);
          UIManager.put("Button.foreground",defForeground);
          UIManager.put("CheckBox.background",defBackground);
          UIManager.put("ScrollBar.background",defBackground);
          UIManager.put("ScrollBar.thumb",btnBackground);
          UIManager.put("ComboBox.background",btnBackground);
          UIManager.put("ComboBox.selectionBackground",dkBackground);
          PartMatch trial = new PartMatch(arg);
       public PartMatch( String [] arg )
          super("Part Match");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          Container cpane = getContentPane();
          FormLayout form = new FormLayout(cpane);
          JLabel lab1 = new JLabel("Fetch details") ;
          lab1.setFont( bold );
          form.setTopAnchor( lab1, 4 );
          form.setLeftAnchor( lab1, 4 );
          JLabel lab2 = new JLabel("Surname: ") ;
          form.setTopRelative( lab2, lab1, 4 );
          form.setLeftAlign( lab2, lab1 );
          namefld = new JTextField( 30 );
          form.setBottomAlign( namefld, lab2 );
          form.setLeftRelative( namefld, lab2, 4 );
          namefld.addCaretListener( new CaretListener()
             public void caretUpdate(CaretEvent e)
                 showMatches();
          quitbtn = new JButton( "Quit" );
          quitbtn.addActionListener( new ActionListener()
             public void actionPerformed(ActionEvent e)
                quitProcessing();
          form.setBottomAlign( quitbtn, namefld );
          form.setLeftRelative( quitbtn, namefld, 15 );
          results = new JTextArea( 10,50 );
          results.setEditable(false);
          JScrollPane jsp = new JScrollPane( results,
                                     JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                                     JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
          form.setTopRelative( jsp, lab2, 6 );
          form.setLeftAlign( jsp, lab2 );
          form.setBottomAnchor( jsp, 5 );
          form.setRightAnchor( jsp, 5 );
          form.setRightAnchor( quitbtn, 5 );
          matches = new Chooser( this );
          //matches.setUndecorated(true);
          pack();
          setVisible(true);
          namefld.requestFocus();
          if (arg.length > 0) init(arg[0]);
          else init("triathlon.txt"); //<<<<<<<<<<<<<<<< Place the default filename here
          /** Called once only, at the end of the constructor, to read the data
            * from the membership file.
       public void init( String fname )
          members = new TreeSet();
           try {
               FileReader fr = new FileReader(new File (fname));
               Scanner scan = new Scanner(fr);
               trimember cmem;
               String cLine, eTag, memberNo, first, last, gender, yob, tel ,addr,
                       club;
               while(scan.hasNextLine())
                   cLine = scan.nextLine();
                   Scanner scan2 = new Scanner(cLine);
                   scan2.useDelimiter(";");
                   eTag = scan2.next().trim();
                   memberNo = scan2.next().trim();
                   first = scan2.next().trim();
                   last = scan2.next().trim();
                   gender = scan2.next().trim();
                   yob = scan2.next().trim();
                   tel = scan2.next().trim();
                   addr = scan2.next().trim();
                   club = scan2.next().trim();
                   cmem = new trimember(eTag, memberNo, first, last, gender, yob,
                           tel, addr, club);
                   members.add(cmem);
           catch (FileNotFoundException ex)
               results.append("Sorry can't find the input file\n");
               results.append("Please check file name and location and try again");
               ex.printStackTrace();
          /** Called every time there is a change in the contents of the text field
            * namefld.  It will first clear the text area.  It then needs to search
            * through the container of data to find all records where the surname
            * starts with the characters that have been typed.  The names and
            * addresses need to be set up as strings and placed in
            * an array of Strings.  This can be placed in the "matches" window and
            * displayed for the user, inviting one to be selected.
            * <p>
            * The performance of this is very important.  If necessary, it may be
            * necessary to run as a separate thread so that the user interface is
            * not delayed.  It is essential that the user be able to type letters at a
            * reasonable speed and not have the keystroke processing held up by
            * previous text.
       public void showMatches( )
           run();
                // First clear the text area
          //results.setText("");
                // Determine the leading characters of the surname that is wanted
                input = namefld.getText();
                // Locate the data for this name, and display each matching item
                //  in the JTextArea ...
                // Example of how to set the data in the popup dialog
          matches.list.setListData(found);
          matches.pack();   // resize the popup
                // set the location of the popup if it is not currently visible
          if ( ! matches.isVisible())
             Dimension sz = matches.getSize();
             Point mouse = getMousePosition();
             Point framepos = getLocation();
             int x=0, y=0;
             if (mouse == null)
                Point pt = results.getLocation();
                x = pt.x + 20 + framepos.x;
                y = pt.y + 20 + framepos.y;
             else
                x = mouse.x - 2 + framepos.x;
                y = mouse.y - 2 + framepos.y;
             matches.setLocation(x,y);
          matches.setVisible(true);
          namefld.requestFocus();
          /** Perform any final processing before closing down.
       public void quitProcessing( )
          // Any closing work.  Then
          System.exit(0);
        public void run()
            ArrayList<String> foundit = new ArrayList<String>();
            System.out.println(input);
            if(input != null)
            Iterator it = members.iterator();
            while(it.hasNext())
               trimember test = (trimember) it.next();
               if (test.last.startsWith(input))
                   foundit.add(test.last +", "+ test.first);
            found = new String[foundit.size()];
            for(int i=0; i<foundit.size();i++)
                found[i] = foundit.get(i);
         /** A window for displaying names and addresses from the data set which
          match the leading characters in namefld.
          <p>
          This will automatically pop down if the user moves the mouse out of the
          window.
          <p>
          It needs code added to it to respond to the user clicking on an item in
          the displayed list. */
       class Chooser extends JWindow
                /** To display a set of names and addresses that match the leading
                characters of the namefld text field. */
          public JList list = new JList();
          Chooser( JFrame parent )
             super( parent );
             Container cpane = getContentPane();
             cpane.addMouseListener( new MouseAdapter()
                public void mouseExited(MouseEvent e)
                   Chooser.this.setVisible(false);
             cpane.add("Center",list);
             list.addListSelectionListener( new ListSelectionListener()
                public void valueChanged(ListSelectionEvent e)
                   Chooser.this.setVisible(false);
                   System.out.println("ValueChanged");
                   // First clear the text area
                   results.setText("");
                   String in = (String) list.getSelectedValue();
                   System.out.println("Selected Value was : "+in);
                   String[] inlf = in.split(", ");
                   System.out.println("inlf[0]:"+inlf[0]+" inlf[1]:"+inlf[1]);
                   results.append("Surname \tFirst \teTag \tMemberNo \tSex \tYOB " +
                           "\tTel \tAddress \t\t\tClub\n");
                   Iterator it = members.iterator();
                   while(it.hasNext())
                       trimember test = (trimember) it.next();
                       if (test.last.equals(inlf[0])&&test.first.equals(inlf[1]))
                           results.append(test.toString()+"\n");
                   namefld.requestFocus();
          public class trimember implements Comparable
           String eTag;
           public String memberNo;
           public String first;
           public String last;
           String gender;
           String yob;
           String tel;
           String addr;
           String club;
           public trimember(String eT, String me, String fi, String la,
                   String ge, String yo, String te, String ad, String cl)
               eTag = eT;
               memberNo = me;
               first = fi;
               last = la;
               gender = ge;
               yob = yo;
               tel = te;
               addr = ad;
               club = cl;         
           //To String method to output string of details
           public String toString()
               return last + "\t" + first + "\t" + eTag + "\t" +
                       memberNo + "\t" + gender + "\t" + yob + "\t"+ tel + "\t" +
                       addr + "\t" + club;
           //Compare and sort on Last name
           public int compareTo(Object o)
               trimember com = (trimember) o;
               int lastCmp = last.compareTo(com.last);
               int firstCmp = first.compareTo(com.first);
               int memCmp = memberNo.compareTo(com.memberNo);
               if (lastCmp == 0 && firstCmp !=0)return firstCmp;
               else if (lastCmp==0&&firstCmp==0)return memCmp;
               else return lastCmp;
    }

    Please don't cross-post. It is considered very rude to do that here:
    http://forum.java.sun.com/thread.jspa?messageID=9953193

  • Help needed creating vertical bullet list using div tag and css

    Hi,
    I think there is something quite fundamental that I'm missing when using div tags - I seem to keep running into problems with them.
    I'm trying to create a vertical bullet list. It works fine when I try the code on its own as follows:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    #techlistcontainer {
        /*list-style-type: square;*/
        position: absolute;
        top: 20px;
        left: 0;
        z-index: 2;
        width: 75%;
        margin-top: 0;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 30;
        padding-top: 0;
        padding-right: 0;
        padding-bottom: 0;
        padding-left: 30;
    #techlistcontainer ul {
      margin-top: 0;
      margin-left: 0;
      padding-left: 0;
      list-style-type: none;
      font-family: Arial, Helvetica, sans-serif;
    #techlistcontainer li {
        margin-bottom: 8px;
        list-style-type: circle;
        margin-left: 50px;
        padding-right: 30px;
    -->
    </style>
    <head>
    </head>
    <body>
    <div id="techlistcontainer">
    <ul id="techlist">
              <li>Java Messaging Service (JMS)</li>
              <li>Message Driven Beans </li>
              <li>Remote Session EJBs with multi-threading</li>
              <li>Message Oriented Middleware(MOS) such as Websphere MQ series, Mercator with SAP/ERP</li>
              <li>XML messaging</li>
              <li>CORBA (Common Object Request Broker Architecture), RMI (Remote Method Invocation)</li>
        </ul>
    </div>
    </body>
    </html>
    http://www.pa-solutions.co.uk/vertical_list.html
    When I insert that into my site template page, its all over the place:
    http://www.pa-solutions.co.uk/development.html
    I've put the css code into a seperate file http://www.pa-solutions.co.uk/pas.css - I get the same results when its embedded into the html doc.
    Please help before I pull all my hair out.
    Thanks,
    Phil.

    Unless you know what you're doing with absolute positioning, avoid absolute positioning! Absolute positioning actually takes an element out of the normal HTML document flow and positions it absolutely in relationship with it's first parent with a position other than static - for details read the HTML specs at the W3C.
    Ideally you should use the normal HTML document flow. Divs are block level elements meaning that they act like blocks that take up a height (determined by children content) and width (the full width of the page or it's parent container, unless you tell it otherwise).
    For your CSS try this:
    #techlistcontainer {
        width: 75%;
        margin-top: 0;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 30;
        padding-top: 0;
        padding-right: 0;
        padding-bottom: 0;
        padding-left: 30;
    How does that work with your templates?

  • Help needed creating a linked list program

    I have been trying to create a linked list program that takes in a word and its definition and adds the word to a link list followed by the definition. i.e. java - a simple platform-independent object-oriented programming language.
    the thing is that of course words must be added and removed from the list. so i am going to use the compareTo method. Basically there a 2 problems
    1: some syntax problem which is causing my add and remove method not to be seen from the WordList class
    2: Do I HAVE to use the iterator class to go thru the list? I understand how the iterator works but i see no need for it.
    I just need to be pointed in the right direction im a little lost.................
    your help would be greatly appreciated i've been working on this over a week i dont like linked list..........
    Here are my 4 classes of code........
    * Dictionary.java
    * Created on November 4, 2007, 10:53 PM
    * A class Dictionary that implements the other classes.
    * @author Denis
    import javax.swing.JOptionPane;
    /* testWordList.java
    * Created on November 10, 2007, 11:50 AM
    * @author Denis
    public class Dictionary {
        /** Creates a new instance of testWordList */
        public Dictionary() {
            boolean done=false;
    String in="";
    while(done!=true)
    in = JOptionPane.showInputDialog("Type 1 to add to Dictionary, 2 to remove from Dictionary, 3 to Print Dictionary, and 4 to Quit");
    int num = Integer.parseInt(in);
    switch (num){
    case 1:
    String toAdd = JOptionPane.showInputDialog("Please Key in the Word a dash and the definition.");
    add(toAdd);
    break;
    case 2:
    String toDelete = JOptionPane.showInputDialog("What would you like to remove?");
    remove(toDelete);
    break;
    case 3:
    for(Word e: list)
    System.out.println(e);
    break;
    case 4:
    System.out.println("Transaction complete.");
    done = true;
    break;
    default:
    done = true;
    break;
       }//end switch
      }//end while
    }//end Dictionary
    }//end main
    import java.util.Iterator;
    /* WordList.java
    * Created on November 4, 2007, 10:40 PM
    *A class WordList that creates and maintains a linked list of words and their meanings in lexicographical order.
    * @author Denis*/
    public class WordList{
        WordNode list;
        //Iterator<WordList> i = list.iterator();
        /*public void main(String [] args)
        while(i.hasNext())
        WordNode w = i.next();
        String s = w.word.getWord();
        void WordList() {
          list = null;
        void add(Word b)
            WordNode temp = new WordNode(b);
            WordNode current,previous = null;
            boolean found = false;
            try{
            if(list == null)
                list=temp;
            else{
                current = list;
                while(current != null && !found)
                    if(temp.object.getWord().compareTo(current.object.getWord())<0)
                        found = true;
                    else{
                    previous=current;
                    current=current.next;
                temp.next=current;
                if(previous==null)
                    list=temp;
                else
                    previous.next=temp;
                }//end else
            }//end try
            catch (NullPointerException e)
                System.out.println("Catch at line 46");
        }//end add
    /*WordNode.java
    * Created on November 4, 2007, 10:40 PM
    *A class WordNode that contains a Word object of information and a link field that will contain the address of the next WordNode.
    * @author Denis
    public class WordNode {
        Word object;//Word object of information
        WordNode next;//link field that will contain the address of the next WordNode.
        WordNode object2;
        public WordNode (WordNode wrd)
             object2 = wrd;
             next = null;
        WordNode(Word x)
            object = x;
            next = null;
        WordNode list = null;
        //WordNode list = new WordNode("z");
        Word getWord()
            return object;
        WordNode getNode()
            return next;
    import javax.swing.JOptionPane;
    /* Word.java
    * Created on November 4, 2007, 10:39 PM
    * A class Word that holds the name of a word and its meaning.
    * @author Denis
    public class Word {
        private String word = " ";
        /** Creates a new instance of Word with the definition*/
        public Word(String w) {
            word = w;
        String getWord(){
            return word;
    }

    zoemayne wrote:
    java:26: cannot find symbol
    symbol  : method add(java.lang.String)
    location: class Dictionary
    add(toAdd);this is in the dictionary class
    generic messageThat's because there is no add(...) method in your Dictionary class: the add(...) method is in your WordList class.
    To answer your next question "+how do I add things to my list then?+": Well, you need to create an instance of your WordList class and call the add(...) method on that instance.
    Here's an example of instantiating an object and invoking a method on that instance:
    Integer i = new Integer(6); // create an instance of Integer
    System.out.println(i.toString()); // call it's toString() method and display it on the "stdout"

  • Help needed creating GUI simulation

    Hello,
    I have created a 2d image showing a ship on waves. This is done using java2d. I output using JFrame.
    I now want to animate it so it moves along the frame size should remain the same but the ship should
    appear to move on water... I think time will be involved so the ship moves along the x axis...
    please can some one help how to animate this/simulate the ship moving
    currently i only have java2d image of a ship and waves..
    thanks

    moh_1_and_only wrote:
    please can some one help how to animate this/simulate the ship movingThis forum does poorly answering general and broad questions such as these. Also, this forum is not a site for tutorials as it is asking way too much of a volunteer. The best I can recommend is search here and on google for articles on java animation. You will get better answers and help here with more specific questions.
    Another tip: look into the Swing Timer class to help with the animation. You will likely need to use threading as well. If you're not up on this, I suggest the Sun Java Threading tutorials.
    Edited by: petes1234 on Dec 19, 2007 7:47 AM

  • Help needed - about change password page

    I had created a change password page and successfully connected to the access database via jdbc-odbc bridge. But, there are still some errors with the coding.
    The situation is like that: whether the NewPassword==ConfirmPassword or NewPassword!=CofirmPassword or both blank, there will always pop up a message dialog "The confirm password and new password must be same."(which I wrote in JOptionPane) and will not update the database that i had linked. I try to correct it but fail.
    Can somebody help me to correct the code below?
    Thank you!
    ========================================================================void jButton1_actionPerformed(ActionEvent e) {
    String userid = jTextField1.getText(); //UserName
    char[] passwd2 = jPasswordField2.getPassword(); //NewPassword
    char[] passwd3 = jPasswordField3.getPassword(); //ConfirmPassword
    try {
    connection = getDBConnection();
    if( passwd2 != passwd3 ){
    JOptionPane.showMessageDialog(null, "The confirm password and new password must be same.", "Change Password Fail", JOptionPane.INFORMATION_MESSAGE );
    jPasswordField2.setText("");
    jPasswordField3.setText("");
    else {
    String query = "UPDATE UserInfo SET Password = '"+ passwd2 +"' WHERE UserID='" + userid +"'";
    Statement statement = connection.createStatement ();
    ResultSet resultSet = statement.executeQuery( query );
    int result = statement.executeUpdate ( query );
    if ( result == 1 )
    JOptionPane.showMessageDialog ( null," Password successfully changed", "Password changed", JOptionPane.INFORMATION_MESSAGE );
    else {
    jPasswordField2.setText( " " );
    jPasswordField3.setText( " " );
    JOptionPane.showMessageDialog ( null,"Fail to change password.\n Please reenter the new password.","Fail", JOptionPane.INFORMATION_MESSAGE);
    catch (SQLException sqlex ){
    sqlex.printStackTrace();

    yup, i change as the code as u suggested..the change password page run success but got bugs as below. i don't know the reason. please correct me though the coding. thanks!
    ========================================================================
    java.sql.SQLException: No ResultSet was produced
         at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:255)
         at logintry.DataMiningFrame.jButton1_actionPerformed(DataMiningFrame.java:239)
         at logintry.DataMiningFrame$1.actionPerformed(DataMiningFrame.java:77)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
         at java.awt.Component.processMouseEvent(Component.java:3715)
         at java.awt.Component.processEvent(Component.java:3544)
         at java.awt.Container.processEvent(Container.java:1164)
         at java.awt.Component.dispatchEventImpl(Component.java:2593)
         at java.awt.Container.dispatchEventImpl(Container.java:1213)
         at java.awt.Component.dispatchEvent(Component.java:2497)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
         at java.awt.Container.dispatchEventImpl(Container.java:1200)
         at java.awt.Window.dispatchEventImpl(Window.java:914)
         at java.awt.Component.dispatchEvent(Component.java:2497)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

  • Help in creating a confirmation page

    i have created an application form in asp and would like new
    members to receive email telling them they have successfully
    registered and another to myself the administrator telling me that
    person x has registered. any assistance would be
    appreciated.

    Hi,
    I use CDOSYS to send email from my ASP. You will first need
    to check that your host allows this. It's the default now on
    Windows servers so there should not be an issue here.
    For more info look here:
    http://www.powerasp.com/content/new/sending_email_cdosys.asp
    You will then need to build your form, add validation as
    needed and build a 'thankyou.asp' page which you redirect to when
    the form has been submitted.
    The 'thankyou.asp' will include your various SMTP gateway
    authentication requirements and also the field names of your form
    so as to build your E-Mail.
    Something like this maybe:
    <%
    Dim objMail
    Set objMail = Server.CreateObject("CDO.Message")
    Set objConfig = Server.CreateObject("CDO.Configuration")
    'Configuration:
    objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort
    objConfig.Fields(cdoSMTPServer)="auth.smtp.hostname.co.uk"
    objConfig.Fields(cdoSMTPServerPort)=25
    objConfig.Fields(cdoSMTPAuthenticate)=cdoBasic
    objConfig.Fields(cdoSendUserName) = "mailbox_username"
    objConfig.Fields(cdoSendPassword) = "mailbox_password"
    'Update configuration
    objConfig.Fields.Update
    Set objMail.Configuration = objConfig
    objMail.From = Request("email")
    objMail.To = "[email protected]"
    objMail.Subject = "Details from My Form"
    objMail.HTMLBody = "<font size=2 face=verdana>"
    objMail.HTMLBody = objMail.HTMLBody & "<strong>"
    & "Contact Name " & "</strong>" &
    Request.form("name") & "<br>" & "<br>"
    objMail.HTMLBody = objMail.HTMLBody & "<strong>"
    & "Telephone Area Code " & "</strong>" &
    Request.form("telcode") & "<br>" & "<br>"
    objMail.HTMLBody = objMail.HTMLBody & "<strong>"
    & "Telephone Number " & "</strong>" &
    Request.form("telnumber") & "<br>" & "<br>"
    objMail.HTMLBody = objMail.HTMLBody & "<strong>"
    & "Email " & "</strong>" & Request.form("email")
    & "<br>" & "<br>"
    objMail.HTMLBody = objMail.HTMLBody & "<strong>"
    & "Message " & "</strong>" &
    Request.form("message") & "<br>" & "<br>"
    objMail.HTMLBody = objMail.HTMLBody & "Sent at " &
    Now() & "<br>" & "<br>" & "</font>"
    objMail.Send
    If Err.Number = 0 Then
    Response.Write(".")
    Else
    Response.Write("Sorry, There was an error processing your
    questionnaire. Please try again. Code: " & Err.Number)
    Err.Clear
    End If
    Set objMail=Nothing
    Set objConfig=Nothing
    %>
    Hope this helps some
    Jules

  • Help needed in Portal Search

    Hi,
    I have built a portal site using HTML Portlets and JavaPDK portlets, now I want to perform search on the contents. I have studied about oracle text and ultra search but could not find any clue how they interact with my dynamic JavaPDK portlet's contents that are coming from my self defined Database Tables.
    Further more when I put search box/ simple search portlet in my page and search for any content like 'portal' it shows me some data, but if I search my own keywords that I had defined in the page properties I coulnt find any result.
    Please help me in this regards.
    Thanks
    Jam

    No, Portal search will only find content which is added through the Portal UI (Item wizards etc) or through the content management API wwsbr_api. Pending on whether Oracle Text is enabled, the search facility will be able to search within documents, URLs. This is done through a set of Oracle Text indexes :
    - WWSBR_CORNER_CTX_INDX on WWPOB_PAGE$
    - WWSBR_DOC_CTX_INDX on WWDOC_DOCUMENT$
    - WWSBR_PERSP_CTX_INDX on WWV_PERSPECTIVES
    - WWSBR_THING_CTX_INDX on WWV_THINGS
    - WWSBR_TOPIC_CTX_INDX on WWV_TOPICS
    - WWSBR_URL_CTX_INDX on WWSBR_URL$
    Any content which is not added to these tables (e.g. a custom portlet which adds document to a custom table with a BLOB colum) will not be searchable through the standard search functionality.

  • Help needed in data type casting

    I have a java program which will receive data and its type in the String format. During program execution, the data in the String data has to be converted into the respective data type and assigned to a variable of that data type so that it could be used in the program. Programmer may not know the type of data that the value has to be converted into.
    I really got struck up with this. This is a RMI application and one process node is sending the data to another node in the String format and the type of data it should get converted into so that it can be converted into the respective type and used for computation.
    Can you understand what I am asking for ....if you can pls help and it is highly appreciated

    I dont know whether i ahve expressed it correctly
    look at this code
    dataPacket sendtoNode = send.senDatatoNode(inputReq);
    String recnodnum = sendtoNode.nodeNum;
    String recvarnum = sendtoNode.varNum;
    String recvartype = sendtoNode.dataType;
    String recvalvalue     = sendtoNode.dataVal;
    int num;     int type;
    double result;
    // here in this case the result variable type is double
    if (recvartype.equals("int")){
              type = 1;
         result = Integer.parseInt(recvalvalue); will pose problem
         else
         if (recvartype.equals("double")){
              type = 2;
              result = Double.parseDouble(recvalvalue);
         else
         if(recvartype.equals("float")){
              type =3;
              result = Float.parseFloat(recvalvalue); will pose problem
         else
         if(recvartype.equals("Boolean")){
              if ((recvalvalue.equals("true")) || (recvalvalue.equals("TRUE")))
              type = 4;
              result = Boolean.parseBoolean(recvalvalue); will pose problem
         else
         if(recvartype.equals("char")){
              type = 5;
              result = (char)recvalvalue; will pose problem
    else
    if(recvartype.equals("String")){
         type = 6;
              result = recvalvalue; will pose problem
         else
         if(recvartype.equals("byte")){
              type = 7;
              result = Byte.parseByte(recvalvalue); will pose problem
         else
         if(recvartype.equals("long")){
              type = 8;
              result = Long.parseLong(recvalvalue); will pose problem
         else
         if(recvartype.equals("short")){
              type = 9;
              result = Short.parseShort(recvalvalue); will pose problem
         //forvarval varvalue = new forvarval();
         //varvalue.forvarval(recvartype, recvalvalue);
    // this has to be done after sorting the problem of type casting string result = recvalvalue;
    //result = value; //<this will surely give me a problem as i m assigning string to double>??
    send.host(result);
    System.out.println("result received and the result is " +recvalvalue );
    now i need to assign the converted string in to a variable and use in the compuation ..thts where the challenge n not in teh conversion process...

Maybe you are looking for

  • How to Connect Airport Express to Existing Wireless Network (Client Mode)

    I am posting this for everyone tearing their hair out trying to connect the Airport Express to your own existing home wireless network. After spending 2 hours last night installing this on my father-in-law's home network, I hope to be able to save so

  • PO not created in Backend

    HI, My SRM Quality gets re-freshed and i am on ECS scenario, i change all the ALE settings and now i am able to create a Shopping cart but when PO is created in my SRM system it is not replicated in ECC quality and i can see my status of the Purchase

  • Network - Windows connecting to Mac printer.

    I'm having trouble getting Windows XP to print to the Mac shared printer - It says its getting the drivers, and then the printer shows up in options, but when I print to it, the printer just never prints. How do I get it to actually print? Brian

  • Cockpits and dashboards

    i've been looking at the "create sap bw dashboards and cockpits your users will love" presentation from this year's portals and bw conference. where can i find more information on these?? a couple of full examples would be fantastic. just the full we

  • Jquery + json generate html buttons with condition

    Hi all, My need is to generate buttons with conditions described in json. Help me please, I’m newbie. Here is my json code (it is valid, but does not work with html code below) :     "Caption": "Module caption",     "IconsDirectory": "C://Images/",