Search:

Type: Posts; User: mstabosz

Page 1 of 5 1 2 3 4

Search: Search took 0.52 seconds.

  1. Having trouble doing simple text file IO with PrintWriter.

    Hey guys.

    I'm trying to learn how to do File I/O in Java, and just starting simply. I have a List of Strings that I want to write to a text file using PrintWriter. But it's not working. The...
  2. Oracle SQL query works in Oracle window, but not servlet.

    Hi all,

    I have a servlet I'm trying to write that does a query against an Oracle database. Having some trouble getting a query to work. Here's my query:


    SELECT client_id, account_name,...
  3. Problem with PreparedStatement in Struts2 web servlet.

    Hi all.

    Trying to update a database inside a servlet. For some reason, it just will not execute. Below is the method. It's a little cluttered because of all the println statements I put in for...
  4. Re: Having trouble understanding Struts 2 Interceptors, and retrieving parameters.

    I think I figured part of this out. With a few System.out.println calls, it looks like it's NOT doing these things simultaneously. It calls setParameters first, then calls execute.

    Still don't...
  5. Having trouble understanding Struts 2 Interceptors, and retrieving parameters.

    Hi guys.

    I have a web application, a sort of fake bank. The whole details of the application are unimportant. It was working great with plain old servlets and JSP. I am trying to learn Struts 2...
  6. Re: I have a bit of a design question about 4 methods common to 2 classes.

    Hmmmm. Did a little research on Delegation. Hard to follow, and it seems a little convoluted. I'll give it a shot.
  7. Re: I have a bit of a design question about 4 methods common to 2 classes.

    Ooh I read up on delegation somewhere not too long ago. From what I remember it was kind of a wild concept but interesting. Thanks for the lead.
  8. I have a bit of a design question about 4 methods common to 2 classes.

    So I'm writing these servlets (important detail). It's supposed to handle logins for a fictional banking system. I have 4 methods: checkApprovalStatus(), showApprovedStatus(), showDeclinedStatus(),...
  9. Re: How to determine value after nested for loop

    I'm trying to kill some time while waiting for my DVR to catch up so I don't have to sit through commercials, so here is an unusually thorough answer.
    -----

    Where did you get the answer of 9?
    ...
  10. [SOLVED] Re: Trying to write a servlet, keep getting 404 errors in web browser.

    Disregard (dunno if anyone read this). I figured this out. Turns out you can only have one WEB-INF within a folder no matter how many different other folders within that folder.
  11. [SOLVED] Trying to write a servlet, keep getting 404 errors in web browser.

    Hey guys,

    I'm usually pretty good with this stuff, but Servlets are kicking my ass. The logic all seems straightforward enough, but I can't figure out the environment.

    Here's my setup: running...
  12. Re: Creating a static method that requires no arguments and returns no values.

    You shouldn't call a function outside the body of a function (which you did on line 3). You've also left your main function completely empty so your program won't do anything.

    Also, don't put a...
  13. Re: Creating a static method that requires no arguments and returns no values.

    That 2nd try is a little closer, but that call to displayinfo(); is just sorta hanging out in the top of the class where the variables and method definitions go. There's no way to reach it and I...
  14. Re: How do I just read a users input back out to them?

    Your code looks okay but it's all out of order. You're sorting the array, then printing it twice after the sort. When you run the array through that sorting loop, you're completely changing the...
  15. Re: i need someone to please help me with this java assignment, i am taking it this semester

    What do you have so far?

    Try working out this problem on pen and paper if you need some help figuring out the logic and how to begin. If you have some specific questions on Java syntax or are...
  16. Replies
    6
    Views
    298

    [SOLVED] Re: how convert everthing to private

    You shouldn't have your package declaration inside the body of a class. Also you shouldn't have it twice.

    To change things to private, just precede them with the private keyword instead of...
  17. Replies
    4
    Views
    283

    Re: Need Homework Help Please

    Do you know how to declare variables?
    Do you know how to assign values to them?
    Do you know how to take in input from the user?
    Do you know how to do math operations? How would you go about...
  18. Replies
    4
    Views
    352

    Re: Question on While Loops

    Like they said, you gotta remove the semicolon. But even when you do that, your code will probably not have the result you intended. It should go from printing out the number "1" to having no...
  19. Replies
    4
    Views
    344

    Re: Help in java code

    I've been studying web development too. I pick up the back end stuff pretty quickly but front end always gives me trouble. HTML and CSS aren't really tough but I feel like good front end stuff...
  20. Re: Socket program that worked in the past no longer working, cannot open socket.

    Ok. Attaching a simple WindowListener got this all working correctly. I'm not crazy about the clutter caused by the 6 other methods the interface requires me to implement, but it is what it is. ...
  21. Replies
    5
    Views
    468

    Re: NullPointerException on JButton.setIcon.

    Ok got it working. Thanks Norm and Copeg.
  22. Replies
    5
    Views
    468

    Re: NullPointerException on JButton.setIcon.

    I thought the statement JButton[] handButton = new JButton[13]; instantiated them. I guess I was wrong. I always screw up with object array. Blech. So I oughtta throw something like handButton[i]...
  23. Replies
    5
    Views
    468

    NullPointerException on JButton.setIcon.

    Wasn't sure which subforum to put this in. It feels like it crosses a couple different aspects of Java.

    So I have these two classes that I wrote a few months back. The Card class represents a...
  24. Re: Socket program that worked in the past no longer working, cannot open socket.

    Hmm. Is there a better way? The System.exit(0) statement is inside that catch block. If it hits that, there are no other statements to execute, so it wouldn't do anything. But if I got rid of the...
  25. Re: Socket program that worked in the past no longer working, cannot open socket.

    Hmmm...

    Earlier today tried the May export and the (newer) October export on a third computer and they both worked. Just now tried both on this computer, and they both worked. Then closed them...
Results 1 to 25 of 115
Page 1 of 5 1 2 3 4