blackcompe's Profile User Rating: *****

Reputation: 1155 Grandmaster
Active Posts:
2,555 (0.74 per day)
05-May 05
Profile Views:
Last Active:
User is offline Yesterday, 08:03 AM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:
Expert In:

Latest Visitors

Icon   blackcompe has not set their status

Posts I've Made

  1. In Topic: java.sql.SQLException: No suitable driver found for jdbc/jspTotor

    Posted 23 Oct 2014

    Have you included the JAR file for the driver in the build path?
  2. In Topic: Keep selected options on form submit

    Posted 17 Oct 2014

    You simply need to generate a checked dropdown option if that particular option was one of the ones submitted in the form.

    	String[] opts = //... 
    	String[] selectOpts = request.getParameterValues("dropdownName"); 
    <select name="dropdownName">
    <% for(String o: opts) %>
    	<option value="<%=o%>" <%= Arrays.binarySearch(selectOpts, o) != -1 ? "selected" : "" %>>

    I'm not familiar with the specifics of the HTML you're using, but this should exemplify the logic.
  3. In Topic: Request Dispatcher forward and request attribute

    Posted 26 Sep 2014

    The request has the POST/GET parameter, so if you pass it to the dispatcher, it'll still be there (I think anyways). No need to use sessions. If you do however, it's:


    The session variable maintains its information throughout the entire browsing session.
  4. In Topic: use the data read from the file to create instances?

    Posted 10 Sep 2014

    I'd first work trying to read the lines of the file and printing them to the console. Use Scanner.hasNextLine. E.g.

    while(input.hasNextLine()) System.out.println(input.nextLine());

    Unfortunately, the file format is a bit ackward, so you need to do the following: for each iteration of the loop, read six lines and create a product from them.

    	Product p = new Product();
    	items[count++] = p;

    Edit: I didn't see the ProductLister class. Follow g00se's advice in combination with the code example above. I'd suggest using a list as well for simplicity if you can modify the lister class. You need to extend the lister class by declaring a subclass of it, or creating a anonymous class in the main method. E.g.

    class ProductInventory
    	public static void main(String[] args)
    		ProductLister lstr = new ProductListerImpl();
    	abstract class ProductLister
    		abstract void readProducts(String file);
    	class ProductListerImpl extends ProductLister
    		void readProducts(String file) { /* TODO */ }
  5. In Topic: Java game KeyListener not working in FSEM

    Posted 5 Sep 2014

    Have you reviewed the pre-existing solutions to this problem?

My Information

Member Title:
D.I.C Lover
Age Unknown
August 22
Programming, PC Hardware, Cars, Running, Basketball, Weight lifting, Good Music, Video Games
Years Programming:
Programming Languages:
Java, C\C++, HTML, SQL, MIPS Assembly, PHP, Javascript, Octave, Ruby, Java EE, Eclipse, CodeBlocks

Contact Information

Website URL:
Website URL  http://


Page 1 of 1
  1. Photo

    jon.kiparsky Icon

    11 Jul 2013 - 07:32
    Hey, good to see you again. Hope you've been well.
  2. Photo

    WolverineX Icon

    13 Nov 2012 - 12:20
  3. Photo

    vbabey Icon

    14 Aug 2012 - 21:21
    Thank you for your advice on file handling question I asked...
  4. Photo

    karniv0re Icon

    14 Apr 2012 - 21:24
    thanks man, if it wasn't for you pointing out that line in the exception message, i might have been stuck forever!!
  5. Photo

    smohd Icon

    31 Jan 2012 - 04:00
    Congratulation for the promotion, well deserved :)
  6. Photo

    jon.kiparsky Icon

    27 Dec 2011 - 08:26
    I've been meaning to say - good stuff in the Java forum. You know your stuff and you tell it well. It's a pleasure to read - keep it up.
  7. Photo

    anonymous26 Icon

    01 Oct 2011 - 12:46
    Excellent! :)
  8. Photo

    anonymous26 Icon

    28 Sep 2011 - 12:59
    Wow! We have the same birth date! Congrats on the Expert badge. :)
Page 1 of 1