Hi,

A possibly easier approach to disable caching (and configure your Tapestry
application in general) is to place the following in your .application file:

    <property name="org.apache.tapestry.disable-caching" value="true"/>

You may find additional configuration options here:
http://jakarta.apache.org/tapestry/3.0.3/doc/TapestryUsersGuide/configuration.search-path.html


If you do not have a .application file, please create one, as it has many
possible uses. It is easiest to name it <servletname>.application, for
example app.application, and place it in the WEB-INF directory.

Here is the .application file for the workbench application, for example:

----
<!DOCTYPE application PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd";>

<application name="Tapestry Component Workbench">
  <property name="org.apache.tapestry.visit-class"
value="org.apache.tapestry.workbench.Visit"/>
  <property name="org.apache.tapestry.template-encoding"
value="ISO-8859-1"/>

  <extension name="org.apache.tapestry.request-decoder"
class="org.apache.tapestry.workbench.RequestDecoder"/>

  <service name="home"
class="org.apache.tapestry.workbench.WorkbenchHomeService"/>
  <service name="chart"
class="org.apache.tapestry.workbench.chart.ChartService"/>

  <library id="contrib"
specification-path="/org/apache/tapestry/contrib/Contrib.library"/>

</application>
----



----- Original Message ----- 
From: "Preston CRAWFORD" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, July 20, 2005 6:54 AM
Subject: Re: Tapestry starting to look too steep


> To answer your questions.
>
> #1 - I have tried starting tomcat in that fashion and I still get the
> same error. As I explained earlier, I followed the directions here
> (http://blog.shadowbox.com/index.php?p=40 ) to try to get this going.
> I couldn't get it to work for some reason.
>
> #2 - As far as what I'm trying to accomplish? I'm trying to get
> productive in Tapestry as quickly as possible. And in part that means
> that in my development environment I can work in a more rapid fashion.
> With JSP/Struts, etc. if I make changes to the JSP files I simply have
> to create an Ant target that copies the JSP files into the proper
> deployment directory and a refresh of the page does the rest. Here I
> can't seem to get that working. I want to be able to change templates
> and spec files and then be able to see my changes quickly, without
> rebuilding the war, throwing it over the wall to the app server, and
> restarting.
>
> #3 - Regarding includes. We have the need to have items like a dynamic
> side menu, a dynamic top menu. Items that will be reused over and over
> again. And this could just be a lack of understanding of the Tapestry
> mindset, but we just haven't been able to figure out how to accomplish
> this. I hate to use the JSP paradigm, but in this case you start from
> what you know. And what I know is an include. I'm trying to figure out
> how to accomplish the same functionality in Tapestry. Basically an HTML
> template that can be dropped into any other HTML template, but get
> pre-processed the same way as the HTML template it's been included into.
> A server side include, for lack of a better term.
>
> I'll take a look at your example in depth later. But this is what I'm
> trying to acheive. And this isn't me saying that Tapestry isn't a good
> framework. I'm not making a judgement call. I like the look of Tapestry.
> But I'm not sure how long it will take to get as productive in it as I
> already am in Struts/JSP, etc.
>
> Preston
>
>
> >>> [EMAIL PROTECTED] 7/19/2005 6:31 PM >>>
>
> Preston CRAWFORD wrote:
> > I agree that the community is great and that the idea of Tapestry is
> > great. But often times you just need to get stuff done. And right now
> we
> > can't figure out how to get an include into a page (like you'd do
> with a
> > SSI in JSP) where any code gets pre-processed just like the rest of
> the
> > page. And we can't figure out how to restart the Tapestry engine in
> > order to see changes to the spec and template files quickly.
>
> Q: Have you tried starting tomcat, or your tomcat-plugin, or jetty, or
> resin, or whatever other servlet container you use with the
> -Dorg.apache.tapestry.disable-caching=true option? If what you want is
> to be able to see template/spec changes immediately, this will do the
> trick.
>
> Regarding preprocessing: as Kevin pointed out... what is it,
> specifically, that you are trying to accomplish? In what manner should
> the stuff be "processed"? And does the "included" file need to be
> chosen
> dynamically? Generally speaking, in tapestry, rather than having a
> single page and including content, you write a border component, which
> is included on the content pages. But, if what you want is to
> dynamically include blocks of html which are processed by tapestry,
> then
> you really need to look at block/renderblock.
>
> As an example, suppose you had a page with an area for "properties".
> The
> "properties" page/content to be used depends on what type of object is
> being edited by the page. You need the properties portion to be
> fully-functional "tapestry" stuff, but the properties of the various
> objects are so different as to render making a single component to
> handle all of them difficult, messy, etc.  So, you might do something
> like define a "getPropertiesPageName" method in each of the
> object-types
> to edit. This returns the name of a page to edit. Additionally, you
> could define a "getPropertiesBlockName" method, which gets the name of
> the block to edit. Then, in the java class of the page to edit, you
> can
> do something like:
> public IComponent getBlock() {
>    IPage page =
> getRequestCycle().getPage(getObject().getPropertiesPageName());
>    return page.getComponent(getObject().getPropertiesBlockName());
> }
> And in the html file, you could then do:
>
> <div jwcid="@RenderBlock" block="ognl:block"/>
>
> voila... you've just included arbitrary content.
> There is a caveat to this approach. Since "activate"
> is never called on the page with the block, methods like
> "pageBeginRender", "pageValidate", etc. are /not/ called by tapestry.
> So, you'll have to exercise a bit of care in how/where you initialize
> things.  But, it does work. :)
>
> Robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to