Here is a 'solution':

In JetspeedJspLayout, doBuild:

----------------------------------------------------------------------------
-----------------------------------------
+        templateJsp = data.getParameters().getString( "jsp" );
+        if (null == templateJsp)
                templateJsp = TurbineResources.getString(
"services.JspService.default.layout","/default.jsp");
+               else
+               {
+               data.getTemplateInfo().setLayoutTemplate( templateJsp );
+               JspService jsp =
(JspService)TurbineServices.getInstance().getService(JspService.SERVICE_NAME
);
+                 jsp.handleRequest(data, templateJsp, false);
+              return;
+        }
----------------------------------------------------------------------------
-----------------------------------------

So the url looks like this (notice the new /jsp/ parameter):

http://localhost:8080/jetspeed/portal/jsp/Page.jsp?inc=myStuff/html/myPage.h
tml

The inc parameter is then used to load any html page as in:

<jsp:include page='<%= request.getParameter("inc") %>' flush="true" />

It also makes use of jetspeed-tags as in:

   <base href="<jetspeed:uriLookup type="BaseURL" />">

and to get the standard jetspeed navigations:

<jetspeed:jetspeedNavigation  defaultTemplate="top_default.jsp"
loggedInTemplate="top_loggedIn.jsp" />

etc

This makes me wonder how you go about using a different layout in turbine
besides the default specified in the turbine resources.

Is there a better way to do this, i.e. getting standard navigations around a
page?
A single FileServerPortlet(HTML) in a clear portlet control just came to
mind (as i was writing this) as in:

http://localhost:8080/jetspeed/portal/group/public/page/SinglePage

....5 minutes later...

 -- that was *so* easy and it works great, but I still need to add the
parameter based loading: ?inc=myStuff/html/myPage.html
(I guess the problem with passing the html resource in the url is that it
cannot be cached by the current system...)

Funny how i thought of that while writing this email, but not so funny if
you knew how long it took me to figure out the jsp service...
Anyway, I now think I like the second solution better.
Does anyone think the jsp patch above is useful?
What about a parameterized FileServerPortlet?

----------------------------------------------------------------------------
------------
Heres groups/public/SinglePage.psml is 'hard-coded' to including the
Welcome.html from the distribution:

<portlets user="public" xmlns="http://xml.apache.org/jetspeed/2000/psml">
    <controller
name="org.apache.jetspeed.portal.controllers.ClearController"/>
// sorry, i haven't checked this in yet....
     <skin>
      <property name="padding" value="0" />
     </skin>
    <entry type="ref" parent="Welcome">
    <control
name="org.apache.jetspeed.portal.controls.ClearPortletControl"/>
    </entry>
</portlets>

one last thing, you need to switch over to the new profiler in Home.java to
get this too work
Also, the /page/ keyword may actually be called /profile/ in the current
cvs, but im changing it to /page/ on next checkin

----------------------------------------------------------------------------
------------

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of David Sean Taylor
> Sent: Thursday, January 04, 2001 11:30 AM
> To: JetSpeed
> Subject: Jetspeed-JSP tags on any JSP page
>
>
> I'd like to use the jetspeed navigations and jetspeed tags on any
> jsp page,
> not only 'portal' (psml) pages.
> I simply want to wrapper any html/jsp page with my standard jetspeed
> navigations.
> This works fine until I reference a jetspeed-jsp tag which
> requires rundata,
> which of course fails since there is no rundata available to a direct
> request of a jsp page.
> Is there a simple solution to this?
>
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/[email protected]/>
> List Help?:          [EMAIL PROTECTED]
>
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?:          [EMAIL PROTECTED]

Reply via email to