You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Musachy Barroso <mu...@gmail.com> on 2009/10/21 01:06:28 UTC
sitemesh problem in 2.1.8
lets follow up here
On Tue, Oct 20, 2009 at 4:02 PM, Musachy Barroso <mu...@gmail.com> wrote:
> I think you meant "sitemesh" instead of freemarker right? FreeMarker
> 2.3.15 is what is bundled with Struts 2.1.8.x.
>
> On Tue, Oct 20, 2009 at 3:54 PM, Christian Stone <xt...@stonescape.net> wrote:
>> WW-3275
>
>
>
> --
> Screw John Galt, who is Martin Gainty?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Christian Stone <xt...@stonescape.net>.
Here is a JIRA tag to catch several other bugs (including two marked
resolved when they were not). The patch file is included with the
ticket!
Please let me know how it goes. I have only minimally tested
velocity, but have tested the FreeMarker side extensively. I am
throwing the plugin on two of my production servers to see how it
handles a load. Unfortunately they are both FreeMarker decorator
apps...
-- Christian Stone
Update sitemesh-plugin to use version 2.4.2. (CLONE, CATCHALL).
----------------------------------------------------------------
Key: WW-3291
URL: https://issues.apache.org/struts/browse/WW-3291
Project: Struts 2
Issue Type: Bug
Components: Plugin - SiteMesh
Affects Versions: 2.1.8, 2.1.6
Environment: JDK 1.5+, Struts 2.1.6+ & SiteMesh 2.4+
Reporter: Christian Wolfgang Stone
Priority: Critical
Catch-all bug for the following bugs: WW-3116 (marked as resolved,
not fixed), WW-1128 (should now work on 2.4 and lower), WW-3275
(very good description),
Detailed description of this issue can be found in the following
discussion thread.
http://www.nabble.com/Struts-2.1.8-%2B-SiteMesh-2.4.2-%2B-FreeMarkerPageFilter-Broken-td25721587.html
I am attaching a patch that updates the struts2-sitemesh plugin to use
the more current SiteMeshPageFilter.java class. The old code was
deprecated and deleted from the sitemesh with the 2.4.2 release!
The new files are as follows. I am testing the freemarker
extensively, and will test the velocity a bit later. Please test both
and let me know if there are any problems.
FreeMarkerMapper2DecoratorSelector.java
OldDecorator2NewStrutsDecorator.java
VelocityMapper2DecoratorSelector.java
FreeMarkerPageFilter.java
OldDecorator2NewStrutsFreemarkerDecorator.java VelocityPageFilter.java
NoneDecoratorMapper.java OldDecorator2NewStrutsVelocityDecorator.java
On Oct 21, 2009, at 6:20 AM, Wes Wannemacher wrote:
> We can't take a jar, create a patch from your modified sources and
> attach it to the jira issue related to upgrading sitemesh. One of us
> will take a look at the failing test if you don't figure it out.
>
> -Wes
--
_,--"
cws `-._ ________-_______ "----
_----'--'--------------------------------'--'----_
//_| | \ Christian Stone, Software Engineer / | |_\\
(_____|_|__= xtian@stonescape.net =__|_|_____)
_\_____=__ http://xtian.stonescape.net/ ___/_
\/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Re: sitemesh problem in 2.1.8
Posted by Wes Wannemacher <we...@wantii.com>.
We can't take a jar, create a patch from your modified sources and
attach it to the jira issue related to upgrading sitemesh. One of us
will take a look at the failing test if you don't figure it out.
-Wes
On 10/21/09, Christian Stone <xt...@stonescape.net> wrote:
> That did it. Still have build failures on the tests though (both
> xwork and struts 2).
>
> On a positive note... I was able to get the struts2-sitemesh pluging
> working with velocity and freemarker (using 2 filters, 1 for each).
>
> Is there a need for a combined filter, such as a velocity and
> freemarker accepting filter (based on extension)? I can do that
> pretty easily...
>
> Is there a need for a jsp struts-sitemesh filter? I can attempt that
> as well (will need some testing...)
>
> For documentation purposes, no need to change anything. Just use the
> standard two filters that are already there for struts+sitemesh
> integration.
>
> -- Christian Stone
>
> Included is the jar file... it may be built with Java 6 (don't know if
> mvn specified Java 5 or not). Testing with sitemesh-2.4.2.jar.
>
>
>
>
> On Oct 21, 2009, at 3:30 AM, Nils-Helge Garli Hegvik wrote:
>
>>> ------------------------------------------------------------------------
>>> [ERROR] BUILD FAILURE
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Compilation failure
>>> error: error reading
>>> /Users/xtian/.m2/repository/cglib/cglib-full/2.0.2/cglib-
>>> full-2.0.2.jar;
>>> cannot read zip file
>>>
>>
>>
>> Did you try deleting that jar from your local maven repository? Could
>> be a corrupt download.
>>
>> Nils-H
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>
> --
> _,--"
> cws `-._ ________-_______ "----
> _----'--'--------------------------------'--'----_
> //_| | \ Christian Stone, Software Engineer / | |_\\
> (_____|_|__= xtian@stonescape.net =__|_|_____)
> _\_____=__ http://xtian.stonescape.net/ ___/_
> \/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
>
>
>
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Christian Stone <xt...@stonescape.net>.
That did it. Still have build failures on the tests though (both
xwork and struts 2).
On a positive note... I was able to get the struts2-sitemesh pluging
working with velocity and freemarker (using 2 filters, 1 for each).
Is there a need for a combined filter, such as a velocity and
freemarker accepting filter (based on extension)? I can do that
pretty easily...
Is there a need for a jsp struts-sitemesh filter? I can attempt that
as well (will need some testing...)
For documentation purposes, no need to change anything. Just use the
standard two filters that are already there for struts+sitemesh
integration.
-- Christian Stone
Included is the jar file... it may be built with Java 6 (don't know if
mvn specified Java 5 or not). Testing with sitemesh-2.4.2.jar.
On Oct 21, 2009, at 3:30 AM, Nils-Helge Garli Hegvik wrote:
>> ------------------------------------------------------------------------
>> [ERROR] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Compilation failure
>> error: error reading
>> /Users/xtian/.m2/repository/cglib/cglib-full/2.0.2/cglib-
>> full-2.0.2.jar;
>> cannot read zip file
>>
>
>
> Did you try deleting that jar from your local maven repository? Could
> be a corrupt download.
>
> Nils-H
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
--
_,--"
cws `-._ ________-_______ "----
_----'--'--------------------------------'--'----_
//_| | \ Christian Stone, Software Engineer / | |_\\
(_____|_|__= xtian@stonescape.net =__|_|_____)
_\_____=__ http://xtian.stonescape.net/ ___/_
\/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Re: sitemesh problem in 2.1.8
Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
> error: error reading
> /Users/xtian/.m2/repository/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar;
> cannot read zip file
>
Did you try deleting that jar from your local maven repository? Could
be a corrupt download.
Nils-H
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Christian Stone <xt...@stonescape.net>.
Oh, a second issue, this one with struts.
I (temporarily) built xwork using the no tests option (mvn -
Dmaven.test.skip=true -Pextras,plugins,xwork). Then after the
artifacts were in place, I attempted to build struts... and have this
issue:
[INFO]
------------------------------------------------------------------------
[INFO] Building Portlet Webapp
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [antrun:run {execution: copy-sources}]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [bundle:manifest {execution: bundle-manifest}]
[WARNING] Ignoring project type war - supportedProjectTypes = [jar,
bundle]
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Compiling 3 source files to /source/websites/coreJava/struts
workshop/struts2/apps/portlet/target/test-classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
error: error reading /Users/xtian/.m2/repository/cglib/cglib-full/
2.0.2/cglib-full-2.0.2.jar; cannot read zip file
I have been able to get it to build with the -Dmaven.test.skip=true
command to skip testing, but it seems like the tree is in a bad state.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Christian Stone <xt...@stonescape.net>.
So some of the sitemesh 3 code is in the latest drop apparently, and
it is marked alpha. So I am doing 2 things...
1. Updating the existing filters code (FreeMarkerPageFilter and
VelocityPageFilter) to use the PageFilter.java implementation in
SiteMesh 2.3
(note that I presume that I can copy the SiteMesh file over without
a problem since it is the same company and you have xwork...)
2. Adding 2 new filters using the new SiteMesh 3 code
(NewFreeMarkerPageFilter and NewVelocityPageFilter). Apparently these
are faster
(note that I am doing this because while they are pushing the code
it is marked alpha in the last docs posted not long ago)
Item 1 maintains the most backwards compatibility without lots of new
code. Item 2 is completely worked up from scratch to use the new
code. I don't think there has been a lot of testing done on the new
filters in the Sitemesh code, so I think putting both in there for now
is a good thing. If the new code is stable, then the new filters will
prove quite useful (and much faster). If not, the old filters are
there under the old names.
So I do have a major problem. As I mentioned before, and using Wes's
instructions, I have errors building xwork (no surprise from me)...
How should I proceed. I'd really like to test this code out :)
-- Christian
Results :
Failed tests:
testNeedsReload
(com.opensymphony.xwork2.config.providers.XmlConfigurationProviderTest)
Tests run: 641, Failures: 1, Errors: 0, Skipped: 0
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.
Please refer to /source/websites/coreJava/struts workshop/xwork/core/
target/surefire-reports for the individual test results.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 minute 51 seconds
[INFO] Finished at: Wed Oct 21 02:02:54 EDT 2009
[INFO] Final Memory: 46M/122M
[INFO]
------------------------------------------------------------------------
Here is the stack...
INFO: Parsing configuration file [com/opensymphony/xwork2/config/
providers/xwork-test-interceptor-defaultref.xml]
Oct 21, 2009 2:02:36 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Document is invalid: no grammar found. at (null:1:16)
org.xml.sax.SAXParseException: Document is invalid: no grammar found.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException
(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error
(ErrorHandlerWrapper.java:131)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError
(XMLErrorReporter.java:384)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError
(XMLErrorReporter.java:318)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement
(XMLNSDocumentScannerImpl.java:250)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl
$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3095)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
$PrologDriver.next(XMLDocumentScannerImpl.java:922)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next
(XMLDocumentScannerImpl.java:648)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse
(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
at
com.opensymphony.xwork2
.config.providers.XmlConfigurationProvider.loadConfigurationFiles
(XmlConfigurationProvider.java:893)
at
com.opensymphony.xwork2
.config.providers.XmlConfigurationProvider.loadDocuments
(XmlConfigurationProvider.java:143)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init
(XmlConfigurationProvider.java:110)
at
com.opensymphony.xwork2
.config.providers.ConfigurationTestBase.buildConfigurationProvider
(ConfigurationTestBase.java:28)
at
com.opensymphony.xwork2
.config.providers.XmlConfigurationProviderInvalidFileTest.testInvalidFileThrowsException
(XmlConfigurationProviderInvalidFileTest.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
Oct 21, 2009 2:02:36 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Unable to find parent packages nonexistentPackage
Oct 21, 2009 2:02:36 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Unable to find parent packages circularPackage
Oct 21, 2009 2:02:36 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Unable to find parent packages anotherCircularPackage2
Oct 21, 2009 2:02:36 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Unable to find parent packages anotherCircularPackage
INFO: Parsing configuration file [xwork-sample.xml]
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: no default parameter defined for result of type mock
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: no default parameter defined for result of type mock
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: no default parameter defined for result of type mock
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: no default parameter defined for result of type mock
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: no default parameter defined for result of type mock
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: no default parameter defined for result of type mock
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: no default parameter defined for result of type mock
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: no default parameter defined for result of type mock
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: no default parameter defined for result of type mock
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: compound root element at index 3 is null
Oct 21, 2009 2:02:38 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: compound root element at index 4 is null
Oct 21, 2009 2:02:39 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: test
java.lang.Exception: test
at
com.opensymphony.xwork2
.interceptor.ExceptionMappingInterceptorTest.testThrownExceptionNoMatchLoggingCategoryLevelWarn
(ExceptionMappingInterceptorTest.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
Oct 21, 2009 2:02:39 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: test
java.lang.Exception: test
at
com.opensymphony.xwork2
.interceptor.ExceptionMappingInterceptorTest.testThrownExceptionNoMatchLoggingCategoryLevelInfo
(ExceptionMappingInterceptorTest.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
Oct 21, 2009 2:02:39 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger fatal
SEVERE: test
java.lang.Exception: test
at
com.opensymphony.xwork2
.interceptor.ExceptionMappingInterceptorTest.testThrownExceptionNoMatchLoggingCategoryLevelFatal
(ExceptionMappingInterceptorTest.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
Oct 21, 2009 2:02:39 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: test
java.lang.Exception: test
at
com.opensymphony.xwork2
.interceptor.ExceptionMappingInterceptorTest.testThrownExceptionNoMatchLoggingCategoryLevelError
(ExceptionMappingInterceptorTest.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
Oct 21, 2009 2:02:39 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [xwork-test-beans.xml]
Oct 21, 2009 2:02:39 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Error setting expression '('\u0023' + 'session[\'user4\']')
(unused)' with value '0wn3d'
ognl.OgnlException: target is null for setProperty(null, "user4", 0wn3d)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2219)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.ASTChain.setValueBody(ASTChain.java:227)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.ASTEval.setValueBody(ASTEval.java:79)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.Ognl.setValue(Ognl.java:737)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:161)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:149)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters
(ParametersInterceptor.java:276)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
(ParametersInterceptor.java:187)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke
(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.DefaultActionProxy.execute
(DefaultActionProxy.java:130)
at
com.opensymphony.xwork2
.interceptor.ParametersInterceptorTest.testParametersDoesNotAffectSession
(ParametersInterceptorTest.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
Oct 21, 2009 2:02:39 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Error setting expression '('\u0023'%2b'session['user5']')
(unused)' with value '0wn3d'
ognl.ExpressionSyntaxException: Malformed OGNL expression:
('\u0023'%2b'session['user5']')(unused) [ognl.ParseException:
Encountered " "\'" "\'session[\' "" at line 1, column 13.
Was expecting one of:
"," ...
"=" ...
"?" ...
"||" ...
"or" ...
"&&" ...
"and" ...
"|" ...
"bor" ...
"^" ...
"xor" ...
"&" ...
"band" ...
"==" ...
"eq" ...
"!=" ...
"neq" ...
"<" ...
"lt" ...
">" ...
"gt" ...
"<=" ...
"lte" ...
">=" ...
"gte" ...
"in" ...
"not" ...
"<<" ...
"shl" ...
">>" ...
"shr" ...
">>>" ...
"ushr" ...
"+" ...
"-" ...
"*" ...
"/" ...
"%" ...
"instanceof" ...
"." ...
"(" ...
")" ...
"[" ...
<DYNAMIC_SUBSCRIPT> ...
]
at ognl.Ognl.parseExpression(Ognl.java:112)
at com.opensymphony.xwork2.ognl.OgnlUtil.compile(OgnlUtil.java:214)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:161)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:149)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters
(ParametersInterceptor.java:276)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
(ParametersInterceptor.java:187)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke
(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.DefaultActionProxy.execute
(DefaultActionProxy.java:130)
at
com.opensymphony.xwork2
.interceptor.ParametersInterceptorTest.testParametersDoesNotAffectSession
(ParametersInterceptorTest.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
Caused by: ognl.ParseException: Encountered " "\'" "\'session[\' "" at
line 1, column 13.
Was expecting one of:
"," ...
"=" ...
"?" ...
"||" ...
"or" ...
"&&" ...
"and" ...
"|" ...
"bor" ...
"^" ...
"xor" ...
"&" ...
"band" ...
"==" ...
"eq" ...
"!=" ...
"neq" ...
"<" ...
"lt" ...
">" ...
"gt" ...
"<=" ...
"lte" ...
">=" ...
"gte" ...
"in" ...
"not" ...
"<<" ...
"shl" ...
">>" ...
"shr" ...
">>>" ...
"ushr" ...
"+" ...
"-" ...
"*" ...
"/" ...
"%" ...
"instanceof" ...
"." ...
"(" ...
")" ...
"[" ...
<DYNAMIC_SUBSCRIPT> ...
at ognl.OgnlParser.generateParseException(OgnlParser.java:3172)
at ognl.OgnlParser.jj_consume_token(OgnlParser.java:3051)
at ognl.OgnlParser.primaryExpression(OgnlParser.java:1554)
at ognl.OgnlParser.navigationChain(OgnlParser.java:1243)
at ognl.OgnlParser.unaryExpression(OgnlParser.java:1196)
at ognl.OgnlParser.multiplicativeExpression(OgnlParser.java:971)
at ognl.OgnlParser.additiveExpression(OgnlParser.java:894)
at ognl.OgnlParser.shiftExpression(OgnlParser.java:750)
at ognl.OgnlParser.relationalExpression(OgnlParser.java:508)
at ognl.OgnlParser.equalityExpression(OgnlParser.java:405)
at ognl.OgnlParser.andExpression(OgnlParser.java:352)
at ognl.OgnlParser.exclusiveOrExpression(OgnlParser.java:299)
at ognl.OgnlParser.inclusiveOrExpression(OgnlParser.java:246)
at ognl.OgnlParser.logicalAndExpression(OgnlParser.java:193)
at ognl.OgnlParser.logicalOrExpression(OgnlParser.java:140)
at ognl.OgnlParser.conditionalTestExpression(OgnlParser.java:101)
at ognl.OgnlParser.assignmentExpression(OgnlParser.java:64)
at ognl.OgnlParser.expression(OgnlParser.java:23)
at ognl.OgnlParser.topLevelExpression(OgnlParser.java:15)
at ognl.Ognl.parseExpression(Ognl.java:110)
... 34 more
/-- Encapsulated exception ------------\
ognl.ParseException: Encountered " "\'" "\'session[\' "" at line 1,
column 13.
Was expecting one of:
"," ...
"=" ...
"?" ...
"||" ...
"or" ...
"&&" ...
"and" ...
"|" ...
"bor" ...
"^" ...
"xor" ...
"&" ...
"band" ...
"==" ...
"eq" ...
"!=" ...
"neq" ...
"<" ...
"lt" ...
">" ...
"gt" ...
"<=" ...
"lte" ...
">=" ...
"gte" ...
"in" ...
"not" ...
"<<" ...
"shl" ...
">>" ...
"shr" ...
">>>" ...
"ushr" ...
"+" ...
"-" ...
"*" ...
"/" ...
"%" ...
"instanceof" ...
"." ...
"(" ...
")" ...
"[" ...
<DYNAMIC_SUBSCRIPT> ...
at ognl.OgnlParser.generateParseException(OgnlParser.java:3172)
at ognl.OgnlParser.jj_consume_token(OgnlParser.java:3051)
at ognl.OgnlParser.primaryExpression(OgnlParser.java:1554)
at ognl.OgnlParser.navigationChain(OgnlParser.java:1243)
at ognl.OgnlParser.unaryExpression(OgnlParser.java:1196)
at ognl.OgnlParser.multiplicativeExpression(OgnlParser.java:971)
at ognl.OgnlParser.additiveExpression(OgnlParser.java:894)
at ognl.OgnlParser.shiftExpression(OgnlParser.java:750)
at ognl.OgnlParser.relationalExpression(OgnlParser.java:508)
at ognl.OgnlParser.equalityExpression(OgnlParser.java:405)
at ognl.OgnlParser.andExpression(OgnlParser.java:352)
at ognl.OgnlParser.exclusiveOrExpression(OgnlParser.java:299)
at ognl.OgnlParser.inclusiveOrExpression(OgnlParser.java:246)
at ognl.OgnlParser.logicalAndExpression(OgnlParser.java:193)
at ognl.OgnlParser.logicalOrExpression(OgnlParser.java:140)
at ognl.OgnlParser.conditionalTestExpression(OgnlParser.java:101)
at ognl.OgnlParser.assignmentExpression(OgnlParser.java:64)
at ognl.OgnlParser.expression(OgnlParser.java:23)
at ognl.OgnlParser.topLevelExpression(OgnlParser.java:15)
at ognl.Ognl.parseExpression(Ognl.java:110)
at com.opensymphony.xwork2.ognl.OgnlUtil.compile(OgnlUtil.java:214)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:161)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:149)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters
(ParametersInterceptor.java:276)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
(ParametersInterceptor.java:187)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke
(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.DefaultActionProxy.execute
(DefaultActionProxy.java:130)
at
com.opensymphony.xwork2
.interceptor.ParametersInterceptorTest.testParametersDoesNotAffectSession
(ParametersInterceptorTest.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
\--------------------------------------/
Oct 21, 2009 2:02:39 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Error setting expression '\u0023session.user2' with value
'0wn3d'
ognl.OgnlException: target is null for setProperty(null, "user2", 0wn3d)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2219)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.ASTChain.setValueBody(ASTChain.java:227)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.Ognl.setValue(Ognl.java:737)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:161)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:149)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters
(ParametersInterceptor.java:276)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
(ParametersInterceptor.java:187)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke
(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.DefaultActionProxy.execute
(DefaultActionProxy.java:130)
at
com.opensymphony.xwork2
.interceptor.ParametersInterceptorTest.testParametersDoesNotAffectSession
(ParametersInterceptorTest.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
Oct 21, 2009 2:02:39 AM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Error setting expression '\u0023session['user']' with value
'0wn3d'
ognl.OgnlException: target is null for setProperty(null, "user", 0wn3d)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2219)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.ASTChain.setValueBody(ASTChain.java:227)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.Ognl.setValue(Ognl.java:737)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:161)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue
(OgnlValueStack.java:149)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters
(ParametersInterceptor.java:276)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
(ParametersInterceptor.java:187)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke
(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.DefaultActionProxy.execute
(DefaultActionProxy.java:130)
at
com.opensymphony.xwork2
.interceptor.ParametersInterceptorTest.testParametersDoesNotAffectSession
(ParametersInterceptorTest.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run
(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute
(TestNGDirectoryTestSuite.java:155)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:997)
On Oct 20, 2009, at 10:38 PM, Wes Wannemacher wrote:
> To help with both the patch creation and your sanity (matching up
> xwork and struts versions), work off of trunk for both of them. Check
> out xwork from subversion here -
>
> svn co http://svn.opensymphony.com/svn/xwork/trunk xwork
>
> and build it -
>
> cd xwork ; mvn clean install
>
> Then, checkout and build struts 2 from trunk -
>
> svn co http://svn.apache.org/repos/asf/struts/struts2/trunk struts2
> cd struts2
> mvn -Pall clean install -DskipAssembly
>
> If you prefer an IDE, make sure you have maven support (m2eclipse in
> Eclipse and built-in support in IDEA) and use a java6 jdk.
>
> -Wes
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Wes Wannemacher <we...@wantii.com>.
To help with both the patch creation and your sanity (matching up
xwork and struts versions), work off of trunk for both of them. Check
out xwork from subversion here -
svn co http://svn.opensymphony.com/svn/xwork/trunk xwork
and build it -
cd xwork ; mvn clean install
Then, checkout and build struts 2 from trunk -
svn co http://svn.apache.org/repos/asf/struts/struts2/trunk struts2
cd struts2
mvn -Pall clean install -DskipAssembly
If you prefer an IDE, make sure you have maven support (m2eclipse in
Eclipse and built-in support in IDEA) and use a java6 jdk.
-Wes
On Tue, Oct 20, 2009 at 9:39 PM, Christian Stone <xt...@stonescape.net> wrote:
> Okay, I'll do it... will take perhaps a day (free time... you know).
>
> -- Christian
>
> On Oct 20, 2009, at 9:14 PM, Musachy Barroso wrote:
>
>> I don't think anyone here knows much about the sitemesh codebase, so
>> feel free to take a shot at it and ask for help here if you need it.
>>
>> thanks for reporting
>> musachy
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Christian Stone <xt...@stonescape.net>.
Okay, I'll do it... will take perhaps a day (free time... you know).
-- Christian
On Oct 20, 2009, at 9:14 PM, Musachy Barroso wrote:
> I don't think anyone here knows much about the sitemesh codebase, so
> feel free to take a shot at it and ask for help here if you need it.
>
> thanks for reporting
> musachy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Musachy Barroso <mu...@gmail.com>.
I don't think anyone here knows much about the sitemesh codebase, so
feel free to take a shot at it and ask for help here if you need it.
thanks for reporting
musachy
On Tue, Oct 20, 2009 at 5:37 PM, Christian Stone <xt...@stonescape.net> wrote:
> P.S. Sorry about the posting on the vote thread.
>
> There is a good discussion about the three possible solutions with the bug
> (http://issues.apache.org/struts/browse/WW-3275). The easiest (but far from
> ideal) is to use the solution #2. However, there is a complete rewrite of
> PageFilter.java with the new structure, and it looks a lot of thought went
> into it. Additionally, they have not only deprecated PageFilter, but
> removed the code (pretty aggressive). I doubt they would do that without
> reason, so I suspect the migration to the new code will have to happen
> sooner than later.
>
> If I had a better understanding of the logic behind the code on the Sitemesh
> side, I'd pull together the changes and submit them myself. If no one has
> the knowledge of integrating with Sitemesh via the plugin, I'd be happy to
> do it. I just figured that someone with a whole lot more knowledge about
> the two codebases could easily fix it.
>
> By the way, I will be very happy when the xwork codebase is brought in under
> Struts 2. I have tried to check out the project several times and build,
> and I always trip on the fact that the xwork artifact is out of step with
> Struts 2. You know... Struts will require version 2.X, and the xwork
> artifact is at a lower version. This wouldn't stop me from working on the
> plugin of course, but if I am testing stuff with the full development
> builds, I would love to be able to easily build the source and any changes
> to test with.
>
> -- Christian Stone
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
Screw John Galt, who is Martin Gainty?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Christian Stone <xt...@stonescape.net>.
Welcome! By the way, I wrote the developer of Sitemesh 3, and will
see about getting a plugin available for the new codebase too.
By the way, I am testing a version of the plugin now with a bit more
detail in the error reporting (reports URL and query with failed
decorator). This is nice because right now it just reports where it
failed on a decorator, not the page it was decorating, or the request
it received. For instance, this is what is reported...
=====
[2009-10-21 15:39:29,574]
ERROR
freemarker.runtime
Error on line 51, column 11 in decorators/auth.ftl
request.getAttribute("settings") is undefined.
It cannot be assigned to settings
The problematic instruction:
----------
==> assignment: settings=request.getAttribute("settings") [on line 51,
column 11 in decorators/auth.ftl]
----------
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Error on line 51, column 11
in decorators/auth.ftl
request.getAttribute("settings") is undefined.
It cannot be assigned to settings
====
After I test this a bit, I think many people would love to get this
additional detail (the request URL). Should I make another patch for
this in a few days, or should I wait for you to commit the first one
and I can push it later...
-- Christian
On Oct 21, 2009, at 2:50 PM, Musachy Barroso wrote:
> that was a quick turn around for a patch!
>
> thanks
> musachy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Musachy Barroso <mu...@gmail.com>.
that was a quick turn around for a patch!
thanks
musachy
On Wed, Oct 21, 2009 at 11:48 AM, Christian Stone <xt...@stonescape.net> wrote:
> It isn't a problem if you use the filter bundled with Sitemesh. However, it
> doesn't work if you use the plugin filters...
>
> <filter>
> <filter-name>sitemesh</filter-name>
>
> <filter-class>org.apache.struts2.sitemesh.FreeMarkerPageFilter</filter-class>
> </filter>
>
> You need to use this filter to access the valueStack and other struts 2
> objects with your decorators. It is the filter recommended by the struts 2
> website for integration with sitemesh.
>
> Hope this helps!
>
> -- Christian
>
>
> On Oct 21, 2009, at 12:00 PM, Dale Newfield wrote:
>
>> I use struts 2.1.8 with freemarker 2.3.15 and sitemesh 2.4.2...I haven't
>> witnessed any problems, but besides the freemarker that struts uses to
>> expand tags I don't use freemarker in my project. Are there issues that
>> I've not noticed, or do those issues only arise when using freemarker more
>> exetensively?
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>
> --
> _,--"
> cws `-._ ________-_______ "----
> _----'--'--------------------------------'--'----_
> //_| | \ Christian Stone, Software Engineer / | |_\\
> (_____|_|__= xtian@stonescape.net =__|_|_____)
> _\_____=__ http://xtian.stonescape.net/ ___/_
> \/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Christian Stone <xt...@stonescape.net>.
Yes it does (well, it did... my changes to the FreeMarkerPageFilter
use the newer SiteMeshFilter). They not only deprecated PageFilter,
but deleted the code within it.
You do not have access to everything in the decorators with
SiteMeshFilter that you do with FreeMarkerPageFilter. For instance,
none of the statics, etc. found in FreeMarkerManager are in the
SiteMeshFilter version. Not a big deal if you don't use it. However,
I use it heavily to define statics for various definitions and
permission.
You don't need to worry about .jsp decorators and these problems as
much, since they are compiled and can access the statics.
Hope this makes sense... I've had a very long week :)
-- Christian
On Oct 22, 2009, at 11:45 AM, Dale Newfield wrote:
> Christian Stone wrote:
>> It isn't a problem if you use the filter bundled with Sitemesh.
>> However, it doesn't work if you use the plugin filters...
>
> Does that include com.opensymphony.module.sitemesh.filter.PageFilter ?
> I use .jsp decorators and use s: tags within them (by putting the
> sitemesh filter in between the StrutsPrepareFilter /
> StrutsExecuteFilter pair).
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
--
_,--"
cws `-._ ________-_______ "----
_----'--'--------------------------------'--'----_
//_| | \ Christian Stone, Software Engineer / | |_\\
(_____|_|__= xtian@stonescape.net =__|_|_____)
_\_____=__ http://xtian.stonescape.net/ ___/_
\/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Re: The future of sitemesh integration with struts 2...
Posted by Brian Pontarelli <br...@pontarelli.com>.
From my conversations with Joe, integration will be much simpler with
the next version. I'm looking at using the next version so that all
the templates are FreeMarker and I will be able to create my own
FreeMarker root context. It also looked like everything was going to
be extendable or overridable and it will also provide programmatic
access to everything so that it can be invoked from nearly anywhere.
SiteMesh has moved out of Open Symphony to Github and the new sitemesh.org
site. It doesn't look like anything new has happened since
September. Perhaps we need to rally around SiteMesh and help get that
project to 3.0 since it will benefit so many projects, including
Struts 2.
-bp
On Oct 22, 2009, at 12:48 PM, Christian Stone wrote:
> I spent some time rethinking the architecture, and it seems like
> there is a strong case to rethink the future of the struts2-sitemesh
> plugin.
>
> The current plugin uses and has used a new filter to override the
> SiteMeshFilter code. SiteMeshFilter eventually leaves the
> dispatcher to handle the request. This works for JSP, as it can
> easily access things like static resources, but is a bit more
> difficult for Freemarker and Velocity which do not compile against
> the java codebase before execution.
>
> The problem is that struts would like to inject things like
> properties and static class variables into the value stack, and it
> does so with the FreemarkerManager and VelocityManager classes.
> These two classes provide the resources for evaluation of the
> appropriate files within the struts result handling, but they do not
> provide the managers for the SiteMesh decorators.
>
> After rethinking things a bit, I am wondering why the path of
> providing filters to integrate into SiteMesh were used as opposed to
> providing a custom Struts 2 FreemarkerServlet and VelocityServlet
> dispatcher. If the latter choice were made, you could likely
> override the preTemplateProcess(...) in the FreemarkerServlet class
> as an example of how you can add the needed properties into
> Freemarker to evaluate without having to dig inside of SiteMesh and
> other technologies.
>
> The second concern that I have is that you have a separate manager
> for every technology you wish to support. If a developer wishes to
> include statics and use both technologies, they have to include them
> twice. Perhaps a custom manager for providing mapped and static
> resources would be better that would be incorporated into the
> Freemarker and Velocity Managers. Simply put, the
> TemplateMapProvider (or whatever it should be called), would include
> all the statics resources and dynamic resources needed for any
> template processing.
>
> I understand that I do not have a deep knowledge of the architecture
> of Struts 2, so I ask why the first and not second path was chosen
> (the one of providing filters). More specifically, given the path
> of SiteMesh and how it will be mixing velocity and freemarker in
> SiteMesh 3, it seems that the best path would be to use the Servlet
> model and not the filter model in the future. So what am I missing?
>
> -- Christian Stone
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: The future of sitemesh integration with struts 2...
Posted by Brian Pontarelli <br...@pontarelli.com>.
On Oct 23, 2009, at 10:10 AM, Christian Stone wrote:
>
> On Oct 23, 2009, at 12:01 PM, Brian Pontarelli wrote:
>
>> I've done some work with it and it looks to be completely
>> pluggable. I do this same thing in JCatapult with other libraries.
>> Essentially, I define a workflow chain in a configuration file that
>> is the "default" and it contains items that might not exists on the
>> classpath. If a specific workflow isn't there, I just de-activate
>> it. This is essentially how Struts2 would want to "determine" if
>> SiteMesh 3 is in the classpath. If it is, it would wire things up.
>> If not, it would de-activate that part of the filter-chain.
>>
>> In terms of SiteMesh 3 being capable of being called
>> programmatically, last time I looked this was one of the primary
>> goals. The API was well defined and it allowed SiteMesh to be
>> invoked from nearly any code. I recall some discussion of allowing
>> it to be used outside of a servlet container as well. I'll have to
>> circle back and see if that is possible. I was also planning on
>> incorporating SiteMesh into the JCatapult email library so that
>> emails could also be decorated.
>>
>> Once I get that stuff going, I'll let you know. I also will try and
>> work with the SiteMesh developers on ensuring the integration is as
>> generic and simple as possible.
>>
>> -bp
>
>
> This sounds great! I was just reviewing the alpha SiteMesh3 and
> while it is far from complete it still seems to be tied to the same
> filter/dispatcher architecture. Perhaps if SiteMesh allowed for
> configurable renderers... now that would be great!
Check out all the offline and builder stuff in there. You can build a
Context yourself or use the offline or webapp Contexts. Plus,
everything passed to the Context's constructors are interfaces. There
are a number of implementations of these interfaces that you can use
or you can provide your own implementations.
In SiteMesh 3 the decorators are just HTML. This means that I can use
this process to handle everything:
1. Render the result FTL into HTML
2. Render the decorator FTL into HTML
3. Pass the result and decorator HTML to SiteMesh 3
4. SiteMesh spits out the final HTML
5. Push final HTML to client
Should be very straight-forward in fact.
-bp
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: The future of sitemesh integration with struts 2...
Posted by Christian Stone <xt...@stonescape.net>.
On Oct 23, 2009, at 12:01 PM, Brian Pontarelli wrote:
> I've done some work with it and it looks to be completely pluggable.
> I do this same thing in JCatapult with other libraries. Essentially,
> I define a workflow chain in a configuration file that is the
> "default" and it contains items that might not exists on the
> classpath. If a specific workflow isn't there, I just de-activate
> it. This is essentially how Struts2 would want to "determine" if
> SiteMesh 3 is in the classpath. If it is, it would wire things up.
> If not, it would de-activate that part of the filter-chain.
>
> In terms of SiteMesh 3 being capable of being called
> programmatically, last time I looked this was one of the primary
> goals. The API was well defined and it allowed SiteMesh to be
> invoked from nearly any code. I recall some discussion of allowing
> it to be used outside of a servlet container as well. I'll have to
> circle back and see if that is possible. I was also planning on
> incorporating SiteMesh into the JCatapult email library so that
> emails could also be decorated.
>
> Once I get that stuff going, I'll let you know. I also will try and
> work with the SiteMesh developers on ensuring the integration is as
> generic and simple as possible.
>
> -bp
This sounds great! I was just reviewing the alpha SiteMesh3 and while
it is far from complete it still seems to be tied to the same filter/
dispatcher architecture. Perhaps if SiteMesh allowed for configurable
renderers... now that would be great!
-- Christian
--
_,--"
cws `-._ ________-_______ "----
_----'--'--------------------------------'--'----_
//_| | \ Christian Stone, Software Engineer / | |_\\
(_____|_|__= xtian@stonescape.net =__|_|_____)
_\_____=__ http://xtian.stonescape.net/ ___/_
\/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Re: The future of sitemesh integration with struts 2...
Posted by Brian Pontarelli <br...@pontarelli.com>.
I've done some work with it and it looks to be completely pluggable. I
do this same thing in JCatapult with other libraries. Essentially, I
define a workflow chain in a configuration file that is the "default"
and it contains items that might not exists on the classpath. If a
specific workflow isn't there, I just de-activate it. This is
essentially how Struts2 would want to "determine" if SiteMesh 3 is in
the classpath. If it is, it would wire things up. If not, it would de-
activate that part of the filter-chain.
In terms of SiteMesh 3 being capable of being called programmatically,
last time I looked this was one of the primary goals. The API was well
defined and it allowed SiteMesh to be invoked from nearly any code. I
recall some discussion of allowing it to be used outside of a servlet
container as well. I'll have to circle back and see if that is
possible. I was also planning on incorporating SiteMesh into the
JCatapult email library so that emails could also be decorated.
Once I get that stuff going, I'll let you know. I also will try and
work with the SiteMesh developers on ensuring the integration is as
generic and simple as possible.
-bp
On Oct 23, 2009, at 9:35 AM, Christian Stone wrote:
> There is some time before SiteMesh 3 comes prime time, so there is
> plenty of time for thought here. I do love the idea of wiring it up
> directly...
>
> However, since SiteMeshFilter requires the dispatcher to handle
> requests, you would have to incorporate the SiteMesh filter directly
> into the struts filter chain, and I think this would require struts
> to absorb much of the sitemesh codebase (unless the SiteMesh
> developer were to refactor the code a whole lot more to allow it to
> plug in to other filters and not be a filter on its own). The same
> thing would go for the dispatchers, since struts would have to
> insert them on the chain as well. It does seem like a lot of work
> without a noticeable benefit to the users (they still have to
> configure a decorators file, etc., and which filters/dispatchers are
> potentially causing conflicts would be hidden from the user).
> Additionally, they still would have to configure the dispatcher, at
> least for the request mapping, and I think it is less intuitive to
> put it into a struts config file than web.xml where they are used to
> such configurations (again, at this time).
>
> With all that said, if you want to take on the task of working with
> SiteMesh 3 and making it truly pluggable and modular (such as a
> JCatapult module), that would be awesome. Once that happens the
> work on the Struts side shouldn't be so bad (presuming the core
> architecture is in place)! If the convention of Struts is to
> configure and deploy everything, including JSP dispatcher, etc. then
> I love the idea!
>
> -- Christian
>
>
>
> On Oct 23, 2009, at 11:13 AM, Brian Pontarelli wrote:
>
>> I was never big on the Servlet or Filter models. It seems to me
>> that Struts2 is moving heavily towards conventions and the more
>> things are just "pluggable" the easier it will be for users. I feel
>> that the best approach would be for Struts2 to discover SiteMesh in
>> the class path and wire it up automatically. I'd also wonder if
>> this could be another case for some additional annotations in
>> addition to XML configuration for defining templates.
>>
>> Anyways, this is how I would proceed and leverage SiteMesh 3. This
>> is my plan for JCatapult.
>>
>> -bp
>>
>
> --
> _,--"
> cws `-._ ________-_______ "----
> _----'--'--------------------------------'--'----_
> //_| | \ Christian Stone, Software Engineer / | |_\\
> (_____|_|__= xtian@stonescape.net =__|_|_____)
> _\_____=__ http://xtian.stonescape.net/ ___/_
> \/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: The future of sitemesh integration with struts 2...
Posted by Christian Stone <xt...@stonescape.net>.
There is some time before SiteMesh 3 comes prime time, so there is
plenty of time for thought here. I do love the idea of wiring it up
directly...
However, since SiteMeshFilter requires the dispatcher to handle
requests, you would have to incorporate the SiteMesh filter directly
into the struts filter chain, and I think this would require struts to
absorb much of the sitemesh codebase (unless the SiteMesh developer
were to refactor the code a whole lot more to allow it to plug in to
other filters and not be a filter on its own). The same thing would
go for the dispatchers, since struts would have to insert them on the
chain as well. It does seem like a lot of work without a noticeable
benefit to the users (they still have to configure a decorators file,
etc., and which filters/dispatchers are potentially causing conflicts
would be hidden from the user). Additionally, they still would have
to configure the dispatcher, at least for the request mapping, and I
think it is less intuitive to put it into a struts config file than
web.xml where they are used to such configurations (again, at this
time).
With all that said, if you want to take on the task of working with
SiteMesh 3 and making it truly pluggable and modular (such as a
JCatapult module), that would be awesome. Once that happens the work
on the Struts side shouldn't be so bad (presuming the core
architecture is in place)! If the convention of Struts is to
configure and deploy everything, including JSP dispatcher, etc. then I
love the idea!
-- Christian
On Oct 23, 2009, at 11:13 AM, Brian Pontarelli wrote:
> I was never big on the Servlet or Filter models. It seems to me that
> Struts2 is moving heavily towards conventions and the more things
> are just "pluggable" the easier it will be for users. I feel that
> the best approach would be for Struts2 to discover SiteMesh in the
> class path and wire it up automatically. I'd also wonder if this
> could be another case for some additional annotations in addition to
> XML configuration for defining templates.
>
> Anyways, this is how I would proceed and leverage SiteMesh 3. This
> is my plan for JCatapult.
>
> -bp
>
--
_,--"
cws `-._ ________-_______ "----
_----'--'--------------------------------'--'----_
//_| | \ Christian Stone, Software Engineer / | |_\\
(_____|_|__= xtian@stonescape.net =__|_|_____)
_\_____=__ http://xtian.stonescape.net/ ___/_
\/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Re: The future of sitemesh integration with struts 2...
Posted by Brian Pontarelli <br...@pontarelli.com>.
I was never big on the Servlet or Filter models. It seems to me that
Struts2 is moving heavily towards conventions and the more things are
just "pluggable" the easier it will be for users. I feel that the best
approach would be for Struts2 to discover SiteMesh in the class path
and wire it up automatically. I'd also wonder if this could be another
case for some additional annotations in addition to XML configuration
for defining templates.
Anyways, this is how I would proceed and leverage SiteMesh 3. This is
my plan for JCatapult.
-bp
On Oct 23, 2009, at 8:38 AM, Christian Stone wrote:
> I have a working Struts 2 application where I am using Velocity AND
> Freemarker decorators now intechangeably and SiteMesh is dispatching
> them. The full value stacks are available in each, as the same
> Configurations are running on both the decorators and the struts
> results. You can now have decorators in Freemarker, Velocity, and
> JSP as long as the servlets are defined in your web.xml. I had to
> make a lot of changes to bring the plugin up to date with the modern
> freemarker, so good that this will be getting in early! Note that
> the old plugin fix I did is still there, so you can use either of
> the two published solutions you wish, and you no longer are using a
> crippled Freemarker with the new solution (shown below).
>
> I think my chin dropped when I saw all the decorators mixed in one
> decorator.xml and compiling. I am accessing all my statics in my
> freemarker decorator (velocity 1.3 does not support such things), so
> that is fixed as well. Absolutely sweet! On another note, I was
> able to streamline the process a bit, so there should be a subtle
> speed improvement as well.
>
> Here is an example web.xml snippet with the new changes hilighted.
> Currently I read the configuration from freemarker.properties as
> well as velocity.properties, and add any parameters present in the
> servlet, so the init phase for the two technologies is a bit more
> flexible and dynamic.
>
> <filter>
> <filter-name>struts-prepare</filter-name>
> <filter-
> class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</
> filter-class>
> <init-param>
> <param-name>actionPackages</param-name>
> <param-value>net.stonescape.renegade20.presentation</
> param-value>
> </init-param>
> </filter>
>
> <filter>
> <filter-name>sitemesh</filter-name>
> <filter-
> class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
> </filter>
>
> <filter>
> <filter-name>struts-execute</filter-name>
> <filter-
> class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</
> filter-class>
> </filter>
>
>
> <filter>
> <filter-name>timing</filter-name>
> <filter-class>net.stonescape.common.filter.TimerFilter</
> filter-class>
> </filter>
>
>
> <filter-mapping>
> <filter-name>timing</filter-name>
> <url-pattern>/*</url-pattern>
> <dispatcher>REQUEST</dispatcher>
> </filter-mapping>
> <filter-mapping>
> <filter-name>struts-prepare</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>sitemesh</filter-name>
> <url-pattern>/*</url-pattern>
> <dispatcher>REQUEST</dispatcher>
> <dispatcher>FORWARD</dispatcher>
> <dispatcher>INCLUDE</dispatcher>
> </filter-mapping>
> <filter-mapping>
> <filter-name>struts-execute</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> <servlet>
> <servlet-name>sitemesh-freemarker</servlet-name>
> <servlet-
> class>org.apache.struts2.sitemesh.FreemarkerDecoratorServlet</
> servlet-class>
> <init-param>
> <param-name>default_encoding</param-name>
> <param-value>UTF-8</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>sitemesh-freemarker</servlet-name>
> <url-pattern>*.ftl</url-pattern>
> </servlet-mapping>
>
> <servlet>
> <servlet-name>sitemesh-velocity</servlet-name>
> <servlet-
> class>org.apache.struts2.sitemesh.VelocityDecoratorServlet</servlet-
> class>
> <init-param>
> <param-name>default_encoding</param-name>
> <param-value>UTF-8</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>sitemesh-velocity</servlet-name>
> <url-pattern>*.vm</url-pattern>
> </servlet-mapping>
>
> -- Christian Stone
>
> On Oct 22, 2009, at 4:00 PM, Musachy Barroso wrote:
>
>> that sounds pretty reasonable to me. if you are up for the task, go
>> for it. 2.2 is far in the horizon and this would be a good time for
>> this kind of stuff.
>>
>> musachy
>
> --
> _,--"
> cws `-._ ________-_______ "----
> _----'--'--------------------------------'--'----_
> //_| | \ Christian Stone, Software Engineer / | |_\\
> (_____|_|__= xtian@stonescape.net =__|_|_____)
> _\_____=__ http://xtian.stonescape.net/ ___/_
> \/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: The future of sitemesh integration with struts 2...
Posted by Christian Stone <xt...@stonescape.net>.
I have a working Struts 2 application where I am using Velocity AND
Freemarker decorators now intechangeably and SiteMesh is dispatching
them. The full value stacks are available in each, as the same
Configurations are running on both the decorators and the struts
results. You can now have decorators in Freemarker, Velocity, and JSP
as long as the servlets are defined in your web.xml. I had to make a
lot of changes to bring the plugin up to date with the modern
freemarker, so good that this will be getting in early! Note that the
old plugin fix I did is still there, so you can use either of the two
published solutions you wish, and you no longer are using a crippled
Freemarker with the new solution (shown below).
I think my chin dropped when I saw all the decorators mixed in one
decorator.xml and compiling. I am accessing all my statics in my
freemarker decorator (velocity 1.3 does not support such things), so
that is fixed as well. Absolutely sweet! On another note, I was able
to streamline the process a bit, so there should be a subtle speed
improvement as well.
Here is an example web.xml snippet with the new changes hilighted.
Currently I read the configuration from freemarker.properties as well
as velocity.properties, and add any parameters present in the servlet,
so the init phase for the two technologies is a bit more flexible and
dynamic.
<filter>
<filter-name>struts-prepare</filter-name>
<filter-
class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</
filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>net.stonescape.renegade20.presentation</
param-value>
</init-param>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-
class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter>
<filter-name>struts-execute</filter-name>
<filter-
class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</
filter-class>
</filter>
<filter>
<filter-name>timing</filter-name>
<filter-class>net.stonescape.common.filter.TimerFilter</
filter-class>
</filter>
<filter-mapping>
<filter-name>timing</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>struts-prepare</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>struts-execute</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>sitemesh-freemarker</servlet-name>
<servlet-
class>org.apache.struts2.sitemesh.FreemarkerDecoratorServlet</servlet-
class>
<init-param>
<param-name>default_encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>sitemesh-freemarker</servlet-name>
<url-pattern>*.ftl</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>sitemesh-velocity</servlet-name>
<servlet-
class>org.apache.struts2.sitemesh.VelocityDecoratorServlet</servlet-
class>
<init-param>
<param-name>default_encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>sitemesh-velocity</servlet-name>
<url-pattern>*.vm</url-pattern>
</servlet-mapping>
-- Christian Stone
On Oct 22, 2009, at 4:00 PM, Musachy Barroso wrote:
> that sounds pretty reasonable to me. if you are up for the task, go
> for it. 2.2 is far in the horizon and this would be a good time for
> this kind of stuff.
>
> musachy
--
_,--"
cws `-._ ________-_______ "----
_----'--'--------------------------------'--'----_
//_| | \ Christian Stone, Software Engineer / | |_\\
(_____|_|__= xtian@stonescape.net =__|_|_____)
_\_____=__ http://xtian.stonescape.net/ ___/_
\/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Re: The future of sitemesh integration with struts 2...
Posted by Musachy Barroso <mu...@gmail.com>.
that sounds pretty reasonable to me. if you are up for the task, go
for it. 2.2 is far in the horizon and this would be a good time for
this kind of stuff.
musachy
On Thu, Oct 22, 2009 at 12:47 PM, Christian Stone <xt...@stonescape.net> wrote:
> The first reference is just to look at JIRA issues regarding flexibility,
> such as WW-2865
>
> And flexibility is what I am speaking about. The new SiteMesh allows a more
> tiled (recursive) decorator workflow, and allows for the mixing of
> technologies (freemarker, velocity, and jsp). Using a filter architecture
> means tying struts codebase to both the details of Freemarker AND SiteMesh.
> Using the servlet model means not being bound by changes in the SiteMesh
> filters/code at all. You could use Freemarker, Velocity, and JSP in
> SiteMesh (all together), not tie yourself to the SiteMesh codebase with the
> plugin, and still have all the benefits you have now.
>
> In one case, you can write a filter, and have to re-implement a whole bunch
> of SiteMesh code. This code has been completely rewritten for SiteMesh 3,
> so the plugin work will have to be redone again for it. Since we are
> overriding the dispatcher, you also have to include what file extensions
> will map to Velocity, and Freemarker and implement all the logic that the
> request dispatcher uses. Integration of Velocity, Freemarker, and JSP will
> need to happen, because otherwise Struts will cripple SiteMesh 3 (worse than
> it does with SiteMesh 2).
>
> On the other hand, you can override the Servlets for Velocity and
> Freemarker, and in that case (at least with the Freemarker one), there are
> great code points where you can inject your mappings without having to
> reinvent anything. It seems to be very clean cut. If any of the two
> technologies changes, likely the servlets will still work, as the functions
> we override are specifically there for customers to override. We won't have
> to respond to SiteMesh changes, and we won't be broken at all with respect
> to the SiteMesh design.
>
> Really, even with SiteMesh 2, there is a strong argument for taking the
> route of servlets instead of filters for tying into Freemarker.
>
> I hope this is all reasonable. I am typing this hastily in hopes that it
> will give you what you need without delay...
>
> -- Christian
>
>
>
>
>
> On Oct 22, 2009, at 3:08 PM, Musachy Barroso wrote:
>
>> I don't see any advantage in using neither of them, but I am not up to
>> date with Sitemesh 3, could you explain "More specifically, given the
>> path of SiteMesh and how it will be mixing velocity and freemarker in
>> SiteMesh 3, it seems that the best path would be to use the Servlet
>> model and not the filter model in the future" a little, and why you
>> think that using a servlet would be that much better?
>>
>> musachy
>
> --
> _,--"
> cws `-._ ________-_______ "----
> _----'--'--------------------------------'--'----_
> //_| | \ Christian Stone, Software Engineer / | |_\\
> (_____|_|__= xtian@stonescape.net =__|_|_____)
> _\_____=__ http://xtian.stonescape.net/ ___/_
> \/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: The future of sitemesh integration with struts 2...
Posted by Christian Stone <xt...@stonescape.net>.
The first reference is just to look at JIRA issues regarding
flexibility, such as WW-2865
And flexibility is what I am speaking about. The new SiteMesh allows
a more tiled (recursive) decorator workflow, and allows for the mixing
of technologies (freemarker, velocity, and jsp). Using a filter
architecture means tying struts codebase to both the details of
Freemarker AND SiteMesh. Using the servlet model means not being
bound by changes in the SiteMesh filters/code at all. You could use
Freemarker, Velocity, and JSP in SiteMesh (all together), not tie
yourself to the SiteMesh codebase with the plugin, and still have all
the benefits you have now.
In one case, you can write a filter, and have to re-implement a whole
bunch of SiteMesh code. This code has been completely rewritten for
SiteMesh 3, so the plugin work will have to be redone again for it.
Since we are overriding the dispatcher, you also have to include what
file extensions will map to Velocity, and Freemarker and implement all
the logic that the request dispatcher uses. Integration of Velocity,
Freemarker, and JSP will need to happen, because otherwise Struts will
cripple SiteMesh 3 (worse than it does with SiteMesh 2).
On the other hand, you can override the Servlets for Velocity and
Freemarker, and in that case (at least with the Freemarker one), there
are great code points where you can inject your mappings without
having to reinvent anything. It seems to be very clean cut. If any
of the two technologies changes, likely the servlets will still work,
as the functions we override are specifically there for customers to
override. We won't have to respond to SiteMesh changes, and we won't
be broken at all with respect to the SiteMesh design.
Really, even with SiteMesh 2, there is a strong argument for taking
the route of servlets instead of filters for tying into Freemarker.
I hope this is all reasonable. I am typing this hastily in hopes that
it will give you what you need without delay...
-- Christian
On Oct 22, 2009, at 3:08 PM, Musachy Barroso wrote:
> I don't see any advantage in using neither of them, but I am not up to
> date with Sitemesh 3, could you explain "More specifically, given the
> path of SiteMesh and how it will be mixing velocity and freemarker in
> SiteMesh 3, it seems that the best path would be to use the Servlet
> model and not the filter model in the future" a little, and why you
> think that using a servlet would be that much better?
>
> musachy
--
_,--"
cws `-._ ________-_______ "----
_----'--'--------------------------------'--'----_
//_| | \ Christian Stone, Software Engineer / | |_\\
(_____|_|__= xtian@stonescape.net =__|_|_____)
_\_____=__ http://xtian.stonescape.net/ ___/_
\/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Re: The future of sitemesh integration with struts 2...
Posted by Musachy Barroso <mu...@gmail.com>.
I don't see any advantage in using neither of them, but I am not up to
date with Sitemesh 3, could you explain "More specifically, given the
path of SiteMesh and how it will be mixing velocity and freemarker in
SiteMesh 3, it seems that the best path would be to use the Servlet
model and not the filter model in the future" a little, and why you
think that using a servlet would be that much better?
musachy
On Thu, Oct 22, 2009 at 11:48 AM, Christian Stone <xt...@stonescape.net> wrote:
> I spent some time rethinking the architecture, and it seems like there is a
> strong case to rethink the future of the struts2-sitemesh plugin.
>
> The current plugin uses and has used a new filter to override the
> SiteMeshFilter code. SiteMeshFilter eventually leaves the dispatcher to
> handle the request. This works for JSP, as it can easily access things like
> static resources, but is a bit more difficult for Freemarker and Velocity
> which do not compile against the java codebase before execution.
>
> The problem is that struts would like to inject things like properties and
> static class variables into the value stack, and it does so with the
> FreemarkerManager and VelocityManager classes. These two classes provide
> the resources for evaluation of the appropriate files within the struts
> result handling, but they do not provide the managers for the SiteMesh
> decorators.
>
> After rethinking things a bit, I am wondering why the path of providing
> filters to integrate into SiteMesh were used as opposed to providing a
> custom Struts 2 FreemarkerServlet and VelocityServlet dispatcher. If the
> latter choice were made, you could likely override the
> preTemplateProcess(...) in the FreemarkerServlet class as an example of how
> you can add the needed properties into Freemarker to evaluate without having
> to dig inside of SiteMesh and other technologies.
>
> The second concern that I have is that you have a separate manager for every
> technology you wish to support. If a developer wishes to include statics
> and use both technologies, they have to include them twice. Perhaps a
> custom manager for providing mapped and static resources would be better
> that would be incorporated into the Freemarker and Velocity Managers.
> Simply put, the TemplateMapProvider (or whatever it should be called),
> would include all the statics resources and dynamic resources needed for any
> template processing.
>
> I understand that I do not have a deep knowledge of the architecture of
> Struts 2, so I ask why the first and not second path was chosen (the one of
> providing filters). More specifically, given the path of SiteMesh and how
> it will be mixing velocity and freemarker in SiteMesh 3, it seems that the
> best path would be to use the Servlet model and not the filter model in the
> future. So what am I missing?
>
> -- Christian Stone
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
The future of sitemesh integration with struts 2...
Posted by Christian Stone <xt...@stonescape.net>.
I spent some time rethinking the architecture, and it seems like there
is a strong case to rethink the future of the struts2-sitemesh plugin.
The current plugin uses and has used a new filter to override the
SiteMeshFilter code. SiteMeshFilter eventually leaves the dispatcher
to handle the request. This works for JSP, as it can easily access
things like static resources, but is a bit more difficult for
Freemarker and Velocity which do not compile against the java codebase
before execution.
The problem is that struts would like to inject things like properties
and static class variables into the value stack, and it does so with
the FreemarkerManager and VelocityManager classes. These two classes
provide the resources for evaluation of the appropriate files within
the struts result handling, but they do not provide the managers for
the SiteMesh decorators.
After rethinking things a bit, I am wondering why the path of
providing filters to integrate into SiteMesh were used as opposed to
providing a custom Struts 2 FreemarkerServlet and VelocityServlet
dispatcher. If the latter choice were made, you could likely override
the preTemplateProcess(...) in the FreemarkerServlet class as an
example of how you can add the needed properties into Freemarker to
evaluate without having to dig inside of SiteMesh and other
technologies.
The second concern that I have is that you have a separate manager for
every technology you wish to support. If a developer wishes to
include statics and use both technologies, they have to include them
twice. Perhaps a custom manager for providing mapped and static
resources would be better that would be incorporated into the
Freemarker and Velocity Managers. Simply put, the TemplateMapProvider
(or whatever it should be called), would include all the statics
resources and dynamic resources needed for any template processing.
I understand that I do not have a deep knowledge of the architecture
of Struts 2, so I ask why the first and not second path was chosen
(the one of providing filters). More specifically, given the path of
SiteMesh and how it will be mixing velocity and freemarker in SiteMesh
3, it seems that the best path would be to use the Servlet model and
not the filter model in the future. So what am I missing?
-- Christian Stone
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Dale Newfield <da...@newfield.org>.
Christian Stone wrote:
> It isn't a problem if you use the filter bundled with Sitemesh.
> However, it doesn't work if you use the plugin filters...
Does that include com.opensymphony.module.sitemesh.filter.PageFilter ?
I use .jsp decorators and use s: tags within them (by putting the
sitemesh filter in between the StrutsPrepareFilter / StrutsExecuteFilter
pair).
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Christian Stone <xt...@stonescape.net>.
It isn't a problem if you use the filter bundled with Sitemesh.
However, it doesn't work if you use the plugin filters...
<filter>
<filter-name>sitemesh</filter-name>
<filter-
class>org.apache.struts2.sitemesh.FreeMarkerPageFilter</filter-class>
</filter>
You need to use this filter to access the valueStack and other struts
2 objects with your decorators. It is the filter recommended by the
struts 2 website for integration with sitemesh.
Hope this helps!
-- Christian
On Oct 21, 2009, at 12:00 PM, Dale Newfield wrote:
> I use struts 2.1.8 with freemarker 2.3.15 and sitemesh 2.4.2...I
> haven't witnessed any problems, but besides the freemarker that
> struts uses to expand tags I don't use freemarker in my project.
> Are there issues that I've not noticed, or do those issues only
> arise when using freemarker more exetensively?
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
--
_,--"
cws `-._ ________-_______ "----
_----'--'--------------------------------'--'----_
//_| | \ Christian Stone, Software Engineer / | |_\\
(_____|_|__= xtian@stonescape.net =__|_|_____)
_\_____=__ http://xtian.stonescape.net/ ___/_
\/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Re: sitemesh problem in 2.1.8
Posted by Musachy Barroso <mu...@gmail.com>.
I think this problem shows up when using Freemarker as the result of actions.
On Wed, Oct 21, 2009 at 9:00 AM, Dale Newfield <da...@newfield.org> wrote:
> I use struts 2.1.8 with freemarker 2.3.15 and sitemesh 2.4.2...I haven't
> witnessed any problems, but besides the freemarker that struts uses to
> expand tags I don't use freemarker in my project. Are there issues that
> I've not noticed, or do those issues only arise when using freemarker more
> exetensively?
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Dale Newfield <da...@newfield.org>.
I use struts 2.1.8 with freemarker 2.3.15 and sitemesh 2.4.2...I haven't
witnessed any problems, but besides the freemarker that struts uses to
expand tags I don't use freemarker in my project. Are there issues that
I've not noticed, or do those issues only arise when using freemarker
more exetensively?
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: sitemesh problem in 2.1.8
Posted by Christian Stone <xt...@stonescape.net>.
P.S. Sorry about the posting on the vote thread.
There is a good discussion about the three possible solutions with the
bug (http://issues.apache.org/struts/browse/WW-3275). The easiest
(but far from ideal) is to use the solution #2. However, there is a
complete rewrite of PageFilter.java with the new structure, and it
looks a lot of thought went into it. Additionally, they have not only
deprecated PageFilter, but removed the code (pretty aggressive). I
doubt they would do that without reason, so I suspect the migration to
the new code will have to happen sooner than later.
If I had a better understanding of the logic behind the code on the
Sitemesh side, I'd pull together the changes and submit them myself.
If no one has the knowledge of integrating with Sitemesh via the
plugin, I'd be happy to do it. I just figured that someone with a
whole lot more knowledge about the two codebases could easily fix it.
By the way, I will be very happy when the xwork codebase is brought in
under Struts 2. I have tried to check out the project several times
and build, and I always trip on the fact that the xwork artifact is
out of step with Struts 2. You know... Struts will require version
2.X, and the xwork artifact is at a lower version. This wouldn't stop
me from working on the plugin of course, but if I am testing stuff
with the full development builds, I would love to be able to easily
build the source and any changes to test with.
-- Christian Stone
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org