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 Marcus Breier <ma...@googlemail.com> on 2006/07/01 08:32:31 UTC

Jetspeed 2.0: Problems with own public pages

Dear all,

I have got some trouble with my Jetspeed 2.0 installation. Beside the
public demo pages in "($J2_HOME)/webapps/jetspeed/WEB-INF/pages/Public"
another folder "pages/test" has been created. Within this folder the
PSML descriptors for my own public pages have been created. To show the
content of a test page the contentviewer portlet of the demo context has
been copied to an own testcontext. This copy is used to display plain
HTML files.

Problem: Everytime another page is linked using the mechanism of the
demo package the contentviewer looks for the HTML pages in the wrong
context. Instead of a lookup in the also created context "test" it looks
for the pages in the "demo" context.

Question: How can I correct this behaviour?

Best regards
Marcus


Part of one of my own PSML files:

----------- snip -----------
<page id="test.welcome">
	<defaults layout-decorator="mydecorator"
              portlet-decorator="gray-gradient"
                           skin="orange"
     	/>
	<title>Welcome</title>
	<metadata name="title" xml:lang="de">Willkommen</metadata>

	<fragment id="test.welcome.1" type="layout"
name="jetspeed-layouts::VelocityOneColumn">
		<fragment id="test.welcome.2" type="portlet" name="test::ContentViewer">
			<preference name="file">
				<value>/WEB-INF/content/mymenu.html</value>
			</preference>
		</fragment>
	</fragment>
</page>
----------- snip -----------



-- 
-------------------------------------------------
    Dipl.-Inf. (FH)
    Marcus Breier
    Falterweg 6
    32425 Minden

    eMail:   marcus.breier@googlemail.com
    Telefon: (05 71) 4 63 50
    Telefax: (05 71) 3 98 87 36
-------------------------------------------------

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


Re: ContentViewer page location procedure

Posted by David Sean Taylor <da...@bluesunrise.com>.
Marcus Breier wrote:
> Dear all,
> 
> the ContentViewer portlet shipping with Jetspeed 2.0 locates linked 
> (sub-)pages by following URL:
> 
> "http://localhost:8080/jetspeed/portals/_content/Constitution.html"
> 
> It seems to me, that this page location only works, when the HTML files 
> are stored to the folder "demo/WEB-INF/_content".
> 
> Is there anybody out there, who can explain the procedure to find the 
> file stated above to me?
> 
I see the problem, and yes, html files are mapping directly to 
/Public/content.psml. And on this page, it has a portlet from the demo 
application. The behavior is built into the profiler (see 
PathSessionResolver.java). If you need to map to another PSML page, you 
will need to enhance the profiler. I would like to see a configurable 
mapping from regex expressions or paths to psml files. Another scenario 
we've considered is placing html files directly in the PSML directory 
tree. Im open to input on this, as I have a need for this feature as 
well. In one of my projects here, I override the PathSessionResolver and 
  have custom mappings hard-coded into the java. These custom mappings 
dont change often, so it works for me. However I think we can solve this 
  with a better, more generic solution for the community

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


ContentViewer page location procedure

Posted by Marcus Breier <ma...@googlemail.com>.
Dear all,

the ContentViewer portlet shipping with Jetspeed 2.0 locates linked 
(sub-)pages by following URL:

"http://localhost:8080/jetspeed/portals/_content/Constitution.html"

It seems to me, that this page location only works, when the HTML files 
are stored to the folder "demo/WEB-INF/_content".

Is there anybody out there, who can explain the procedure to find the 
file stated above to me?

Thanks for help ... Best regards

Marcus


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


Re: Jetspeed 2.0: Problems with own public pages

