For me, clicking on "Standard Area Page: took me to the page with "SoA site
- Standard area...". It seems to work ok.
 

Thanks
 
-- pady
[EMAIL PROTECTED]
 

-----Original Message-----
From: w i l l i a m b o y d [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 23, 2004 12:57 AM
To: [EMAIL PROTECTED]
Subject: HELP: applet-to-action anomaly

hi,

please can someone help? i am building a struts 1.1 based web app using 
j2sdk1.4.2, tomcat 4.0.6. i'm using a 3rd-party tree applet for site 
navigation (a constraint specified by the client). i've got an action which 
can be accessed with this uri:

http://www.thefreelancer.net:8080/soa/jsp/enterAreaToRead.do?areaid=3

if you attempt to load this uri directly into your browser (i'm testing with

msie 6.0 on win xp home) then, as expected, the action fails, and forwards 
to a dummy error page placeholder letting you know that you haven't logged 
in yet. that is what should happen if you try to enter the area without 
having logged in.

i've got another dummy page where you can see this 3rd-party navigation 
applet i mentioned:

http://www.thefreelancer.net:8080/soa/jsp/mockups/index.jsp

for testing, within a scriptlet inside index.jsp, i've simulated a logged-in

user by instantiating a user bean and putting 

this user bean in the session when this index.jsp page loads. to verify that

this user bean is, in fact, in the session, i write out the user bean's 
email address at the very bottom of the page (the bit in red that 
says, "there is a reader in the session: bebop-at-propelnewmedia.com"). 

the navigation applet reads in a text file that contains the links needed to

render the nodes. i've set the "Standard Area Page" node to point at the 
enterAreaToRead.do?areaid=3 action:

The Society
    |
    + Groups
        |
        |_Lorem Ipsum
        |
        + BRG
        | 
        + PCG
        |
        + UMSIG
            |
            |_ Standard Area Page <-- points to action
            |
            |_ Lorem Ipsum
            |
            |_ Lorem Ipsum
            |
            |_ Lorem Ipsum
            |
            |_ Lorem Ipsum
        

the problem is: under certain conditions, loading the index.jsp page, then 
clicking on the "Standard Area Page" node in the applet takes you to the 
error page when it shouldn't. it shouldn't because the action should only 
forward to that error page 

if there is no user bean in the session. but there *IS* a user bean in the 
session which is verified by the presence of the bean's email address which 
i pull out of the session at the very bottom of index.jsp. this is how to 
reproduce the problem:

1) *FIRST* load
http://www.thefreelancer.net:8080/soa/jsp/enterAreaToRead.do?
areaid=3. you should be taken to the error page.

2) then, load http://www.thefreelancer.net:8080/soa/jsp/mockups/index.jsp. 
you can see that the user is "logged in" by the 

message at the very bottom of the page.

3) then click on the "Standard Area Page" node of the navigation applet on 
the left-hand side of the page. if you've done the steps in the above order,

then you will have been forwarded to the error page (which isn't suppose to 
happen because you are "logged in").

the curious thing is: also at the very bottom of the index,jsp page is 
an "Enter Area" link (rendered by an "html:link" tag) that points to the 
exact same action that the applet points to. the action forwards correctly 
if you click on this link. 

also, the applet's "Standard Area Page" link to the action will also work 
correctly, *BUT ONLY IF* index.jsp is the first page loaded. i suspect that 
it is something to do with the applet not knowing about the session for some

reason. short of recoding the 

applet by having it append the session string to the uri via a passed-in 
parameter, is there some other - more straight forward (struts-specific 
maybe) -  way around this problem that you know of?

thanks in advance for your help.

--
Open WebMail Project (http://openwebmail.org)
------- End of Forwarded Message -------


--
Open WebMail Project (http://openwebmail.org)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to