You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by ICM S CP guest 5 <IC...@icn.siemens.de> on 2001/10/15 12:41:56 UTC

How to load a new profile?

Hi,

I wanna load a new profile (e.g. for wml) - 
What I am doing is:

1. Make an instance of JetspeedProfilerService (JPS)
2. Call the getProfile (rundata, mimetype) function (JPS has been created)
3. Receive a Jetspeed Exception
4. (planned) assign the new profile to JetspeedRundata

After a look in my logfile, I figured out that the exception was a Nullpointer-Exception.

Questions:

1. I know that turbine holds a list of services which are loaded during initialization - I guess that JPS is one of those services. Can I access this services or servicelist from a jetspeed class file (how can I get a reference to these classes)?

2. I want JSP to retrieve a wml profile - but my debug output shows a BasePSMLDocument request for a html file! Any ideas?


Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: How to load a new profile?

Posted by Raphaƫl Luta <ra...@networks.groupvu.com>.
ICM S CP guest 5 wrote:

> Hi,
> 
> I wanna load a new profile (e.g. for wml) - 
> What I am doing is:
> 
> 1. Make an instance of JetspeedProfilerService (JPS)
> 2. Call the getProfile (rundata, mimetype) function (JPS has been created)
> 3. Receive a Jetspeed Exception
> 4. (planned) assign the new profile to JetspeedRundata
> 
> After a look in my logfile, I figured out that the exception was a Nullpointer-Exception.
> 
> Questions:
> 
> 1. I know that turbine holds a list of services which are loaded during initialization - I guess that JPS is one of those services. Can I access this services or servicelist from a jetspeed class file (how can I get a reference to these classes)?
> 


Turbine services are usually singleton that can be retrieved either through the
org.apache.turbine.services.TurbineServices class or by using the commodity
static wrapper class:
org.apache.jetspeed.services.Profiler.

Note that this wrapper will only expose the ProfilerService interface methods and
not any other implementation specific public methods.


> 2. I want JSP to retrieve a wml profile - but my debug output shows a BasePSMLDocument request for a html file! Any ideas?
> 


The default profiling action is to look up the user agent string and match it
against a known user agent list (org.apache.jetspeed.capability.*) to determine
the mime-type to serve. It may be a good idea to extend the Profiler to recognize
an explicit "media type" parameter to override this behavior.

--
Raphael Luta - raphael.luta@networks.groupvu.com
Vivendi Universal Networks - Paris


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org