Re: [struts-user] XML based configuration

2019-04-17 Thread Lukasz Lenart
pon., 4 lut 2019 o 23:16 Dave  napisał(a):
>
> Hi Lukasz,
>
> Here's a summary of how Roller uses Struts and Tiles:
>
> Roller uses the StrutsPrepareAndExecute filter and maps it to all requests
> ending with “.rol”
> https://github.com/apache/roller/blob/master/app/src/main/webapp/WEB-INF/web.xml
>
> Roller’s actions are defined in struts.xml and return results of type
> “tiles”
> https://github.com/apache/roller/blob/master/app/src/main/resources/struts.xml
>
> Roller’s JSP pages are kept under /WEB-INF/jsps to prevent direct access to
> them. You can see that in the tiles.xml file
> https://github.com/apache/roller/blob/master/app/src/main/webapp/WEB-INF/tiles.xml
>
> Hope that is helpful. What else can I tell you about Roller and it's use of
> Struts & Tiles?

In my opinion it all looks good, I don't see any problems in your
current setup. Sorry for a late answer, I did review it early but
totally forgot to post my findings :(


Kind regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: [struts-user] XML based configuration

2019-02-12 Thread Yasser Zamani
We had similar resolved issue at [1]. Could you please see if [2] fixes this 
also?

Regards.

[1] 
https://lists.apache.org/thread.html/f4e1d1a5c917d0fa759cce667b23ef1e076c51ad7907dcfbdeb88707@%3Cdev.struts.apache.org%3E
[2] 
https://lists.apache.org/thread.html/3825d060bb13474987603719026bb06f66d28a388680e13a5858db57@%3Cdev.struts.apache.org%3E


>-Original Message-
>From: Jason Pyeron 
>Sent: Thursday, January 31, 2019 9:29 AM
>To: 'Struts Users Mailing List' 
>Subject: RE: [struts-user] XML based configuration
>
>> -Original Message-
>> From: Jason Pyeron 
>> Sent: Wednesday, January 30, 2019 9:53 PM
>> > -Original Message-
>> > From: Jason Pyeron 
>> > Sent: Wednesday, January 30, 2019 9:11 PM
>> >
>> > It has been 10+ years since I used the XML configuration, so please
>> > bear with me.
>> >
>> > I am attempting to deploy Apache Roller under a sub context
>> > (public#roller.war) so the url would be
>> > http://127.0.0.1:8080/public/roller/roller-ui/login.rol .
>> >
>> > When I do so, I get an exception cannot find definition named .Login
>> >
>
>So I think I have narrowed it down.
>
>file:/C:/programs.x64/apache-software-foundation/apache-tomcat-
>7.0.82/webapps/public#roller/WEB-INF/tiles.xml
>
>But when this URL is stored in the 
>org.apache.tiles.request.ApplicationResource,
>specifically org.apache.struts2.tiles.StrutsApplicationResource it is 
>splitting the
>URL in two:
>
>pathPrefix="/C:/programs.x64/apache-software-foundation/apache-tomcat-7.0"
>
>and
>
>suffix=".82/webapps/public"
>
>
>If I hack it with the debugger to :
>
>
>pathPrefix="/C:/programs.x64/apache-software-foundation/apache-tomcat-
>7.0.82/webapps/public#roller/WEB-INF/tiles.xml"
>
>and
>
>suffix=""
>
>It works until the next restart!
>
>
>
>-
>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>For additional commands, e-mail: user-h...@struts.apache.org



Re: [struts-user] XML based configuration

2019-02-04 Thread Dave
Hi Lukasz,

Here's a summary of how Roller uses Struts and Tiles:

Roller uses the StrutsPrepareAndExecute filter and maps it to all requests
ending with “.rol”
https://github.com/apache/roller/blob/master/app/src/main/webapp/WEB-INF/web.xml

Roller’s actions are defined in struts.xml and return results of type
“tiles”
https://github.com/apache/roller/blob/master/app/src/main/resources/struts.xml

Roller’s JSP pages are kept under /WEB-INF/jsps to prevent direct access to
them. You can see that in the tiles.xml file
https://github.com/apache/roller/blob/master/app/src/main/webapp/WEB-INF/tiles.xml

Hope that is helpful. What else can I tell you about Roller and it's use of
Struts & Tiles?

Best regards,
Dave



On Fri, Feb 1, 2019 at 2:41 AM Lukasz Lenart 
wrote:

> pt., 1 lut 2019 o 00:38 Dave  napisał(a):
> > Thanks for helping to track down this problem, Jason; Roller (and Struts
> in
> > general) should work at any path. Maybe this error is occuring because
> > Roller is using Struts/Tiles in a non-best practices way?
>
> Could you describe how do you use Struts/Tiles in Roller? Maybe I
> would be able to help :)
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: [struts-user] XML based configuration

2019-01-31 Thread Lukasz Lenart
pt., 1 lut 2019 o 00:38 Dave  napisał(a):
> Thanks for helping to track down this problem, Jason; Roller (and Struts in
> general) should work at any path. Maybe this error is occuring because
> Roller is using Struts/Tiles in a non-best practices way?

Could you describe how do you use Struts/Tiles in Roller? Maybe I
would be able to help :)


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [struts-user] XML based configuration

2019-01-31 Thread Dave
Thanks for helping to track down this problem, Jason; Roller (and Struts in
general) should work at any path. Maybe this error is occuring because
Roller is using Struts/Tiles in a non-best practices way?

Dave


On Thu, Jan 31, 2019 at 12:59 AM Jason Pyeron  wrote:

