I've spent several days searching the archives and the web looking for
information and haven't been able to find a clear solution for my problem.
So, I am going to outline what it is I need to do, identify the problems and
the possible solutions I have been able to come up with, and see if anyone
else out there has implemented this sort of thing or if anyone has any ideas
about the best way to go about it. I apologize in advance for how long
winded this post is.

Here is what I am trying to do:

        I am building a web app that will use Flash as the front end. The entry
point for the web application needs to be an action that the Flash movie
will be posting XML data to. I would like to have some way of keeping track
of the session but I could work around that by having login information sent
each of the 2 times that the Flash movie needs to communicate to the server.

So far, I have an action, logon.do, that receives the post from the Flash
movie, gets the XML data out of the request body, parses it, and passes the
data on to a business logic bean that validates the username and password.
Logon.do will then forward to a jsp that will generate the XML for the
response to the Flash movie. The Flash movie will then present the end user
with some forms, validate all the data and build an XML document that will
be posted back to another action (processXml.do). After processXml.do
validates and stores the data, it will generate an XML document containing
success/fail and/or error information.

Here are the problems:

- I would like logon.do to be the default entry point to my web application.
However, I understand that there is no way to set the welcome-file to an
action. I've tried using both logic:redirect and logic:forward in an
index.jsp that is mapped as the welcome-file in my web.xml. The problem here
is I want to send a post to http://myserver/myapp/ and have it forwarded to
logon.do with the original post data intact. Neither of these forwarding
methods seem to maintain the body of the original request.

I have never used filters but I looked into them a little bit and it seems
like there might be a way to set up a filter that mapped to all requests for
"/" and checked the request body for the required data, and forwarded to
logon.do. Has anyone done anything similar to this with filters? If so can
you point me to resources to learn how to do it myself? And, if so, are
filters the best solution for this problem or are there better practices?

The only other way that I can see around it is to ensure that all the client
Flash applications post directly to logon.do, have index.jsp forward to
logon.do, and logon.do return an error page if no XML data is found in the
body of the request.

- The second problem involves tracking the session. Flash's
XML.sendAndLoad() method isn't HTTP aware and there aren't any methods for
setting header info for the request. So, how to track the session id?  Could
I get the session id from the session that was created in the intial call to
logon.do and then send that id back to the flash movie in the xml response,
then have the flash movie include the session id in the post to
processXml.do which would parse the XML retrieve the correct session id and
then retrieve the session some how? - is there a way to look up a session by
id now that HttpSessionContext is deprecated?

Thanks in advance for taking the time to read this and thanks in advance for
any help you might provide,

-j



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

Reply via email to