Posted by Marcus Breier <ma...@googlemail.com>.
David Sean Taylor schrieb:
> Marcus Breier wrote:
>> Dear all,
>>
>> I have got some trouble with my Jetspeed 2.0 installation. Beside the
>> public demo pages in "($J2_HOME)/webapps/jetspeed/WEB-INF/pages/Public"
>> another folder "pages/test" has been created. Within this folder the
>> PSML descriptors for my own public pages have been created. To show the
>> content of a test page the contentviewer portlet of the demo context has
>> been copied to an own testcontext. This copy is used to display plain
>> HTML files.
>>
>> Problem: Everytime another page is linked using the mechanism of the
>> demo package the contentviewer looks for the HTML pages in the wrong
>> context. Instead of a lookup in the also created context "test" it looks
>> for the pages in the "demo" context.
>>
>> Question: How can I correct this behaviour?
>>
> Not really sure if I understand the problem...
> Why do you say that its looking in the demo context?
> Did you register a portlet application with the name "test"?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 
Well, I have copied the whole HTML content of the
"webapps/demo/WEB-INF/_content" folder, that comes with the Jetspeed 2
installer. It has been put into a WAR file in a similar path
"WEB-INF/content". After deploying that WAR file with J2 the HTML
fragments are accessible under "webapps/test/WEB-INF/content".

To display the HTML content I am using the demo portlet "ContentViewer", 
which has been copied to my WAR file too. The copied portlet has been 
registered as "TestCV" (please find the part of my portlet.xml below).

For the first test a copy of the menu page, originally located to the J2 
"Public Content" area, is displayed. Copies of the original subparts 
"Constitution" and "Bill of Rights" are linked like in the original 
context. After a click on one of both links, the layout of the original 
"Public Content" area is shown in my browser with the message, that 
"File /WEB-INF//content/Constitution.html not found.".

The strange thing for me is, that if I copy my HTML testpages to 
"webapps/demo/WEB-INF/_content" and put additional links into the 
original menu, the pages can be linked. In my own context stored to 
"webapps/test/WEB-INF/content" J2 cannot locate them. This behaviour 
lead me to the assumption, that J2 is looking for my pages in the wrong 
location.

Hope I got you right and my problem a bit more clear. ;-) ... Thanks for 
help.

Best regards
Marcus

--- part of my portlet.xml ---

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app 
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd 
      http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" id="test" 
version="1.0">
   ...
   <portlet>
     <description>Content Viewer portlet 2</description>
     <portlet-name>TestCV</portlet-name>
     <display-name>Content Viewer 2</display-name>
      <portlet-class>
        org.apache.portals.gems.file.FilePortlet
      </portlet-class>
      <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>VIEW</portlet-mode>
      </supports>
      <supports>
        <mime-type>application/pdf</mime-type>
        <portlet-mode>VIEW</portlet-mode>
      </supports>
      <supports>
        <mime-type>application/zip</mime-type>
        <portlet-mode>VIEW</portlet-mode>
      </supports>
      <supports>
        <mime-type>text/csv</mime-type>
        <portlet-mode>VIEW</portlet-mode>
      </supports>
      <supported-locale>en</supported-locale>
      <portlet-info>
        <title>Content Viewer</title>
        <short-title>Content</short-title>
        <keywords>content,viewer,file</keywords>
      </portlet-info>
    </portlet>
</portlet-app>




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


Re: Jetspeed 2.0: Problems with own public pages

Posted by David Sean Taylor <da...@bluesunrise.com>.
Marcus Breier wrote:
> Dear all,
> 
> I have got some trouble with my Jetspeed 2.0 installation. Beside the
> public demo pages in "($J2_HOME)/webapps/jetspeed/WEB-INF/pages/Public"
> another folder "pages/test" has been created. Within this folder the
> PSML descriptors for my own public pages have been created. To show the
> content of a test page the contentviewer portlet of the demo context has
> been copied to an own testcontext. This copy is used to display plain
> HTML files.
> 
> Problem: Everytime another page is linked using the mechanism of the
> demo package the contentviewer looks for the HTML pages in the wrong
> context. Instead of a lookup in the also created context "test" it looks
> for the pages in the "demo" context.
> 
> Question: How can I correct this behaviour?
> 
Not really sure if I understand the problem...
Why do you say that its looking in the demo context?
Did you register a portlet application with the name "test"?

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