Erik Hatcher | 1 Mar 01:21 2005

Re: 3.1: Declarative Security Issue

This actually brings up a good reason why maybe Tapestry should be 
driven by a filter instead of a servlet.  Filters, as of Servlet 2.4, 
be specified to apply to FORWARD, REQUEST, or INCLUDE.  You could then 
organize the main Tapestry entry point to only respond to FORWARD and 
the URL mapping filter to apply to REQUEST.  Any reasons why this 
wouldn't work?

	Erik

On Feb 28, 2005, at 5:34 PM, Paul Ferraro wrote:

> This is exactly why I did not base my friendly url implementation on 
> servlet filters...
> The web.xml files for my friendly url applications do not include a 
> servlet mapping for /app - only extension (i.e. *.something) mappings 
> for each type of service.
>
> Paul
>
> Howard Lewis Ship wrote:
>
>> I just had a thought.
>>
>> Say you require admin role to access the "/admin" folder of your app.
>>
>> You create a admin/DeleteUser page and think "only admins can access 
>> this".
>>
>> Along comes a hacker with knowledge of Tapestry, and types in the URL:
>>
(Continue reading)

evan | 1 Mar 02:41 2005
Picon

Re: [jira] Commented: (TAPESTRY-267) more control of session serialization triggers for clustered environment

OK, think I am getting there, but can anyone confirm that the below 
would be the correct way to configure a custom ApplicationStateManager? 
(seems to work, but I am completely new to hivemind and want to make 
sure I am doing it the right way.)

myapp/WEB-INF/hivemodule.xml:

<?xml version="1.0"?>
<module id="myapp" version="1.0.0">

   <implementation service-id="tapestry.state.ApplicationStateManager">
       <invoke-factory model="pooled">
       <construct class="mydomain.MyApplicationStateManagerImpl">
         <set-service property="registry" 
service-id="tapestry.state.StateObjectManagerRegistry"/>
       </construct>
     </invoke-factory>
   </implementation>

</module>

thx,
Evan

Howard Lewis Ship wrote:
> Yep, that's pretty much what I had envisioned.  You then have to map a
> stategy name to a ASM service, and use that name w.r.t. your ASO.
> 
> Gotta catch a flight, bye!
> 
(Continue reading)

tapestry-dev | 1 Mar 05:12 2005
Picon
Picon

[Jakarta Tapestry Wiki] New: SpringHibernate

   Date: 2005-02-28T20:12:07
   Editor: HenriDupre
   Wiki: Jakarta Tapestry Wiki
   Page: SpringHibernate
   URL: http://wiki.apache.org/jakarta-tapestry/SpringHibernate

   no comment

New Page:

Since this subject is coming often on the mailing list, I created this page for summarizing solutions.

Two approaches are possible for using hibernate with Tapestry: with Spring or write your own engine
services to deal with sessions.
The Spring approach offers an (almost) transparent session management and declarative transactions.

I recommend to use Hibernate 3 which offers several major improvements over the 2.1. A preliminary support
for Hibernate 3 and Spring is available at http://opensource.atlassian.com/projects/spring/browse/SPR-300
tapestry-dev | 1 Mar 05:22 2005
Picon
Picon

[Jakarta Tapestry Wiki] Updated: SpringHibernate

   Date: 2005-02-28T20:22:14
   Editor: HenriDupre
   Wiki: Jakarta Tapestry Wiki
   Page: SpringHibernate
   URL: http://wiki.apache.org/jakarta-tapestry/SpringHibernate

   no comment

Change Log:

------------------------------------------------------------------------------
 <at>  <at>  -3,6 +3,174  <at>  <at> 
 Two approaches are possible for using hibernate with Tapestry: with Spring or write your own engine
services to deal with sessions.
 The Spring approach offers an (almost) transparent session management and declarative transactions.

-I recommend to use Hibernate 3 which offers several major improvements over the 2.1. A preliminary
support for Hibernate 3 and Spring is available at http://opensource.atlassian.com/projects/spring/browse/SPR-300
+Hibernate 3 offers several major improvements over the 2.1. A preliminary support for Hibernate 3 and
Spring is available at http://opensource.atlassian.com/projects/spring/browse/SPR-300

+With Spring, the way to go is to use the "OpenSessionInViewFilter" which opens and closes hibernate
sessions for you in a transparent way. These lines are required in the web.xml to enable the session management:
+	<filter>
+		<filter-name>hibernateFilter</filter-name>
+		<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+	</filter>

+	<filter-mapping>
+		<filter-name>hibernateFilter</filter-name>
(Continue reading)

tapestry-dev | 1 Mar 05:24 2005
Picon
Picon

[Jakarta Tapestry Wiki] Updated: FrequentlyAskedQuestions

   Date: 2005-02-28T20:24:11
   Editor: HenriDupre
   Wiki: Jakarta Tapestry Wiki
   Page: FrequentlyAskedQuestions
   URL: http://wiki.apache.org/jakarta-tapestry/FrequentlyAskedQuestions

   no comment

Change Log:

------------------------------------------------------------------------------
 <at>  <at>  -22,3 +22,4  <at>  <at> 

  * /MetaTags: How to create meta tags by using the Shell component and a renderer

+ * /SpringHibernate: How to include Spring and Hibernate with Tapestry
tapestry-dev | 1 Mar 05:25 2005
Picon
Picon

[Jakarta Tapestry Wiki] New: FrequentlyAskedQuestions/SpringHibernate

   Date: 2005-02-28T20:25:36
   Editor: HenriDupre
   Wiki: Jakarta Tapestry Wiki
   Page: FrequentlyAskedQuestions/SpringHibernate
   URL: http://wiki.apache.org/jakarta-tapestry/FrequentlyAskedQuestions/SpringHibernate

   no comment

