Tiles with Struts 2.1.5

2009-01-07 Thread Ercan Kayaonu
Hi,
I'm using Struts 2.1.5 with convention plugin. I'm in the learning process
and trying several things (action, rule annotations, hibernate etc).
Everything was working ok until today.  i started using Tiles.
I copied

struts2-tiles-plugin-2.1.5.jar
tiles-api-2.0.6.jar
tiles-core-2.0.6.jar
tiles-jsp-2.0.6.jar files into my lib folder. These files come with struts
2.1.5.

I added
listener

listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener-class
/listener
to web.xml file.

This is my struts.xml:
struts
package name=default extends=struts-default  (There was also
namespace=/, but later i removed it. but nothing changed)
result-types
result-type name=tiles
class=org.apache.struts2.views.tiles.TilesResult /
/result-types
 /package
/struts

I couldn't quite understand this package thing. Maybe the problem is with my
struts file. I can also paste tiles.xml if it is necessary to diagnose the
problem.
I get
HTTP Status 404 - /adv_ment/admin/login/index   problem. And these are the
lines from eclipse console:

SEVERE: Exception sending context initialized event to listener instance of
class org.apache.struts2.tiles.StrutsTilesListener
java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
at org.apache.tiles.definition.UrlDefinitionsFactory.init
at
org.apache.tiles.impl.BasicTilesContainer.initializeDefinitionsFactory
at org.apache.tiles.impl.BasicTilesContainer.init
..

Thanks in advance. Sorry for keeping it long.


Re: Tiles with Struts 2.1.5

