[ 
https://issues.apache.org/jira/browse/JS2-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472679
 ] 

Eivinn Hustveit commented on JS2-558:
-------------------------------------

I have now found out what happens when we browse Jetspeed with a UserAgent on 
which the CapabilityValveImpl returns wml as the mediatype. 


1. the line that causes the nullpointer is like you pointed out:
absViewPage = jpt.getTemplate(viewPage + "/" + 
JetspeedPowerTool.LAYOUT_TEMPLATE_TYPE + ".vm",
                        
JetspeedPowerTool.LAYOUT_TEMPLATE_TYPE).getAppRelativePath();


2. The reason is that jpt.getTemplate is in fact returning null.


3. The cause of point 2 is that the JetspeedPowerToolImpl.getTemplate(path, 
templateType, locator, descriptor) runs the following code in which returns 
null:
TemplateDescriptor template = locator.locateTemplate(descriptor);

This is due to the fact that the descriptor is using mediaType="wml" which 
again makes Jetspeed look for a template.vm located at 
apache-tomcat-5.5.20/webapps/jetspeed/WEB-INF/templates/layout/wml/en/US/layout.vm
This template does not exist.


I must admit that I cannot find out how to disable the WML support in Jetspeed 
when it is not needed. In my opinion the standard install should also default 
to XHTML and not HTML, but this is another discussion.

> Only "NULL" is shown in browser at what seems to be random intervals.
> ---------------------------------------------------------------------
>
>                 Key: JS2-558
>                 URL: https://issues.apache.org/jira/browse/JS2-558
>             Project: Jetspeed 2
>          Issue Type: Bug
>    Affects Versions: 2.0-FINAL
>         Environment: Apache/2.0.52 (CentOS) with Apache Tomcat 5.5.17 running 
> in jdk1.5.0_03. Jetspeed 2.0 Final.
>            Reporter: Eivinn Hustveit
>         Assigned To: David Sean Taylor
>            Priority: Blocker
>         Attachments: jetspeed_log_snapshot_of_request.txt, 
> Jetspeed_stacktrace.txt
>
>
> Everything works fine in the portal most of the time, but at random intervals 
> "NULL" is the only text rendered by the browser. I have looked at the 
> jetspeed.log and found out that it prints out a stacktrace which seems to 
> come from the rendering of the layout portlet. I will try to upload this as 
> an attachement.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to