New Page:

Since this subject is coming often on the mailing list, I created this page for summarizing solutions.

Two approaches are possible for using hibernate with Tapestry: with Spring or write your own engine
services to deal with sessions.
The Spring approach offers an (almost) transparent session management and declarative transactions.

Hibernate 3 offers several major improvements over the 2.1. A preliminary support for Hibernate 3 and
Spring is available at http://opensource.atlassian.com/projects/spring/browse/SPR-300

With Spring, the way to go is to use the "OpenSessionInViewFilter" which opens and closes hibernate
sessions for you in a transparent way. These lines are required in the web.xml to enable the session management:
	<filter>
		<filter-name>hibernateFilter</filter-name>
		<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
                <!-- put here your own path for your Tapestry url-pattern -->
		<url-pattern>/exec</url-pattern> 
(Continue reading)

Hugo Palma | 1 Mar 13:15 2005
Picon

Re: Error creating implicit component in 3.1

Ok, i think i might have hidden the real problem with some not very 
pretty code.
After some debugging i think that the problem is that the property 
componentResolver of the PageLoader class doesn't get initialized.
In my code i have:

IPageLoader loader = new PageLoader();
Location location = getLocation();
Block block = (Block) loader.createImplicitComponent(cycle, this, id, 
BLOCK, location);

with this i get a NPE in
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:417)
because the componentResolver property is NULL.

It's only when i do this:

IPageLoader loader = new PageLoader();
loader.setComponentResolver(new ComponentSpecificationResolverImpl());
Location location = getLocation();
Block block = (Block) loader.createImplicitComponent(cycle, this, id, 
BLOCK, location);

that i get the exception from the previous post. That exception comes 
from the fact that the log property of the 
ComponentSpecificationResolverImpl class is NULL.

Hope this helps.

Hugo
(Continue reading)

Michael Echerer (JIRA | 1 Mar 14:23 2005
Picon
Picon

[jira] Created: (TAPESTRY-276) NullPointerException in AbstractEngine under high load

NullPointerException in AbstractEngine under high load
------------------------------------------------------

         Key: TAPESTRY-276
         URL: http://issues.apache.org/jira/browse/TAPESTRY-276
     Project: Tapestry
        Type: Bug
  Components: Framework  
    Versions: 3.0.1    
 Environment: J2SDK 1.4.2_06, Tomcat 5.0.28, Solaris 2.8, Tapestry 3.0.1
Web application using many assets for images and css files.
    Reporter: Michael Echerer
    Priority: Critical

While load testing our application we detected that the AbstractEngine threw NullPointerExceptions
wrapped in ServletExceptions. Our load testing software shows that those errors pop up when loading CSS
or image files randomly which use the AssetService (/app?service=asset...). The visual effect or
missing images, resp. CSS styles because HTTP 500 internal server errors occur as we can reproduce it less
frequently with a browser, too.

javax.servlet.ServletException

java.lang.NullPointerException
org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:453)
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:914)
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197)
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

(Continue reading)

Howard Lewis Ship | 1 Mar 16:26 2005
Picon

Re: Error creating implicit component in 3.1

DO NOT create a page loader instance; of course its not nearly configured!

If you override the publid finishLoad() method, it will be provided to you.

Alternately, you should be able to have it injected into your component class.

Changing the structure of the page at render time is uncharted
territory in Tapestry.

On Tue, 01 Mar 2005 12:15:47 +0000, Hugo Palma <hpalma <at> digitalis.pt> wrote:
> Ok, i think i might have hidden the real problem with some not very
> pretty code.
> After some debugging i think that the problem is that the property
> componentResolver of the PageLoader class doesn't get initialized.
> In my code i have:
> 
> IPageLoader loader = new PageLoader();
> Location location = getLocation();
> Block block = (Block) loader.createImplicitComponent(cycle, this, id,
> BLOCK, location);
> 
> with this i get a NPE in
> org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:417)
> because the componentResolver property is NULL.
> 
> It's only when i do this:
> 
> IPageLoader loader = new PageLoader();
> loader.setComponentResolver(new ComponentSpecificationResolverImpl());
> Location location = getLocation();
(Continue reading)

Hugo Palma | 1 Mar 16:35 2005
Picon

Re: Error creating implicit component in 3.1

I had already tried that, but then i got another error and i just 
started looking for other options. At least i know i'm on the right 
track now.
Ok, so the error now is a java.lang.UnsupportedOperationException:

Component Home/$Border.menu is active and its configuration state may 
not be changed.
Stack Trace:

org.apache.tapestry.AbstractComponent.checkActiveLock(AbstractComponent.java:751)
org.apache.tapestry.AbstractComponent.addComponent(AbstractComponent.java:158)
org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:430)
pt.digitalis.dif.view.components.dynamicblock.DynamicBlock.constructBlock(DynamicBlock.java:81)
pt.digitalis.dif.view.components.dynamicblock.DynamicBlock.findBlockForComponentNamed(DynamicBlock.java:44)
pt.digitalis.dif.view.components.dynamicblock.DynamicBlock.getBlock(DynamicBlock.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:491)
ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:904)
ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:54)
ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122)
ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
ognl.ASTProperty.getValueBody(ASTProperty.java:96)
ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:171)
ognl.SimpleNode.getValue(SimpleNode.java:213)
ognl.Ognl.getValue(Ognl.java:333)
ognl.Ognl.getValue(Ognl.java:310)
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.readCompiled(ExpressionEvaluatorImpl.java:84)
(Continue reading)


Gmane