tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Tapestry > Request Processing FAQ
Date Thu, 01 Sep 2011 20:49:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/12/_/styles/combined.css?spaceKey=TAPESTRY&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/TAPESTRY/Request+Processing+FAQ">Request
Processing FAQ</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~hlship">Howard
M. Lewis Ship</a>
    </h4>
        <div id="versionComment">
        <b>Comment:</b>
        add link to application folder config<br />
    </div>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >Alternately, you may contribute a
[HttpServletRequestFilter|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/HttpServletRequestFilter.html]
to the [HttpServletRequestHandler|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/HttpServletRequestHandler.html]
pipeline. A filter that simply returns false from its {{service()}} method will cause Tapestry
to hand off the request to the servlet container for normal handling.  You would use this
approach when a simple regular expression is not sufficient to identify which requests should
be ignored. <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Alternately,
you can configure the Tapestry application to execute inside a folder to avoid conflicts.
See the notes on the [configuration page|Configuration#Configuration-SegregatingApplicationsIntoFolders].
<br> <br></td></tr>
            <tr><td class="diff-unchanged" >{scrollbar}  <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/TAPESTRY/Integration+with+existing+applications"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/TAPESTRY/Integration+with+existing+applications">Integration
with existing applications</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/TAPESTRY/Frequently+Asked+Questions"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/TAPESTRY/Frequently+Asked+Questions">Frequently Asked Questions</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/TAPESTRY/Limitations">Limitations</a></td><td
class='ScrollbarNextIcon'><a href="/confluence/display/TAPESTRY/Limitations"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>


<h2><a name="RequestProcessingFAQ-RequestProcessing"></a>Request Processing</h2>

<h3><a name="RequestProcessingFAQ-HowdoIgetTapestrytonothandlearequest%3F"></a>How
do I get Tapestry to <b>not</b> handle a request?</h3>

<p>Often, when <a href="/confluence/display/TAPESTRY/Integration+with+existing+applications"
title="Integration with existing applications">integrating with outside libraries, or working
with legacy code</a>, you will want Tapestry to ignore a request and let the normal
servlet or other processing handle the request.</p>

<p>The easy way to do this is to contribute a regular expression to the <a href="/confluence/display/TAPESTRY/Configuration#Configuration-ConfigurationConfiguringIgnoredPaths">IgnoredPathsFilter
service</a>, whose job is to exclude some requests.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
<span class="code-keyword">public</span> <span class="code-keyword">static</span>
void contributeIgnoredPathsFilter(Configuration&lt;<span class="code-object">String</span>&gt;
configuration)
  {
    configuration.add(<span class="code-quote">"/dwr/.*"</span>);
  }
</pre>
</div></div>

<p>Alternately, you may contribute a <a href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/HttpServletRequestFilter.html"
class="external-link" rel="nofollow">HttpServletRequestFilter</a> to the <a href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/HttpServletRequestHandler.html"
class="external-link" rel="nofollow">HttpServletRequestHandler</a> pipeline. A filter
that simply returns false from its <tt>service()</tt> method will cause Tapestry
to hand off the request to the servlet container for normal handling.  You would use this
approach when a simple regular expression is not sufficient to identify which requests should
be ignored.</p>

<p>Alternately, you can configure the Tapestry application to execute inside a folder
to avoid conflicts. See the notes on the <a href="/confluence/display/TAPESTRY/Configuration#Configuration-ConfigurationSegregatingApplicationsIntoFolders">configuration
page</a>.</p>

<style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/TAPESTRY/Integration+with+existing+applications"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/TAPESTRY/Integration+with+existing+applications">Integration
with existing applications</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/TAPESTRY/Frequently+Asked+Questions"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/TAPESTRY/Frequently+Asked+Questions">Frequently Asked Questions</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/TAPESTRY/Limitations">Limitations</a></td><td
class='ScrollbarNextIcon'><a href="/confluence/display/TAPESTRY/Limitations"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/TAPESTRY/Request+Processing+FAQ">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=26120573&revisedVersion=3&originalVersion=2">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message