Adam

There are some *very* bright people here who, I am sure,
will give you far better insights than me... but, as 
exercise for myself :-) I will try and attempt an outline.

0.  Not sure if you need a registration process?
1.  Assuming this is done, get your users to login - 
and validate against their name in the database (there is
sample code that in the Cocoon examples for this).  This
results in a valid session being created.

2.  You can now use the sitemap to "wrap" the rest of the
pages that are being generated inside a pipeline which checks
for the authenitcated user/session:

<map:pipeline>
  <map:match type="sessionstate" pattern="*">
     <map:parameter name="attribute-name" value="username"/>
       <!-- other matches inside this section -->
       
This, I think, will meet your criteria of how "to ensure that the usertype
details are calculated before any [other] xsp page is executed."
       
3. You could pass the "username" (or 'usertype' if that is more
relevant to your case) to other <match>s in the pipeline and this
could be used further by, say, the XSLT code to modify the 
layout/appearance of the delivered XML pages accordingly.

4.  Cocoon allows you to 'read in' aspects such as IP address
and browser info quite easily - again, see the samples supplied
with Cocoon & how these how processed in the sitemap.


Hope this helps a little

Cheers
Derek
       

>>> [EMAIL PROTECTED] 04/07/2003 02:10:46 >>>
Hello All,

I have recently been delivered to the wonderful world of cocoon. I am very
impressed but what I have seen (and somewhat confused to - so many different
ways to do things). I have been given an almost complete cocoon based web site
to finish in a very short amount of time.


Client Side:
------------
The client side of the web-app is in need of some form on session/login
processing, but its not quite as formal as an offical login....

The client side is avaiable to anyone, anytime (both the general public, and
employees of the company). 

The client side of the web site could be accessed at any given page (some
user's will bookmark certain pages)

All the pages in the client side need to know a few things about the user (that
can be calculated from their IP and some info in the database).

Almost every page on the client side will perform some sort of search against
the database. These searches are identical for all users - its just the 'where'
clause that may need some extra conditions based on the type of user (public or
employee).  


The Solution???
---------------
Write the code to calculate the usertype once [public|employee]

Perform the calcultion of user details only once.

Ensure that user details have been calculated before the sql code of any page
executes.


Current Position:
------------------
Java code is no problem, and I have used xml and a bit of xslt. 

I know the actual java code required to determine the usertype.

I'm guessing the solution will require the usertype details to be carried
around in the session.

I just dont know how to use the power of cocoon to ensure that the usertype
details are calculated before any xsp page is executed.



Any help/hints/tips/references would be greatly appreciated. 




Regards,


     Adam.

=====
Adam Flegman - Senior Software Engineer

Mobile:     (0414) 375 735
Phone:     (07) 5547 8530
Facsimile: (07) 5547 8532
Email #1: [EMAIL PROTECTED] 
Email #2: [EMAIL PROTECTED] 

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com 

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



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.


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

Reply via email to