Search:

Type: Posts; User: jaltaie

Search: Search took 0.20 seconds.

  1. Re: Using session atttributes and DAO class to delete mySql user records

    Here's what I figured out so far:

    - The session attribute value for the list of users is called ('users"), which is set in the DisplayUsersServlet which returns an ArrayList of users (I tried...
  2. Re: Using session atttributes and DAO class to delete mySql user records

    The user logged on does have admin permission. This is what I'm trying:



    package user;

    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
  3. Re: Using session atttributes and DAO class to delete mySql user records

    Correct I want to delete a particular user not the logged in user. The logged in user is the admin.



    From the above do you mean that I don't even need to get or set the session attribute? Just...
  4. Re: Using session atttributes and DAO class to delete mySql user records

    Workflow looks something like this:

    UserDisplayServlet ---> user.jsp(lists a bunch of users) ---> 2 sets hyperlinks calling 2 separate actions for each user listed (update and delete)

    --->...
  5. Re: Using session atttributes and DAO class to delete mySql user records

    This is very useful to know but I still don't understand. What I'm creating here is actually an admin application. So the session attribute is set when the admin logs in and views a list of users...
  6. Re: Using session atttributes and DAO class to delete mySql user records

    Are you saying I have to set and get the session attribute in the same servlet? What if I want to use the session attribute that was set in a prior servlet? For example:




    package user;
    ...
  7. Re: Using session atttributes and DAO class to delete mySql user records

    Sorry if I wasn't clearly. My question is how can I correctly pass the user object so that the UserDB.delete methods functions correctly?

    Line 27 is: user.setEmailAddress(emailAddress);
    ...
  8. Re: How to retrieve an object from a session attribute

    Great. I tried this in a similar post which I posted today. Cut down on the code content too. Please let me know if this is more consistent with your site rules (would also be great to get a response...
  9. Using session atttributes and DAO class to delete mySql user records

    I'm trying to write a form that deletes users from a database using emailAddress as primary key. I'm stuck on how to set the user object. Do I create a new user object (User user = new User())? Do I...
  10. Replies
    2
    Views
    2,752

    Re: Dynamic Web Project in java

    I have three suggestions which might help:

    - Generally speaking META-INF is an internal Java Metadata directory (Metadata implies data about data). Unless you're using Spring, META-INF will be...
  11. Re: How to retrieve an object from a session attribute

    Noted. Thanks so much for the response. Does bold work in the code=java tag?
  12. Re: How to retrieve an object from a session attribute

    Thanks, but can you please tell me if I'm posting in the right forum since I don't seem to be getting responses to my posts. For example, I now have another question concerning writing DELETE pages...
  13. Re: How to retrieve an object from a session attribute

    Once again I'm solving this myself and I'll post the fix:

    In the UpdateUserServlet the creation of a new user object (User user = new User()) should be replaced with a user object that calls the...
  14. How to retrieve an object from a session attribute

    I'm working on an application which update the values in a list of users stored in a mySql DB. The application starts with a users.jsp which lists the users in the DB. You then click the Update link...
  15. Replies
    3
    Views
    1,226

    Re: nested while loop

    Let me know if this works for you:
  16. Re: access denied IOException when trying to read mp3 file on C drive

    What is the I/O exception you are getting? Can you please provide a stack trace?
  17. Re: Unable to retrieve values from mySQL using JSP MVC application

    OK no response but I solved it myself. The solution is quite simple. The 'user' object passed in the application should have consistent naming. For example the 'user' object in the DAO. Instead of...
  18. Unable to retrieve values from mySQL using JSP MVC application

    I'm testing a JSP MVC application on Netbeans 731. This is an admin application which simply queries a mySql DB and returns a list of users. The application starts with index.jsp where the user...
  19. Thread: Introduction

    by jaltaie
    Replies
    2
    Views
    967

    Introduction

    Hi,

    I"m new to this forum. It looks great and just what I need to help solve the occasional frustrations of coding. I'm an intermediate Java programmer just getting ready to take my Oracle OCA...
Results 1 to 19 of 19