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, December
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 requ
db lookup) then the server
doesn't know about the user being authenticated and will return null.
Regards,
Richard
-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 2:56 PM
To: Struts Users Mailing List
Subject: RE: Please Help! Unable
r
> doesn't know about the user being authenticated and
> will return null.
>
> Regards,
>
> Richard
> -Original Message-----
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2003 2:56 PM
> To: Struts Users Mailing List
> Subject: RE:
,
>
> Richard
> -----Original Message-----
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2003 2:56 PM
> To: Struts Users Mailing List
> Subject: RE: Please Help! Unable to Pass A Hidden
> Field To scaffold.Proces
> sAction
>
>
> I pass
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
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 Acti
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
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 keyNam
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
; doesn't know about the user being authenticated and
> will return null.
>
> Regards,
>
> Richard
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2003 2:56 PM
> To: Struts Users Mailing List
> Subject: RE: P
> > Returns: a String specifying the login of the user
> > making this request, or
> > null
> >
> > As the JavaDoc says: "Whether the user name is
> sent
> > with each subsequent
> > request depends on the browser and type of
> > authentication." Ar
Returns the login of the user making this
> request,
> > > if the user has been
> > > authenticated, or null if the user has not been
> > > authenticated. Whether the
> > > user name is sent with each subsequent request
> > > depends on the browser and
> &
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". Any
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 cla
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 Yee
16 matches
Mail list logo