Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. meadandale

    socket wont connect to other computers

    I'm not sure why you are reinventing the wheel. Java already supports using a hostname or IP address in the net/nio classes. Perhaps your address class is buggy?
  2. meadandale

    Cannot receive Socket I/O more than once

    You should never process sockets on the same thread you are listening on. You should always spawn another thread to handle the socket you receive from .accept().
  3. meadandale

    Performance question

    This is datastructures and algorithms 101. A hashtable is guaranteed O(1) lookup. A list is O(N). While you might be able to find an item in a list quickly, as N grows, so does your worst case performance (e.g. you are looking for something that is at the end of the list). A hashtables speed...
  4. meadandale

    Array in properties file (ClassCastException error)

    Properties files can't have more than one key with the same name. End of story. You can't define a string array in a properties resource bundle. YOu need to create a new implementation of resourcebundle that binds a string array to your given key.
  5. meadandale

    JSP!!!

    [thumbsup2]
  6. meadandale

    Initializing object with parameters

    And to followup up petes comment, jsp's and server side programming in general ar ADVANCED topics. If you are this green, stick to basic console apps until your skills and understanding of Java and OO have improved.
  7. meadandale

    JSP!!!

    Just stick your jars in the WEB-INF/lib folder of your webapp. The server will find them automatically.
  8. meadandale

    The 9-1 versus 1-9 theory

    Hand your manager a copy of The Mythical Man Month by Fred Brooks and make sure that he/she reads it.
  9. meadandale

    Interface Vs Abstract Classes

    doGet and doPost are not requests--they are methods in the HttpServlet class to handle these two HTTP request types. The basic difference is, form parameters are sent in a GET as part of the request URL. In a POST, they are sent in the request body.
  10. meadandale

    WeakReferences and garbage collector...

    Well, how can the GC remove the WeakReferences when the hashset still has strong references to them? This violates the invariant that the GC must obey that any object that is strongly reachable can never be garbage collected. What you are looking for can be resolved by using the ReferenceQueue...
  11. meadandale

    Cast Object[] to String[]

    If the Object array IS a String array, yes, you can cast it. If was instantiated as an Object array or an array of some type other than String then, no, you cannot cast it.
  12. meadandale

    Fatal Error: missing resource: java.util.PropertyResourceBundle

    Is that the whole exception? Usually when you get a missing resource exception when using a ResourceBundle it is because one of the resources (e.g. properties) that you are trying to access isn't found in the property file. Read up on the RB api--it is pretty clear.
  13. meadandale

    anyone've read the art of computer programming? help

    "First of all, about algorithm, pre/post conditions, invariants and such things. Do we need this for writing a program?" Yes. You need to be thinking of these things when you are programming. You should document your functions/methods with this information as it clearly states what...
  14. meadandale

    ArrayList method and casting?

    Actually, it should be: Object obj = list.get(i); String myString = (String)obj; outFile.write(myString); However, since every object has a toString method, this is much simpler: outFile.write(list.get(i).toString());
  15. meadandale

    date add() does not return correct year

    Show us the code.
  16. meadandale

    Date input

    SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy"); DateFormat df2 = DateFormat.getDateInstance(DateFormat.FULL); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String input; System.out.print("Enter date as MM/dd/yyyy:"); input =...
  17. meadandale

    Date input

    Sure, we can provide help. What are you trying to do, EXACTLY?
  18. meadandale

    ArrayList and casting

    You need to close the file when you are done writing.
  19. meadandale

    HttpURLConnection (501) problems

    Use GET instead of POST and change your url to this: String urlstring = "http://www.google.com/search?"; urlstring += parameters;
  20. meadandale

    Want to interact with a website

    You will have to explicitly set the session identifer in the header everytime that you reconnect.

Part and Inventory Search

Back
Top