error with jsp:forward and null session

Discussion in 'Java' started by Zambien, Apr 14, 2004.

  1. Zambien

    Zambien Guest

    I am having an issue with a session bean in my app. In the following
    code, if I type the name of the jsp in my browser and go directly to
    it after logging in everything works as expected, however if i use a
    response.sendRedirect or a jsp:forward tag the page can't find the
    session bean (it comes back as null). Any ideas? I'm running in WSAD
    5.0.1 in WAS 4.0 test server


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
    <%@ taglib uri="/WEB-INF/tlds/amarda-logic.tld" prefix="ifLogic"%>
    <%@ page import="com.trp.oam.common.property.PropertyUtils" %>
    <%@ page import="com.trp.oam.presentation.Constants" %>

    <jsp:useBean id="viewBean"
    class="com.trp.oam.presentation.viewbean.LoginViewBean"
    scope="session" />

    <html>
    <head>
    <title>T. Rowe Price Online Access - Investment Election</title>
    <script language="javascript1.1" src="js/ua.js"></script>
    <script language="javascript1.1" src="js/styleLF.js"></script>
    </head>

    <body bgcolor="#ffffff" link="#000000" alink="#000000"
    vlink="#000000">
    <br>

    <table width="400" border="0" cellspacing="0" cellpadding="0">
    <tr><td><img src="images/error_head.gif" width=50 height=15 border=0
    alt="Error"></td></tr>
    <tr><td><IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=15 BORDER=0
    ALT=""></td></tr>
    </table>

    <bean:write name='viewBean' property='planNum'/>

    <table width="400" border="0" cellspacing="0" cellpadding="0">
    <tr><td><img src="images/orange_dot.gif" width=400 height=1
    border=0></td></tr>
    <tr><td><img src="images/spacer.gif" width=400 height=10
    border=0></td></tr>



    <tr><td colspan="3"><img src="images/spacer.gif" width=400 height=10
    border=0></td></tr>
    <tr><td colspan="3"><img src="images/spacer.gif" width=400 height=10
    border=0></td></tr>
    <td colspan="3"><img src="images/orange_dot.gif" width=400 height=1
    border=0></td></tr>
    <tr><td colspan="3"><img src="images/spacer.gif" width=400 height=10
    border=0></td></tr>

    </table>

    </body>
    </html>
    Zambien, Apr 14, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mladen Adamovic
    Replies:
    3
    Views:
    4,149
    Mladen Adamovic
    Nov 16, 2003
  2. ohaya
    Replies:
    0
    Views:
    4,079
    ohaya
    Jun 30, 2005
  3. Replies:
    5
    Views:
    26,517
    Mike Schilling
    Mar 29, 2006
  4. qazmlp
    Replies:
    1
    Views:
    586
    Jonathan Turkanis
    Feb 15, 2004
  5. Replies:
    0
    Views:
    4,338
Loading...

Share This Page