Woodbridge, Mark R wrote:
  > I have tried adding a new servlet to the existing BASE web.xml file
> but I got a strange error that seemed to imply that BASE defines its
> own ClassLoader. 

Not in this context, but Tomcat does. 
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html


 > Have you ever seen a problem like this?

Like what?


 > I'm not
> clear on the best way to invoke code that uses the native API. Using
> the webservices API is easy because you just need the relevant jars.
> 
> Disregarding that, do you have any ideas about how to link directly
> to an Experiment without getting the 'permission denied' error caused
> by the wrong project being selected? 

You can't link directly. You need to set the active project first. To do 
this you need code that is living in the BASE web application that calls 
SessionControl.setActiveProject(). You could for example create a 
servlet that takes four parameters: login, password, project ID and 
experiment ID. Then something rougly like this:

// Create a new session and login
SessionControl sc = Application.newSessionControl(....);
sc.login(login, password, ....);

// Then, active the project
Project p = Project.getById(...);
sc.setActiveProject(p);

// redirect to the experiment page
response.sendRedirect(....);

 > I'm assuming it would actually
> be possible to write a servlet that automatically authenticates the
> user, sets the active project, then redirects to the experiment? I'm
> not sure of the best approach...

Neither am I... you'll need to fill in a lot of blanks in the "code" 
above. The example above creates a new session every time. If you need 
something different, you'll probably need to mange the session id's in 
your own application and add that as a parameter to the servlet as well. 
The servlet should then first check for an existing session before 
creating a new one: Application.getSessionControl(...);

/Nicklas

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
basedb-devel mailing list
basedb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/basedb-devel

Reply via email to