2009-01-07 Thread Musachy Barroso
You are missing dependencies, in this case Commons Digester
(http://commons.apache.org/digester/)

musachy

On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu ekaya...@gmail.com wrote:
 Hi,
 I'm using Struts 2.1.5 with convention plugin. I'm in the learning process
 and trying several things (action, rule annotations, hibernate etc).
 Everything was working ok until today.  i started using Tiles.
 I copied

 struts2-tiles-plugin-2.1.5.jar
 tiles-api-2.0.6.jar
 tiles-core-2.0.6.jar
 tiles-jsp-2.0.6.jar files into my lib folder. These files come with struts
 2.1.5.

 I added
listener

 listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener-class
/listener
 to web.xml file.

 This is my struts.xml:
 struts
package name=default extends=struts-default  (There was also
 namespace=/, but later i removed it. but nothing changed)
result-types
result-type name=tiles
 class=org.apache.struts2.views.tiles.TilesResult /
/result-types
 /package
 /struts

 I couldn't quite understand this package thing. Maybe the problem is with my
 struts file. I can also paste tiles.xml if it is necessary to diagnose the
 problem.
 I get
 HTTP Status 404 - /adv_ment/admin/login/index   problem. And these are the
 lines from eclipse console:

 SEVERE: Exception sending context initialized event to listener instance of
 class org.apache.struts2.tiles.StrutsTilesListener
 java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
at org.apache.tiles.definition.UrlDefinitionsFactory.init
at
 org.apache.tiles.impl.BasicTilesContainer.initializeDefinitionsFactory
at org.apache.tiles.impl.BasicTilesContainer.init
 ..

 Thanks in advance. Sorry for keeping it long.




-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



RE: Tiles with Struts 2.1.5

2009-01-07 Thread Biesbrock, Kevin
Aha!  I had this same problem and was planning on submitting it today.
You beat me to it.

Commons Digester does not appear to be released with Struts 2.x ...
unless it is not named with Digester or I'm missing it.


Beez
( 4961 

-Original Message-
From: Musachy Barroso [mailto:musa...@gmail.com] 
Sent: Wednesday, January 07, 2009 10:43 AM
To: Struts Users Mailing List
Subject: Re: Tiles with Struts 2.1.5

You are missing dependencies, in this case Commons Digester
(http://commons.apache.org/digester/)

musachy

On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu ekaya...@gmail.com
wrote:
 Hi,
 I'm using Struts 2.1.5 with convention plugin. I'm in the learning 
 process and trying several things (action, rule annotations, hibernate
etc).
 Everything was working ok until today.  i started using Tiles.
 I copied

 struts2-tiles-plugin-2.1.5.jar
 tiles-api-2.0.6.jar
 tiles-core-2.0.6.jar
 tiles-jsp-2.0.6.jar files into my lib folder. These files come with 
 struts 2.1.5.

 I added
listener


listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener-c
lass
/listener
 to web.xml file.

 This is my struts.xml:
 struts
package name=default extends=struts-default  (There was
also
 namespace=/, but later i removed it. but nothing changed)
result-types
result-type name=tiles
 class=org.apache.struts2.views.tiles.TilesResult /
/result-types
 /package
 /struts

 I couldn't quite understand this package thing. Maybe the problem is 
 with my struts file. I can also paste tiles.xml if it is necessary to 
 diagnose the problem.
 I get
 HTTP Status 404 - /adv_ment/admin/login/index   problem. And these are
the
 lines from eclipse console:

 SEVERE: Exception sending context initialized event to listener 
 instance of class org.apache.struts2.tiles.StrutsTilesListener
 java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
at org.apache.tiles.definition.UrlDefinitionsFactory.init
at
 org.apache.tiles.impl.BasicTilesContainer.initializeDefinitionsFactory
at org.apache.tiles.impl.BasicTilesContainer.init
 ..

 Thanks in advance. Sorry for keeping it long.




--
Hey you! Would you help me to carry the stone? Pink Floyd

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




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



Re: Tiles with Struts 2.1.5

2009-01-07 Thread Ercan Kayaonu
Thank you Musachy,
That solved my problem, but
I got this error, which might be very familiar for most of you:

The Result type [tiles] which is defined in the Result annotation on the
class [class actions.admin.LoginAction] or determined by the file extension
or is the default result type for the PackageConfig of the action, could not
be found as a result-type defined for the Struts/XWork package
[actions.admin#convention-default#/admin/login] - [unknown location]

actions.admin.LoginAction.java:

  @Action(value=/admin/login/index,result...@result(name=success,
type=tiles, location=admin.login) })   (I have definition in tiles.xml
for admin.login.)
  public String execute() {
return SUCCESS;
}

struts.xml :
package name=default  namespace=/ extends=struts-default
result-types
result-type name=tiles
class=org.apache.struts2.views.tiles.TilesResult /
/result-types
 /package

Can anyone explain what name=default stands for, because i changed it as
name=admin, i got the same error.
and also [actions.admin#convention-default#/admin/login] .  What is
#convention-default# ? Is it actions because convention plugin looks for
actions package. Or is it something we define in config files?
Thanks in advance.


On Wed, Jan 7, 2009 at 3:42 PM, Musachy Barroso musa...@gmail.com wrote:

 You are missing dependencies, in this case Commons Digester
 (http://commons.apache.org/digester/)

 musachy

 On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu ekaya...@gmail.com wrote:
  Hi,
  I'm using Struts 2.1.5 with convention plugin. I'm in the learning
 process
  and trying several things (action, rule annotations, hibernate etc).
  Everything was working ok until today.  i started using Tiles.
  I copied
 
  struts2-tiles-plugin-2.1.5.jar
  tiles-api-2.0.6.jar
  tiles-core-2.0.6.jar
  tiles-jsp-2.0.6.jar files into my lib folder. These files come with
 struts
  2.1.5.
 
  I added
 listener
 
 
 listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener-class
 /listener
  to web.xml file.
 
  This is my struts.xml:
  struts
 package name=default extends=struts-default  (There was also
  namespace=/, but later i removed it. but nothing changed)
 result-types
 result-type name=tiles
  class=org.apache.struts2.views.tiles.TilesResult /
 /result-types
  /package
  /struts
 
  I couldn't quite understand this package thing. Maybe the problem is with
 my
  struts file. I can also paste tiles.xml if it is necessary to diagnose
 the
  problem.
  I get
  HTTP Status 404 - /adv_ment/admin/login/index   problem. And these are
 the
  lines from eclipse console:
 
  SEVERE: Exception sending context initialized event to listener instance
 of
  class org.apache.struts2.tiles.StrutsTilesListener
  java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
 at org.apache.tiles.definition.UrlDefinitionsFactory.init
 at
  org.apache.tiles.impl.BasicTilesContainer.initializeDefinitionsFactory
 at org.apache.tiles.impl.BasicTilesContainer.init
  ..
 
  Thanks in advance. Sorry for keeping it long.
 



 --
 Hey you! Would you help me to carry the stone? Pink Floyd

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




Re: Tiles with Struts 2.1.5

2009-01-07 Thread Ercan Kayaonu
There's commons-digester-1.8.jar under struts 2.1.5 lib files. you also need
commons-beanutils-1.7.0.jar.
The location for 2.1.5 is
http://people.apache.org/builds/struts/2.1.5/

On Wed, Jan 7, 2009 at 4:21 PM, Biesbrock, Kevin
biesbrock.ke...@aoins.comwrote:

 Aha!  I had this same problem and was planning on submitting it today.
 You beat me to it.

 Commons Digester does not appear to be released with Struts 2.x ...
 unless it is not named with Digester or I'm missing it.


 Beez
 ( 4961

 -Original Message-
 From: Musachy Barroso [mailto:musa...@gmail.com]
 Sent: Wednesday, January 07, 2009 10:43 AM
 To: Struts Users Mailing List
 Subject: Re: Tiles with Struts 2.1.5

 You are missing dependencies, in this case Commons Digester
 (http://commons.apache.org/digester/)

 musachy

 On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu ekaya...@gmail.com
 wrote:
  Hi,
  I'm using Struts 2.1.5 with convention plugin. I'm in the learning
  process and trying several things (action, rule annotations, hibernate
 etc).
  Everything was working ok until today.  i started using Tiles.
  I copied
 
  struts2-tiles-plugin-2.1.5.jar
  tiles-api-2.0.6.jar
  tiles-core-2.0.6.jar
  tiles-jsp-2.0.6.jar files into my lib folder. These files come with
  struts 2.1.5.
 
  I added
 listener
 
 
 listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener-c
 lass
 /listener
  to web.xml file.
 
  This is my struts.xml:
  struts
 package name=default extends=struts-default  (There was
 also
  namespace=/, but later i removed it. but nothing changed)
 result-types
 result-type name=tiles
  class=org.apache.struts2.views.tiles.TilesResult /
 /result-types
  /package
  /struts
 
  I couldn't quite understand this package thing. Maybe the problem is
  with my struts file. I can also paste tiles.xml if it is necessary to
  diagnose the problem.
  I get
  HTTP Status 404 - /adv_ment/admin/login/index   problem. And these are
 the
  lines from eclipse console:
 
  SEVERE: Exception sending context initialized event to listener
  instance of class org.apache.struts2.tiles.StrutsTilesListener
  java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
 at org.apache.tiles.definition.UrlDefinitionsFactory.init
 at
  org.apache.tiles.impl.BasicTilesContainer.initializeDefinitionsFactory
 at org.apache.tiles.impl.BasicTilesContainer.init
  ..
 
  Thanks in advance. Sorry for keeping it long.
 



 --
 Hey you! Would you help me to carry the stone? Pink Floyd

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




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




Re: Tiles with Struts 2.1.5

2009-01-07 Thread Musachy Barroso
To use a result, the action needs to be in the package that defines
the result, or in a package that extends the package where the result
is defined.  There are several ways to fix this, in this case you can
just set the parent package of the action, to your package:

@ParentPackage(admin)

or change the default parent package for all your actions (the ones
configured by Convention):

constant name=struts.convention.default.parent.package value=admin /

musachy

On Wed, Jan 7, 2009 at 11:25 AM, Ercan Kayaonu ekaya...@gmail.com wrote:
 Thank you Musachy,
 That solved my problem, but
 I got this error, which might be very familiar for most of you:

 The Result type [tiles] which is defined in the Result annotation on the
 class [class actions.admin.LoginAction] or determined by the file extension
 or is the default result type for the PackageConfig of the action, could not
 be found as a result-type defined for the Struts/XWork package
 [actions.admin#convention-default#/admin/login] - [unknown location]

 actions.admin.LoginAction.java:

  @Action(value=/admin/login/index,result...@result(name=success,
 type=tiles, location=admin.login) })   (I have definition in tiles.xml
 for admin.login.)
  public String execute() {
return SUCCESS;
}

 struts.xml :
package name=default  namespace=/ extends=struts-default
result-types
result-type name=tiles
 class=org.apache.struts2.views.tiles.TilesResult /
/result-types
 /package

 Can anyone explain what name=default stands for, because i changed it as
 name=admin, i got the same error.
 and also [actions.admin#convention-default#/admin/login] .  What is
 #convention-default# ? Is it actions because convention plugin looks for
 actions package. Or is it something we define in config files?
 Thanks in advance.


 On Wed, Jan 7, 2009 at 3:42 PM, Musachy Barroso musa...@gmail.com wrote:

 You are missing dependencies, in this case Commons Digester
 (http://commons.apache.org/digester/)

 musachy

 On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu ekaya...@gmail.com wrote:
  Hi,
  I'm using Struts 2.1.5 with convention plugin. I'm in the learning
 process
  and trying several things (action, rule annotations, hibernate etc).
  Everything was working ok until today.  i started using Tiles.
  I copied
 
  struts2-tiles-plugin-2.1.5.jar
  tiles-api-2.0.6.jar
  tiles-core-2.0.6.jar
  tiles-jsp-2.0.6.jar files into my lib folder. These files come with
 struts
  2.1.5.
 
  I added
 listener
 
 
 listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener-class
 /listener
  to web.xml file.
 
  This is my struts.xml:
  struts
 package name=default extends=struts-default  (There was also
  namespace=/, but later i removed it. but nothing changed)
 result-types
 result-type name=tiles
  class=org.apache.struts2.views.tiles.TilesResult /
 /result-types
  /package
  /struts
 
  I couldn't quite understand this package thing. Maybe the problem is with
 my
  struts file. I can also paste tiles.xml if it is necessary to diagnose
 the
  problem.
  I get
  HTTP Status 404 - /adv_ment/admin/login/index   problem. And these are
 the
  lines from eclipse console:
 
  SEVERE: Exception sending context initialized event to listener instance
 of
  class org.apache.struts2.tiles.StrutsTilesListener
  java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
 at org.apache.tiles.definition.UrlDefinitionsFactory.init
 at
  org.apache.tiles.impl.BasicTilesContainer.initializeDefinitionsFactory
 at org.apache.tiles.impl.BasicTilesContainer.init
  ..
 
  Thanks in advance. Sorry for keeping it long.
 



 --
 Hey you! Would you help me to carry the stone? Pink Floyd

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






-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



RE: Tiles with Struts 2.1.5

2009-01-07 Thread Biesbrock, Kevin
My bad.  The commons-digester does not exist in the 2.0.12 release (I
thought I was using 2.1.5 already).

I'll just obtain the 1.8 version either from the website or from the
S2.1.5 lib.

Thanks,

Beez
( 4961 

-Original Message-
From: Ercan Kayaonu [mailto:ekaya...@gmail.com] 
Sent: Wednesday, January 07, 2009 11:30 AM
To: Struts Users Mailing List
Subject: Re: Tiles with Struts 2.1.5

There's commons-digester-1.8.jar under struts 2.1.5 lib files. you also
need commons-beanutils-1.7.0.jar.
The location for 2.1.5 is
http://people.apache.org/builds/struts/2.1.5/

On Wed, Jan 7, 2009 at 4:21 PM, Biesbrock, Kevin
biesbrock.ke...@aoins.comwrote:

 Aha!  I had this same problem and was planning on submitting it today.
 You beat me to it.

 Commons Digester does not appear to be released with Struts 2.x ...
 unless it is not named with Digester or I'm missing it.


 Beez
 ( 4961

 -Original Message-
 From: Musachy Barroso [mailto:musa...@gmail.com]
 Sent: Wednesday, January 07, 2009 10:43 AM
 To: Struts Users Mailing List
 Subject: Re: Tiles with Struts 2.1.5

 You are missing dependencies, in this case Commons Digester
 (http://commons.apache.org/digester/)

 musachy

 On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu ekaya...@gmail.com
 wrote:
  Hi,
  I'm using Struts 2.1.5 with convention plugin. I'm in the learning 
  process and trying several things (action, rule annotations, 
  hibernate
 etc).
  Everything was working ok until today.  i started using Tiles.
  I copied
 
  struts2-tiles-plugin-2.1.5.jar
  tiles-api-2.0.6.jar
  tiles-core-2.0.6.jar
  tiles-jsp-2.0.6.jar files into my lib folder. These files come with 
  struts 2.1.5.
 
  I added
 listener
 
 
 listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener
 -c
 lass
 /listener
  to web.xml file.
 
  This is my struts.xml:
  struts
 package name=default extends=struts-default  (There was
 also
  namespace=/, but later i removed it. but nothing changed)
 result-types
 result-type name=tiles
  class=org.apache.struts2.views.tiles.TilesResult /
 /result-types
  /package
  /struts
 
  I couldn't quite understand this package thing. Maybe the problem is

  with my struts file. I can also paste tiles.xml if it is necessary 
  to diagnose the problem.
  I get
  HTTP Status 404 - /adv_ment/admin/login/index   problem. And these
are
 the
  lines from eclipse console:
 
  SEVERE: Exception sending context initialized event to listener 
  instance of class org.apache.struts2.tiles.StrutsTilesListener
  java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
 at org.apache.tiles.definition.UrlDefinitionsFactory.init
 at
 
org.apache.tiles.impl.BasicTilesContainer.initializeDefinitionsFactory
 at org.apache.tiles.impl.BasicTilesContainer.init
  ..
 
  Thanks in advance. Sorry for keeping it long.
 



 --
 Hey you! Would you help me to carry the stone? Pink Floyd

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




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




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



Re: Tiles with Struts 2.1.5

2009-01-07 Thread Ercan Kayaonu
Hi,
Sorry for disturbing you guys this much. Be sure that i first google to
solve the problem and read related parts of the documentation. But
unfortunately some of them are very concise. Anyways.

I tried both
constant name=struts.convention.default.parent.package
value=actions /
and
constant name=struts.convention.default.parent.package value=admin
/
but I got this error: Unable to locate parent package [actions] - [unknown
location]   and this for second one.
   Unable to locate parent package [admin] -
[unknown location]

I also tried annotation method. My LoginAction.java class is already under
actions.admin package. (LoginAction.java is directly under admin package and
there's no other package under admin). so the parent class for this package
is i guess admin. Why do i have to set it again. For all my actions, the
default package is actions. But this didn't work also. I mean, constant
name=struts.convention.default.parent.package value=actions /.

Quote: To use a result, the action needs to be in the package that defines
the result
Sorry, but could you please clarify what it mean to be in the package that
defines the result. do you mean in struts.xml where we define
result-types. I also tried changing those lines as follows
package name=default  namespace=*actions.admin*
extends=struts-default
result-types
result-type name=tiles
class=org.apache.struts2.views.tiles.TilesResult /
/result-types
 /package
But no luck. My problem is playing with several setting blindly. I haven't
fully understood some of the concepts i guess. Documentations give examples
in a isolated manner. You can't relate to under parts of the system. For
example, from tiles plugin documentation

result-types
result-type name=tiles
class=org.apache.struts2.views.tiles.TilesResult/
/result-types

What should be the package name, namespace etc. there's no clue. I couldn't
find the solution in tiles.apache.org also.  Can someone advice a tutorial
on tiles and struts2 (step by step).

Thanks for your efforts.


On Wed, Jan 7, 2009 at 4:30 PM, Musachy Barroso musa...@gmail.com wrote:

 To use a result, the action needs to be in the package that defines
 the result, or in a package that extends the package where the result
 is defined.  There are several ways to fix this, in this case you can
 just set the parent package of the action, to your package:

 @ParentPackage(admin)

 or change the default parent package for all your actions (the ones
 configured by Convention):

 constant name=struts.convention.default.parent.package value=admin /

 musachy

 On Wed, Jan 7, 2009 at 11:25 AM, Ercan Kayaonu ekaya...@gmail.com wrote:
  Thank you Musachy,
  That solved my problem, but
  I got this error, which might be very familiar for most of you:
 
  The Result type [tiles] which is defined in the Result annotation on the
  class [class actions.admin.LoginAction] or determined by the file
 extension
  or is the default result type for the PackageConfig of the action, could
 not
  be found as a result-type defined for the Struts/XWork package
  [actions.admin#convention-default#/admin/login] - [unknown location]
 
  actions.admin.LoginAction.java:
 
   @Action(value=/admin/login/index,result...@result(name=success,
  type=tiles, location=admin.login) })   (I have definition in
 tiles.xml
  for admin.login.)
   public String execute() {
 return SUCCESS;
 }
 
  struts.xml :
 package name=default  namespace=/ extends=struts-default
 result-types
 result-type name=tiles
  class=org.apache.struts2.views.tiles.TilesResult /
 /result-types
  /package
 
  Can anyone explain what name=default stands for, because i changed it
 as
  name=admin, i got the same error.
  and also [actions.admin#convention-default#/admin/login] .  What is
  #convention-default# ? Is it actions because convention plugin looks
 for
  actions package. Or is it something we define in config files?
  Thanks in advance.
 
 
  On Wed, Jan 7, 2009 at 3:42 PM, Musachy Barroso musa...@gmail.com
 wrote:
 
  You are missing dependencies, in this case Commons Digester
  (http://commons.apache.org/digester/)
 
  musachy
 
  On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu ekaya...@gmail.com
 wrote:
   Hi,
   I'm using Struts 2.1.5 with convention plugin. I'm in the learning
  process
   and trying several things (action, rule annotations, hibernate etc).
   Everything was working ok until today.  i started using Tiles.
   I copied
  
   struts2-tiles-plugin-2.1.5.jar
   tiles-api-2.0.6.jar
   tiles-core-2.0.6.jar
   tiles-jsp-2.0.6.jar files into my lib folder. These files come with
  struts
   2.1.5.
  
   I added
  listener
  
  
 
 listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener-class
  /listener
   to web.xml file.
  
   This is my struts.xml:
   struts
  package name=default extends=struts-default  (There was
 also
   namespace=/, 

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Antonio
2009/1/7 Ercan Kayaonu ekaya...@gmail.com:
 Can someone advice a tutorial
 on tiles and struts2 (step by step).

Heh, Tiles and Struts 2 seem to be two isolated worlds.
The strangest thing is that a lot of people are using this pair, but
no one is contributing.
If you *really* want them to work well together, stop complaining and
start contributing.

Ciao
Antonio

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



Re: Tiles with Struts 2.1.5

2009-01-07 Thread Musachy Barroso
The value attribute needs to match the name of a package that is
defined somewhere, if you do this:

constant name=struts.convention.default.parent.package value=admin/

make sure that your package is like

package name=admin.../package

musachy

On Wed, Jan 7, 2009 at 12:17 PM, Ercan Kayaonu ekaya...@gmail.com wrote:
 Hi,
 Sorry for disturbing you guys this much. Be sure that i first google to
 solve the problem and read related parts of the documentation. But
 unfortunately some of them are very concise. Anyways.

 I tried both
constant name=struts.convention.default.parent.package
 value=actions /
 and
constant name=struts.convention.default.parent.package value=admin
 /
 but I got this error: Unable to locate parent package [actions] - [unknown
 location]   and this for second one.
   Unable to locate parent package [admin] -
 [unknown location]

 I also tried annotation method. My LoginAction.java class is already under
 actions.admin package. (LoginAction.java is directly under admin package and
 there's no other package under admin). so the parent class for this package
 is i guess admin. Why do i have to set it again. For all my actions, the
 default package is actions. But this didn't work also. I mean, constant
 name=struts.convention.default.parent.package value=actions /.

 Quote: To use a result, the action needs to be in the package that defines
 the result
 Sorry, but could you please clarify what it mean to be in the package that
 defines the result. do you mean in struts.xml where we define
 result-types. I also tried changing those lines as follows
package name=default  namespace=*actions.admin*
 extends=struts-default
result-types
result-type name=tiles
 class=org.apache.struts2.views.tiles.TilesResult /
/result-types
 /package
 But no luck. My problem is playing with several setting blindly. I haven't
 fully understood some of the concepts i guess. Documentations give examples
 in a isolated manner. You can't relate to under parts of the system. For
 example, from tiles plugin documentation

 result-types
result-type name=tiles
 class=org.apache.struts2.views.tiles.TilesResult/
 /result-types

 What should be the package name, namespace etc. there's no clue. I couldn't
 find the solution in tiles.apache.org also.  Can someone advice a tutorial
 on tiles and struts2 (step by step).

 Thanks for your efforts.


 On Wed, Jan 7, 2009 at 4:30 PM, Musachy Barroso musa...@gmail.com wrote:

 To use a result, the action needs to be in the package that defines
 the result, or in a package that extends the package where the result
 is defined.  There are several ways to fix this, in this case you can
 just set the parent package of the action, to your package:

 @ParentPackage(admin)

 or change the default parent package for all your actions (the ones
 configured by Convention):

 constant name=struts.convention.default.parent.package value=admin /

 musachy

 On Wed, Jan 7, 2009 at 11:25 AM, Ercan Kayaonu ekaya...@gmail.com wrote:
  Thank you Musachy,
  That solved my problem, but
  I got this error, which might be very familiar for most of you:
 
  The Result type [tiles] which is defined in the Result annotation on the
  class [class actions.admin.LoginAction] or determined by the file
 extension
  or is the default result type for the PackageConfig of the action, could
 not
  be found as a result-type defined for the Struts/XWork package
  [actions.admin#convention-default#/admin/login] - [unknown location]
 
  actions.admin.LoginAction.java:
 
   @Action(value=/admin/login/index,result...@result(name=success,
  type=tiles, location=admin.login) })   (I have definition in
 tiles.xml
  for admin.login.)
   public String execute() {
 return SUCCESS;
 }
 
  struts.xml :
 package name=default  namespace=/ extends=struts-default
 result-types
 result-type name=tiles
  class=org.apache.struts2.views.tiles.TilesResult /
 /result-types
  /package
 
  Can anyone explain what name=default stands for, because i changed it
 as
  name=admin, i got the same error.
  and also [actions.admin#convention-default#/admin/login] .  What is
  #convention-default# ? Is it actions because convention plugin looks
 for
  actions package. Or is it something we define in config files?
  Thanks in advance.
 
 
  On Wed, Jan 7, 2009 at 3:42 PM, Musachy Barroso musa...@gmail.com
 wrote:
 
  You are missing dependencies, in this case Commons Digester
  (http://commons.apache.org/digester/)
 
  musachy
 
  On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu ekaya...@gmail.com
 wrote:
   Hi,
   I'm using Struts 2.1.5 with convention plugin. I'm in the learning
  process
   and trying several things (action, rule annotations, hibernate etc).
   Everything was working ok until today.  i started using Tiles.
   I copied
  
   struts2-tiles-plugin-2.1.5.jar
   tiles-api-2.0.6.jar
   tiles-core-2.0.6.jar
   

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Musachy Barroso
btw this is not related to tiles, it all applies to any plugin that
defines results.

musachy

On Wed, Jan 7, 2009 at 12:23 PM, Musachy Barroso musa...@gmail.com wrote:
 The value attribute needs to match the name of a package that is
 defined somewhere, if you do this:

 constant name=struts.convention.default.parent.package value=admin/

 make sure that your package is like

 package name=admin.../package

 musachy

 On Wed, Jan 7, 2009 at 12:17 PM, Ercan Kayaonu ekaya...@gmail.com wrote:
 Hi,
 Sorry for disturbing you guys this much. Be sure that i first google to
 solve the problem and read related parts of the documentation. But
 unfortunately some of them are very concise. Anyways.

 I tried both
constant name=struts.convention.default.parent.package
 value=actions /
 and
constant name=struts.convention.default.parent.package value=admin
 /
 but I got this error: Unable to locate parent package [actions] - [unknown
 location]   and this for second one.
   Unable to locate parent package [admin] -
 [unknown location]

 I also tried annotation method. My LoginAction.java class is already under
 actions.admin package. (LoginAction.java is directly under admin package and
 there's no other package under admin). so the parent class for this package
 is i guess admin. Why do i have to set it again. For all my actions, the
 default package is actions. But this didn't work also. I mean, constant
 name=struts.convention.default.parent.package value=actions /.

 Quote: To use a result, the action needs to be in the package that defines
 the result
 Sorry, but could you please clarify what it mean to be in the package that
 defines the result. do you mean in struts.xml where we define
 result-types. I also tried changing those lines as follows
package name=default  namespace=*actions.admin*
 extends=struts-default
result-types
result-type name=tiles
 class=org.apache.struts2.views.tiles.TilesResult /
/result-types
 /package
 But no luck. My problem is playing with several setting blindly. I haven't
 fully understood some of the concepts i guess. Documentations give examples
 in a isolated manner. You can't relate to under parts of the system. For
 example, from tiles plugin documentation

 result-types
result-type name=tiles
 class=org.apache.struts2.views.tiles.TilesResult/
 /result-types

 What should be the package name, namespace etc. there's no clue. I couldn't
 find the solution in tiles.apache.org also.  Can someone advice a tutorial
 on tiles and struts2 (step by step).

 Thanks for your efforts.


 On Wed, Jan 7, 2009 at 4:30 PM, Musachy Barroso musa...@gmail.com wrote:

 To use a result, the action needs to be in the package that defines
 the result, or in a package that extends the package where the result
 is defined.  There are several ways to fix this, in this case you can
 just set the parent package of the action, to your package:

 @ParentPackage(admin)

 or change the default parent package for all your actions (the ones
 configured by Convention):

 constant name=struts.convention.default.parent.package value=admin /

 musachy

 On Wed, Jan 7, 2009 at 11:25 AM, Ercan Kayaonu ekaya...@gmail.com wrote:
  Thank you Musachy,
  That solved my problem, but
  I got this error, which might be very familiar for most of you:
 
  The Result type [tiles] which is defined in the Result annotation on the
  class [class actions.admin.LoginAction] or determined by the file
 extension
  or is the default result type for the PackageConfig of the action, could
 not
  be found as a result-type defined for the Struts/XWork package
  [actions.admin#convention-default#/admin/login] - [unknown location]
 
  actions.admin.LoginAction.java:
 
   @Action(value=/admin/login/index,result...@result(name=success,
  type=tiles, location=admin.login) })   (I have definition in
 tiles.xml
  for admin.login.)
   public String execute() {
 return SUCCESS;
 }
 
  struts.xml :
 package name=default  namespace=/ extends=struts-default
 result-types
 result-type name=tiles
  class=org.apache.struts2.views.tiles.TilesResult /
 /result-types
  /package
 
  Can anyone explain what name=default stands for, because i changed it
 as
  name=admin, i got the same error.
  and also [actions.admin#convention-default#/admin/login] .  What is
  #convention-default# ? Is it actions because convention plugin looks
 for
  actions package. Or is it something we define in config files?
  Thanks in advance.
 
 
  On Wed, Jan 7, 2009 at 3:42 PM, Musachy Barroso musa...@gmail.com
 wrote:
 
  You are missing dependencies, in this case Commons Digester
  (http://commons.apache.org/digester/)
 
  musachy
 
  On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu ekaya...@gmail.com
 wrote:
   Hi,
   I'm using Struts 2.1.5 with convention plugin. I'm in the learning
  process
   and trying several things (action, rule annotations, hibernate 

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Wendy Smoak
On Wed, Jan 7, 2009 at 8:38 AM, Ercan Kayaonu ekaya...@gmail.com wrote:

 I'm using Struts 2.1.5 with convention plugin. I'm in the learning process
 and trying several things (action, rule annotations, hibernate etc).

Since we're on the user list, be aware that Struts 2.1.5 is not an
official release.  It was a test build posted on the dev list for
evaluation, and shouldn't be used unless you're comfortable out on the
bleeding edge.  And if you _are_, come join us on the dev list where a
vote for 2.1.6 is underway, and help test that. :)

-- 
Wendy

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