I could be helpful to include the java generated code that's failing

Cheers,


Tammam Al-Hamwy



Ralph Eddy <[EMAIL PROTECTED]> on 04/20/99 03:52:03 PM

Please respond to "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Tom Al-Hamwy/Toronto/IBM)
Subject:  JSP Casting Problem





I am using JRun 2.2.1 on NT with IIS.

After the user logs in I create an object called UserInfo and store this
object in the session.
    UserInfo info = new UserInfo(userCode, userName);
    session.putValue(UserInfo.USER, info);

After other events I sendRedirect to a jsp file called Customer_List.jsp
JRun creates Customer_List.java and attempts to compile it but gets a
Casting exception at the fourth line below:
    <%UserInfo info = new UserInfo();
    <%HttpSession session = request.getSession(false);
     if(session!=null) {
        info = (UserInfo)session.getValue(UserInfo.USER);   <<<<<<<<<<<<
error <<<<<<<<<<<
     } %>

UserInfo.USER is public static final String.
I am doing this successfully with casting String.

If I open Customer_List.java and compile it I do NOT get casting errors.

Thanks

Ralph Eddy
tel 415.383.4924
fax 415.383.6560
mailto:[EMAIL PROTECTED]

___________________________________________________________________________
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