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 - [EMAIL PROTECTED]
Vivendi Universal Networks - Paris
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]