Re: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Adam Hardy
Rats, the thread broke, hence my other reply. Like everyone says, you need to check the return value of getRemoteUser() - try looking at the value of the hidden field in the HTML via IE's 'Show page source'. On 12/08/2003 11:55 PM Caroline Jen wrote: I pass two hidden fields: username and

Re: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Paul Thomas
On 09/12/2003 01:29 Caroline Jen wrote: I use container-managed authentication. In which case, why don't you get the user name using request.getUserPrincipal().getName() ? -- Paul Thomas +--+-+ | Thomas Micro Systems Limited

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
Hi, I think that we are in different time zones. As you have mentioned, I, too, suspected that the statement in my JSP: request.getRemoteUser(); returns nothing. Therefore, I did a test in my JSP. In addition to request.getRemoteUser(); I created another String manually: req:isUserInRole

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Richard Yee
Caroline, In your FindEditorData.java class, is the value for your username variable null or null? If it is null, then you are reading the wrong request parameter since request.getParameter() will return null if the parameter doesn't exist. If the String value is null, then you have a problem

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
I do not fully understand what you say about null or null. Anyway, I did try to write out values in the FindEditorData.java. What is written out in the browser is: name=null; kn=journal_category; kv=null And the way I try to write out those crucial fields is shown below: // package and import

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Richard Yee
Caroline, As a sanity check, in your bean, initialize the username variable to something ie. XX. and re-run your app. This will show if your setUsername is ever called. -Richard --- Caroline Jen [EMAIL PROTECTED] wrote: I do not fully understand what you say about null or null. Anyway, I

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
I followed your advice. In the Bean.java, I did the following: private String username = natalie; public String getUsername() { return this.username; } public void setUsername(String username) { this.username = username; } and I compiled all the relevant

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-09 Thread Caroline Jen
I did another test. I took out those data access activities in the FindEditorData.java and ran the application. The conclusion is that those few lines of data access activities have nothing to do with the value of the 'username' becoming null in the FindEditorData.java. -Caroline --- Richard

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Yee, Richard K,,DMDCWEST
Caroline, Are you having problems with the username or the keyName hidden variable? If it is the username, then I'd suspect that request.getRemoteUser() in your JSP is returning null. Regards, Richard -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Monday,

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Caroline Jen
I pass two hidden fields: username and keyName at the same time. The keyName is passed and with the correct value in it. The username is passed but its value turns out to be a null. It is impossible for request.getRemoteUser(); in my JSP returning a null. (see code below) Before it reaches

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Yee, Richard K,,DMDCWEST
Caroline, Imposible? Look at the HTML that is generated by the JSP page. I think you will see that it returns null. Take a look at the JavaDoc for HttpServletRequest.getRemoteUser(); getRemoteUser public java.lang.String getRemoteUser() Returns the login of the user making this request, if the

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Caroline Jen
I use container-managed authentication. --- Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] wrote: Caroline, Imposible? Look at the HTML that is generated by the JSP page. I think you will see that it returns null. Take a look at the JavaDoc for HttpServletRequest.getRemoteUser();

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Richard Yee
Caroline, Did you check the result of getRemoteUser(). Does it return null or null? If so, it's not a problem with your hidden form variables,. -Richard At 05:29 PM 12/8/2003, you wrote: I use container-managed authentication. --- Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] wrote: Caroline,

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Richard Yee
Caroline, Why are you passing the result of request.getRemoteUser() in a hidden variable anyway since it is available as part of the HttpRequest and thus will be available in the action class? -Richard At 02:55 PM 12/8/2003, you wrote: I pass two hidden fields: username and keyName at the same

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Caroline Jen
I must pass the result of request.getRemoteUser() because it is a Java class that receives the hidden field. If you read my code carefully, you will see that FindEditorData.java is a Java class and I cannot use 'request' or 'session' in a Java class. It takes a servlet or a class extends Action

RE: Please Help! Unable to Pass A Hidden Field To scaffold.Proces sAction

2003-12-08 Thread Richard Yee
Caroline, What is the return value of getRemoteUser() ? -Richard At 07:38 PM 12/8/2003, you wrote: I must pass the result of request.getRemoteUser() because it is a Java class that receives the hidden field. If you read my code carefully, you will see that FindEditorData.java is a Java class and