> > -Original Message-
> > From: Jason Pyeron 
> > Sent: Wednesday, January 30, 2019 9:53 PM
> > > -Original Message-
> > > From: Jason Pyeron 
> > > Sent: Wednesday, January 30, 2019 9:11 PM
> > >
> > > It has been 10+ years since I used the XML configuration, so please
> bear
> > > with me.
> > >
> > > I am attempting to deploy Apache Roller under a sub context
> > > (public#roller.war) so the url would be
> > > http://127.0.0.1:8080/public/roller/roller-ui/login.rol .
> > >
> > > When I do so, I get an exception cannot find definition named .Login
> > >
>
> So I think I have narrowed it down.
>
>
> file:/C:/programs.x64/apache-software-foundation/apache-tomcat-7.0.82/webapps/public#roller/WEB-INF/tiles.xml
>
> But when this URL is stored in the
> org.apache.tiles.request.ApplicationResource, specifically
> org.apache.struts2.tiles.StrutsApplicationResource it is splitting the URL
> in two:
>
> pathPrefix="/C:/programs.x64/apache-software-foundation/apache-tomcat-7.0"
>
> and
>
> suffix=".82/webapps/public"
>
>
> If I hack it with the debugger to :
>
>
>
> pathPrefix="/C:/programs.x64/apache-software-foundation/apache-tomcat-7.0.82/webapps/public#roller/WEB-INF/tiles.xml"
>
> and
>
> suffix=""
>
> It works until the next restart!
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


RE: [struts-user] XML based configuration

2019-01-30 Thread Jason Pyeron
> -Original Message-
> From: Jason Pyeron 
> Sent: Wednesday, January 30, 2019 9:53 PM
> > -Original Message-
> > From: Jason Pyeron 
> > Sent: Wednesday, January 30, 2019 9:11 PM
> >
> > It has been 10+ years since I used the XML configuration, so please bear
> > with me.
> >
> > I am attempting to deploy Apache Roller under a sub context
> > (public#roller.war) so the url would be
> > http://127.0.0.1:8080/public/roller/roller-ui/login.rol .
> >
> > When I do so, I get an exception cannot find definition named .Login
> >

So I think I have narrowed it down.

file:/C:/programs.x64/apache-software-foundation/apache-tomcat-7.0.82/webapps/public#roller/WEB-INF/tiles.xml

But when this URL is stored in the 
org.apache.tiles.request.ApplicationResource, specifically 
org.apache.struts2.tiles.StrutsApplicationResource it is splitting the URL in 
two:

pathPrefix="/C:/programs.x64/apache-software-foundation/apache-tomcat-7.0"

and

suffix=".82/webapps/public"


If I hack it with the debugger to :


pathPrefix="/C:/programs.x64/apache-software-foundation/apache-tomcat-7.0.82/webapps/public#roller/WEB-INF/tiles.xml"

and

suffix=""

It works until the next restart!



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: [struts-user] XML based configuration

2019-01-30 Thread Jason Pyeron



> -Original Message-
> From: Jason Pyeron 
> Sent: Wednesday, January 30, 2019 9:11 PM
> To: 'Struts Users Mailing List' 
> Subject: [struts-user] XML based configuration
> 
> It has been 10+ years since I used the XML configuration, so please bear
> with me.
> 
> I am attempting to deploy Apache Roller under a sub context
> (public#roller.war) so the url would be
> http://127.0.0.1:8080/public/roller/roller-ui/login.rol .
> 
> When I do so, I get an exception cannot find definition named .Login
> 
> 
>  extends="struts-default">
>  class="org.apache.roller.weblogger.ui.struts2.core.Login">
> .Login
> 
> 
> 
> 18:58:52.383 [http-bio-8092-exec-3] WARN
> org.apache.struts2.views.tiles.TilesResult - could not find @TilesDefinition
> for action: login
> org.apache.tiles.definition.NoSuchDefinitionException: Cannot find
> definition named '.Login'
> at
> org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContaine
> r.java:123)
> at
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161)
> at
> org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.ja
> va:208)

Tracking this down further, it seems it could be related to 
https://issues.apache.org/jira/browse/WW-4624 .

It seems that tiles.xml is not found once I change the context path to have a / 
in it. I tested by making the tiles.xml contain invalid XML content, and no 
errors were found. Once I moved the context path back to /roller/ from 
/public/roller/ it found the XML errors.

21:36:30.902 [http-bio-8092-exec-1] WARN  
org.apache.struts2.views.tiles.TilesResult - got TilesException while checking 
if definiton exists, ignoring it
org.apache.tiles.definition.DefinitionsFactoryException: XML error reading 
definitions.
at 
org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:328)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.loadDefinitionsFromResource(BaseLocaleUrlDefinitionDAO.java:150)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:239)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:230)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:230)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:208)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:197)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitions(ResolvingLocaleUrlDefinitionDAO.java:68)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.checkAndloadDefinitions(CachingLocaleUrlDefinitionDAO.java:179)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:131)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:105)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:49)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:89)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:286)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.impl.BasicTilesContainer.isValidDefinition(BasicTilesContainer.java:273)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.tiles.TilesContainerWrapper.isValidDefinition(TilesContainerWrapper.java:88)
 ~[tiles-api-3.0.7.jar:3.0.7]
at 
org.apache.tiles.impl.mgmt.CachingTilesContainer.isValidDefinition(CachingTilesContainer.java:100)
 ~[tiles-core-3.0.7.jar:3.0.7]
at 
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:136) 
[struts2-tiles-plugin-2.5.17.jar:2.5.17]
at 
org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:206)
 [struts2-core-2.5.17.jar:2.5.17]
at 
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:375)
 [struts2-core-2.5.17.jar:2.5.17]
...
Caused by: org.xml.sax.SAXParseException: The entity name must i