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...
Type: Posts; User: jaltaie
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...
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.*;
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...
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)
--->...
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...
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;
...
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);
...
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...
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...
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...
Noted. Thanks so much for the response. Does bold work in the code=java tag?
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...
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...
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...
Let me know if this works for you:
What is the I/O exception you are getting? Can you please provide a stack trace?
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...
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...
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...