Hi Gustavo,

You can use existingSession() to check that a session ID has been passed in and is valid:

Session session = (Session) existingSession();

// If you didn't get a valid session.
if(session == null)
        return null;

This assumes that you don't create sessions for non logged in users. - You need to be careful here as you can accidentally create a session when you fetch data.

Rob.


On 5 Oct 2009, at 11:10, Gustavo Pizano wrote:

aha ok, I know now how to call the DA using  
http://$HOSTNAME/cgi-bin/WebObjects/$APPNAME.woa/wa/$DIRECTACTIONNAME

link.. hehhe. now I have realize I a have a security HOLE! in my app with one direct action that access the administration tools, hehhe.. how to secure it? I read it must be secured if I don't want to allow random access...

so in my iFrame I can set up the link to be the one that points to my DA and, I should not put any action comoponet in the WOCompoment that it returns the DA, otherwise I will have problems, as far as I understood.


Thx

Gus

On Mon, Oct 5, 2009 at 10:58 AM, [email protected] <[email protected] > wrote:
Hi Gustavo,

You can use a Direct Action if you don't have a session.

Rob.


On 5 Oct 2009, at 09:04, Gustavo Pizano wrote:

Hello, this is what I need to achieve.

I have an J2ee app running on apache, and I have a WOApp running on a G5. Now, I want to show in the j2ee app in an iframe a WOComponent that will show a list of items from the database based on a selected User, user is an Enterprise Object.

I read somwhwere, but I cant recall where, that I can acces the WO without the neeed of a session ID, or even authenticating, as I said I can't find where I read about it.

Questions, will this approach, will allow me to do fetch to the DB even without a SessionID?, (silly question, I know but as you know im still new to some things).
Will this approach be better than doing WebServices with WO?....

What will be your suggestions.? thinking that I need to select a user and filter the query. ?, should the user selection pop up be inside the WOComponent, or should it be sent somehow to the WOComponent from the j2ee?

confused here. :S//...

any help as alwasy will be very very appreciate it.

Im in the mood today to make things work... :P :P :D

thx

G.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/rob%40synapticstorm.com

This email sent to [email protected]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjectspicora%40gmail.com

This email sent to [email protected]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to