Don't you need 2 references for the API?  Otherwise you would be referencing
the same object, which is why he was getting the NULL for a return in the
first place?

Mark

This email scanned with Norton AntiVirus 2002


----- Original Message -----
From: "Vishweshwar, Ghanakota" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 8:10 PM
Subject: Re: Communication between JSP and servlets


> This one creates two String object instances, where as the earlier one
> creates only extra reference.
> how about (Object)"No Error Message"?
> sorry for nitpicking!
>
> vishu
>
> > -----Original Message-----
> > From: Colin Capriati [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, December 18, 2001 4:38 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Communication between JSP and servlets
> >
> >
> > For brevity you could also try:
> >
> > application.setAttribute("errorMessage",new String("NO Error
> > Message"));
> >
> > Colin
> >
> > ----- Original Message -----
> > From: "Mark Galbreath" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 18, 2001 12:51 PM
> > Subject: Re: Communication between JSP and servlets
> >
> >
> > > Look at the API - setAttribute() takes a String and an Object, not 2
> > > Strings.  Try something like:
> > >
> > > String errorMessage = "NO Error Message";
> > > application.setAttribute( "errorMessage", errorMessage);
> > >
> > >
> > > Cheers!
> > > Mark
> > >
> > > -----Original Message-----
> > > From: Jim Lindsay
> > > Sent: Tuesday, December 18, 2001 2:49 PM
> > >
> > > I am not able to get session or application scope tracking
> > to work for
> > some
> > > reason.  Currently the code is trying to use
> > > application tracking, but I know I should be using session
> > tracking for
> > > items that are for the user session.
> > >
> > > In my userLoggidIn.jsp page I have:
> > >        Error Message = < <%=
> > application.getAttribute("errorMessage") %> >
> > >
> > > In my servlet I have:
> > >        application.setAttribute("errorMessage", "NO error message");
> > >
> > > esponse.sendRedirect(
> > response.encodeRedirectURL("/userLoggedIn.jsp");
> > >
> > > The output is *always*: "Error Message = < null >".  What
> > the heck am I
> > > doing wrong?
> > >
> > >
> > ______________________________________________________________
> > _____________
> > > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the
> > body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives:
> > http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources:
> > http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > >
> > >
> >
> > ______________________________________________________________
> > _____________
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
> > http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> >
>
> "MMS <firstam.com>" made the following
>  annotations on 12/18/01 17:11:12
> --------------------------------------------------------------------------
----
> "THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE
ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS
MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS MESSAGE IN
ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND
ALL COPIES OF IT FROM YOUR SYSTEM."
>
>
============================================================================
==
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to