Re: [OT] Killer Scam

2008-02-04 Thread Greg Reddin
On Feb 4, 2008 11:00 AM, bhaarat Sharma [EMAIL PROTECTED] wrote:
 I didnt get it. or maybe i deleted it already.

 Anyone wana paste what it read?

Antonio's post had the link:

http://www.scamorama.com/killer.html

Maybe you should be worried if you didn't get one :-)

Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Killer Scam

2008-02-04 Thread Greg Reddin
That's awesome :-)

On Feb 4, 2008 11:30 AM, Wes Wannemacher [EMAIL PROTECTED] wrote:
 Sorry everyone, I guess I should take two lessons away from this -

 1. No matter how frustrated you get with a project, you should never
 take it out on other users.

 2. I should do a bit more research on the integrity of the hitmen I
 hire before agreeing to a contract.

 There is nothing to worry about, I already revoked the contract.

 -Wes

 Disclaimer: This is a JOKE! I am more of a do-it-yourself kind of guy
 anyways, a contract hit wouldn't be my style.

 On 2/4/08, Greg Reddin [EMAIL PROTECTED] wrote:

  On Feb 4, 2008 11:00 AM, bhaarat Sharma [EMAIL PROTECTED] wrote:
   I didnt get it. or maybe i deleted it already.
  
   Anyone wana paste what it read?
 
  Antonio's post had the link:
 
  http://www.scamorama.com/killer.html
 
  Maybe you should be worried if you didn't get one :-)
 
  Greg
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Wesley Wannemacher
 President, Head Engineer/Consultant
 WanTii, Inc.
 http://www.wantii.com


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Killer Scam

2008-02-04 Thread Greg Reddin
On Feb 4, 2008 4:47 AM, Antonio Petrelli [EMAIL PROTECTED] wrote:
 I received an email scam in my apache.org email that is,
 substantially, the first in this list:
 http://www.scamorama.com/killer.html

 Did you receive such a letter?

Yep, I got one. Somebody don't like Tiles I guess :-)

Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts Tiles (1.3.8) - NoSuchMethodError Exception

2007-12-26 Thread Greg Reddin
On Dec 26, 2007 4:45 PM, Mohamed Mohideen [EMAIL PROTECTED] wrote:
 Hello there,
  I am trying the basic template example from Struts Tiles(1.3.8) website. I 
 started with struts-blank-1.3.8.war. Getting the following exception.
  Looks like it's failing in the following line...

 tiles:insert beanName=templateDefinition /

 Some one suggested to replace it beanName to definition. It didn't help. 
 Please shed your lights.

I think the suggestion might be correct regardless. The difference is
that beanName is looking for a named bean in a defined scope (page,
request, session, application), while definition is looking for a
named definition defined in the tiles-defs.xml file and/or at runtime.
So if you're referencing beanName then there needs to be a bean
available in some scope by that name templateDefinition. Since it's
an example it may very well be correct, but it could very well be an
error in the example.

The error sounds like you might have incompatible versions of Struts
and Struts-Tiles. Is it possible that another Tiles version is in your
classpath or something? I don't have the war file readily available to
check.

HTH,
Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: integrating Tiles in Struts2

2007-04-03 Thread Greg Reddin

On 4/2/07, Marco Carnevale [EMAIL PROTECTED] wrote:


I had a few issues while working with tiles 2 / struts 2.  Mainly the
problem I found was that the documentation I was reading(
http://struts.apache.org/2.x/docs/tiles-plugin.html ) has incorrect
information.



Could you open a JIRA ticket and submit ths information so we'll know we
need to fix it?

   https://issues.apache.org/struts/secure/Dashboard.jspa

Thanks,
Greg


Re: Tiles 2

2007-03-29 Thread Greg Reddin

On 3/29/07, David Harland [EMAIL PROTECTED] wrote:


Does anyone know when Tiles 2 will have a production release?



Not really.  It's based on quality more than an arbitrary tag.  The best way
to speed up the process is to have people start using it in earnest and
giving feedback in earnest.  That way we'll have a better idea of how far
from production we actually are. Having said that, we're making progress
toward a new release that has a better chance than anything we've done so
far :-)

HTH,
Greg


Re: Can I force Struts2 to use Tiles(1)??

2007-03-27 Thread Greg Reddin

On 3/27/07, Andreas Imner [EMAIL PROTECTED] wrote:


Using Google, I have found some threads about using Tiles with Struts2,
but they all seem to involve using Tiles2 and not Tiles(1)



To my knowledge there is no way to use Struts 2 with Tiles 1.  If you
*require* Tiles 1 it would probably not be too difficult to write a plugin,
but integrating the libraries might be a bit more difficult.  If you're
having trouble getting Tiles 2 to work, but you have the patience to work
with it a bit you should ask some questions on the Tiles user list (
users@tiles.apache.org).  We could probably help you get things going and
explain the differences between version 1 and 2.

HTH,
Greg


Re: Re: Can I force Struts2 to use Tiles(1)??

2007-03-27 Thread Greg Reddin

On 3/27/07, Andreas Imner [EMAIL PROTECTED] wrote:


Does this mean that the Tiles-code actually in use when using the
plugin is = Tiles2 ?



Yes.

If so, is Tiles2 stable enough to use i a business critial

application, or do I need to look for a alternative for Tiles (like
Sitemesh) if I want to use Struts2?



I think a lot of people are using Sitemesh and other templating engines
successfully with Struts 2, so that's definitely an option.  Whether Tiles 2
is stable enough or not is a matter of opinion.  It is a lot more stable
than it was two months ago simply because we have released version 2.0.1.  I
think we are about to release 2.0.2.  So I would say we are on track for a
GA release - hopefully sometime in the next few months.  I would have to say
Tiles 2 is still experimental simply because we have not released anything
we are comfortable calling GA.  But the kind of sweeping API changes you've
seen in recent months should be nearing an end.

If you like the approach Tiles takes and you have a couple months of lead
time, I think you could make use of it.  Just subscribe to the Tiles lists
and see where it goes. Having some real users with real needs is probably
enough to motivate us to get a real release out :-)  If you're not committed
to the Tiles approach and you need something stable *right now* then you're
probably better off with Sitemesh or something else.

Greg


Re: Struts2 and Struts1 comingling w/ Tiles

2007-03-27 Thread Greg Reddin

On 3/27/07, Frank W. Zammetti [EMAIL PROTECTED] wrote:


Your saying that any S1 app using Tiles can't, based on your experience,
be run with part of it being S2-based, in the same WAR?  Could you
describe more what the problems you encountered were?



If I had to guess I would say that the problems are mostly due to the fact
that Struts 2 does not have support for Tiles 1.  So you'll have to migrate
to Tiles 2 at the same time.  I can't imagine there being huge
incompatibilities between Tiles 1 and 2 that would keep them from running
together in the same app, but it's certainly possible.  The biggest struggle
would likely be the taglib API differences between Tiles 1 and 2.

Greg


Re: Struts2 and Struts1 comingling w/ Tiles

2007-03-27 Thread Greg Reddin

On 3/27/07, Ray Clough [EMAIL PROTECTED] wrote:


I believe that it is NOT possible to use S1 with T2 or S2 with T1 - at
least not out of
the box.



I know Antonio has worked on T2 support for S1, but I don't think it's quite
ready yet

Greg


Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Greg Reddin

On 3/19/07, James Mitchell [EMAIL PROTECTED] wrote:


If I continue to think in Java, my ruby code will look (structurally)
like Java.  That's actually a natural progression that people will
make as they learn to think in Ruby.



Maybe that's why I haven't fallen in love with Ruby yet.  I haven't spent
enough time with it to start thinking in Ruby.

Sorry, I'm not trying to push Ruby on you guys, I just want to be

honest about my experience.



Anybody who thinks they'll be using the current technology for the rest of
their career is (one way or another) pretty close to the end of their career
:-)

Greg


Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-19 Thread Greg Reddin

On 3/19/07, Ted Husted [EMAIL PROTECTED] wrote:


To me, the attractive thing about Ruby is that it's a full stack. We
can code in Ruby, soup to nuts (turtles all the way down), and the
Rails framework provides an interesting way to generate starter
applications.

With Java and JavaScript integration, we're on the cusp of having a
JavaScript middleware stack. Writing Actions in JavaScript is a
trivial step. All we need is something like iBATIS written in
JavaScript to go with that. We already have an iBATIS for Ruby, why
not an iBATIS for Rhino?



This probably will make me less employable as the years wear on, but I find
that I just don't like the more dynamic languages (or scripting languages or
whatever you want to call them).  It's not an ego thing like I think it's a
tinkertoy or anything like that.  I think any of those could be
enterprise-capable if they are not already.  But it's a personality thing
for me.  I like to have a compiler to tell me some things are wrong before I
ever run the code.  I like to be able to say This is a String, This is an
int, This is a cat, or whatever and for the compiler to complain if I try
to use an int as if it were a cat.  I also like to be able to create ways to
turn an int into a cat if my program finds it useful.

I'm really not interested in getting something going very quickly (I did use
the word unemployable).  I prefer to be able to build something that has
flexibility, that can change as the users' needs change.  It may take longer
to build up front, but in the long run, it can grow more quickly.  Again,
you can do all that with the dynamic languages.  I just think Java is
cleaner.  The thing that attracted me to Java in the first place is that it
had the preciseness of C++ but a much cleaner approach to object-oriented
design and less ambiguity about many things (esp. pointers).  In a word,
it's easy (for me) to learn, yet powerful and flexible.  The best thing is
it tells me when I am wrong better than the dynamic languages.

In art class I always liked the slow, tedious, detailed drybrushing methods
much better than quick watercolor painting :-)  Give me time and I may come
around.  I could get into JavaScript a lot quicker than Ruby.  I could even
fall in love with Ruby, but I'm not there yet at all

Greg


Re: Problem while Struts 2 and Tiles 2 integration.

2007-02-15 Thread Greg Reddin

I would suspect that your problem lies in one of two areas:

1)  Your web app is not configured correctly.
2)  You're not using a build of Tiles 2 that is compatible with the version
of Struts.

I didn't see the exception you posted so it's hard to determine which.  I'll
check the archives if I get a chance today.

Most people seem to be finding success by following the example of the
tiles-test webapp:

   http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-test/

and:


http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/web.xml

HTH,
Greg


Re: Problem while Struts 2 and Tiles 2 integration.

2007-02-15 Thread Greg Reddin

On 2/15/07, Greg Reddin [EMAIL PROTECTED] wrote:


I would suspect that your problem lies in one of two areas:

1)  Your web app is not configured correctly.



Sorry, I may not have been very clear about this.  Your web app may likely
not be configured to match the build of Tiles you are using.  Check the
web.xml and see if it matches the link below.  If not you may either need to
change your web.xml or move to a different build of Tiles.


   
http://svn.apache.org/repos/asf/tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/web.xml





Greg


Re: [BEER] As Bugs Bunny would say, What a maroon.

2007-02-15 Thread Greg Reddin

On 2/15/07, Ted Husted [EMAIL PROTECTED] wrote:


OK, it's not Friday, but this one made me LOL.

 In that case, security researchers noted a problem with
 Vista's improved speech-recognition system, which lets
 people speak commands to the computer. It turns out that
 sounds played over the PC's speakers - on a malicious Web
 site configured for this very purpose, for example - can
 trigger Vista's speech-recognition engine and execute
 commands on a victim's computer.



Wow :-)  That's just nuts

Meanwhile, note the Mac ads running next to the article: The future of

security and the future of advertising, all on one page :)



I didn't see the Mac ad, but I saw several others.  I guess they never
rolled around to it, probably because I'm on a Mac.

Greg


[ANNOUNCEMENT] Apache Tiles Top Level Project

2007-01-15 Thread Greg Reddin

The Struts team is pleased to announce that Tiles has been promoted to its
own Top Level Project.  This move will allow us to stabilize the development
of the Tiles 2 framework and  push it towards its first final release.  The
website for the new project has not yet been published so here are the
relevant mailing lists.  Please direct all future questions and discussion
about Apache Tiles to one of the following lists:

* Tiles User Discussion [EMAIL PROTECTED]
* Tiles Development [EMAIL PROTECTED]
* SVN Commit Notifications [EMAIL PROTECTED]
* JIRA Issue Tracking Notifications [EMAIL PROTECTED]

The Tiles JIRA instance is hosted with the Struts project and can be found
here:

   https://issues.apache.org/struts/browse/TILES

The project website, when it is ready, will be found here:

   http://tiles.apache.org/

Please watch the Tiles mailing lists for future developments, which should
be happening fairly quickly now.  We thank the Struts Project for giving us
a place to start and to grow, and we look forward to great things from both
projects!

Thanks,
Apache Tiles PMC

PS.  I included the lists I'm part of in this message.  Please feel free to
forward to other appropriate lists.


Re: [tiles2] Latest version and build

2006-12-28 Thread Greg Reddin

On 12/28/06, Christy Kudlac [EMAIL PROTECTED] wrote:


Where
are we at in Tiles2 stability?  Are we still using snapshots or have we
gone to beta or rc yet?




To answer this question, Tiles was just approved as an Apache top-level
project.  In the Struts sandbox it has no chance of getting past SNAPSHOT
status and cannot be released.  It will soon have its own home and you can
look for a beta coming out soon after that I hope.

Watch the list for further announcements.  They should be coming in the next
few weeks.

Thanks,
Greg


Re: Simple Question about Tiles

2006-11-08 Thread Greg Reddin


On Nov 8, 2006, at 8:12 AM, Antonio Petrelli wrote:


Vinicius Carvalho ha scritto:

I have a list that is going to be iterated, and the bean inside it
will be checked, depending on a certain flag a tiles definition will
be used to display the content, kinda like this:

logic:iterate name=someList id=someBean'
logic:equal value=SIMPLE name=someBean property=displayType
tiles:insert definition=def.simple/
/logic:equal
logic:equal value=COMPLEX name=someBean property=displayType
tiles:insert definition=def.complex/
/logic:equal
And the list goes on ...
/logic:iterate

Now, inside my tiles I need to access someBean. But I'm not being  
able

to do so, I get an exception: Cannot find bean: someBean in any
scope


That's strange, in which scope did you put someBean? And how do  
you access someBean in your tiles?


Since the scope is not defined (can you define scope in the iterate  
tag? (It's ben a while)), I think someBean is in page scope.  So,  
it's no longer in scope inside your tiles definition.  You'll need it  
to be in request scope if you want everything to work the way you  
have it here.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where to download the Tiles build?

2006-10-26 Thread Greg Reddin


On Oct 26, 2006, at 12:51 PM, Vernon wrote:


I need the Tiles library from my other Spring
application. To my
knowledge, now the Tiles is separated from the Struts.


The Tiles 2 project is an effort to separate Tiles from Struts.   
Tiles 1.x is still part of the Struts 1.x framework.  I assume you're  
talking about the Tiles 2 project and the page you're referring to is  
here:


http://struts.apache.org/struts-sandbox/tiles/index.html


On the Tiles home
site, I can't see any lead to the download.


If you look far enough down the  Downloads section of the Tiles 2  
home page you'll see a link to this:


	http://people.apache.org/maven-snapshot-repository/org/apache/struts/ 
tiles/tiles-core/


HTH,
Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Too many moving parts in Tiles

2006-10-25 Thread Greg Reddin


On Oct 25, 2006, at 5:04 PM, Laurie Harper wrote:


Chris Pratt wrote:
Hmmm, I'm not using Tiles alone or Struts 2.  I'm using the Tiles  
integrated
into Struts 1.2.9.  I've tried using the ForwardAction to forward  
something

like:
   action path=/loginPage.jsp parameter=login.layout type=
org.apache.struts.actions.ForwardAction/
But it doesn't work, it just returns 404's.


You probably want something like

  action path=.tile.name ...


I think you actually want something like this:

action path=/somepage forward=tile.name/

The above assumes Struts 1.2.9 with the Tiles plugin installed.  Of  
course the path attribute is what you'd type into the browser and the  
forward attribute is the tiles def.


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Too many moving parts in Tiles

2006-10-25 Thread Greg Reddin


On Oct 25, 2006, at 6:01 PM, Chris Pratt wrote:


Greg, to answer your question, how do I think this should work?  One
improvement I can think of would be to allow this type of  
construct.  In the

tiles-defs.xml, specify a definition like:


[snip]


Then allow inserting, referencing and populating in one fell swoop,
something similar to:

%@ taglib prefix=tiles uri=http://struts.apache.org/tags-tiles- 
el%

tiles:insert definition=site.layout
 put name=header value=/tiles/index-header.jsp/
 put name=body value=/tiles/index-body.jsp/
 put name=footer value=/tiles/index-footer.jsp/
/tiles:insert

which right now ignores all the puts in the body of the insert and  
just

inserts the definition.  This would allow you to separate the reusable
definitions from the single use pages.


Thanks, that helps a lot.   I think there's a lot of people out there  
who would like it to work this way.  We've had some discussions on  
the dev list about restructuring the tags in Tiles 2.  The problem is  
that the tiles:insert tag means multiple things.  In some cases it  
means insert this definition here (like your example above).   In  
other cases it assumes you are inside a definition template and it  
means insert the specified attribute here.  I can see what you mean  
about trying to insert a definition on the fly instead of defining it  
in the XML file.  Have you tried using the tiles:definition tag?


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Too many moving parts in Tiles

2006-10-24 Thread Greg Reddin


On Oct 24, 2006, at 12:20 PM, Chris Pratt wrote:


First I have to create
an essentially empty file for each page that uses Tiles, something  
like:


%@ taglib prefix=tiles uri=http://struts.apache.org/tags-tiles- 
el%

tiles:insert definition=login.pane/


First off, I'm assuming you're using Tiles 2?  That may affect the  
way we answer the rest of your questions.


This is a drawback to using Tiles in standalone mode.  Tiles is meant  
to be inserted into the view layer of an MVC application.  It is  
meant to interface with the controller component of an MVC  
framework.  So, if you're using Struts or JSF, you'd configure your  
controller layer to forward requests to Tiles.  Instead of a 2-line  
JSP page along with a Tile definition and associated pages for every  
page you'd have 2 lines of configuration in your controller layer  
along with the Tiles components for every page.  But in standalone  
mode you don't have a front controller so your intermediate JSP page  
becomes the front controller.  In my current project I'm using  
Facelets.  I'd like to see Tiles implement a feature of Facelets in  
which the page calls the template.  Tiles works the other way  
around.  In Tiles you have to define a definition that references  
both the template and the page content.  In Facelets you invoke a  
page that, in turn, pulls in a template.


But Tiles is currently missing this feature.  Maybe you should  
consider including a controller in your app to avoid this problem.   
Currently, there is no Struts 1.x support for Tiles 2, but there is  
Struts 2 and JSF (by way of Shale) support.  Note that I haven't used  
either in an application yet.



Then since 90% of our files are separated into a blue section (with
breadcrumbs) at the top of the page and a white section at the  
bottom, I
extended the main layout definition to add those tiles.  But to  
extend a
tile it apparently takes two definitions (which doesn't make any  
sense to

me):

 definition name=default.pane extends=site.layout
   put name=body value=default.layout type=definition/
 /definition

 definition name=default.layout path=default-layout.jsp
   put name=bluearea value=/tiles/blank.jsp type=page/
   put name=whitearea value=/tiles/blank.jsp type=page/
   putList name=breadcrumbs
 add value=/|head.home type=string/
   /putList
 /definition


The above defines the frame of your template, but you don't have to  
provide 2 defs for every page do you?  For example, for a foobar  
page you only need the following (plus the intermediate JSP page),  
correct?


definition name=foobar extends=default.layout
  put name=bluearea value=mybluearea.jsp/
  put name=whitearea value=mywhitearea.jsp/
/definition

Or have I missed something?

I've heard talk of nested definitions whereby maybe you could combine  
default.pane and default.layout into one, but I'm not sure if it  
works or if it would be a best practice.  It might depend on who you  
ask :-)  The fact that you can extend definitions is a good thing,  
IMO, but you can only take the inheritance paradigm so far before it  
breaks down when dealing with XML-based definitions.



And since our site is internationalized we have externalized text in
resources as well as internationalized tiles_defs_fr.xml files.  It  
seems

like Tiles is making flow and maintainability harder not easier.


To this point, in some cases, you're probably correct.  It would be  
helpful if you would think for a minute about how you might like it  
to work.  If you can post some example defs and pages that would  
represent your ideal environment we might be able to modify Tiles to  
suit.For example:


*  What would be your alternative to using the intermediate JSP?
*  What would be your alternative to using 2 extension defs to build  
90% of your pages?  (I know the answer is one def, but what would  
it look like?)


With Tiles 2, we're still in development so, pretty much anything goes.


Is there a
best practice document somewhere that defines how to use this  
technology to

make life easier rather than just making more work?


Well, the doc is in progress.  This is the best we can provide right  
now:


http://struts.apache.org/struts-sandbox/tiles/index.html

I think we have some best practices in mind, we just haven't had a  
chance to get them into the official docs yet.


Thanks,
Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Struts2] Issue w/ Tiles.

2006-10-06 Thread Greg Reddin


On Oct 6, 2006, at 10:24 AM, Dave Newton wrote:


Using Tiles is probably a requirement but I'm having problems figuring
out which builds I'm supposed to be using with Struts2 (and I'm only
assuming it's a versioning/snapshot issue). (I'm not supposed to use
anything new besides Struts2 for this-I didn't tell them it's using
Spring for its IoC ;)


[snip]

Using the non-dated snapshot I get the following dump (only pasting  
root

cause):



java.lang.NoSuchMethodError:
org.apache.tiles.ComponentContext.getContext(Ljavax/servlet/ 
ServletReque

st;)Lorg/apache/tiles/ComponentContext;

at
org.apache.struts2.views.tiles.TilesResult.getComponentContext 
(TilesResu

lt.java:172)


I can't comment on the NPE of the dated snapshot, but on this one you  
have a mismatch in the version of TilesResult and the version of  
Tiles2.  The latest version of TilesResult is using the TilesContext  
API, but it looks like your version of TilesResult is using an older  
Tiles API.  Everything in svn is currently in sync.  Maybe we need to  
release a new snapshot of the package that contains TilesResult?  I'm  
not really sure where the mismatch is.


Greg




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [tiles] page content

2006-08-30 Thread Greg Reddin


On Aug 30, 2006, at 8:40 AM, Mehdi Bahribayli wrote:

II. I think you have misunderstood what I wanted to say. I think  
there is no need for /subviews/welcome.jspf because it is used just  
once and there is no need to put the contenet in a separate file. I  
think both /subviews/welcome.jspf and /views/welcome.jsp are one  
and same thing and should be integrated into one file. (5 elements  
instead of 6 elements)


Can you post the contents of these 2 files?  It's hard to know  
exactly what you are talking about without seeing that.


One thing that has often bothered me about Tiles in a standalone web  
application is the need for a JSP page that calls a tiles  
definition.  If I understand your original question it sounds like  
this is what is bothering you too.  Consider the following from the  
Tiles 2.0 test application:


tiles-defs.xml
  definition name=doc.mainLayout path=/layout/classicLayout.jsp
  put name=title  value=Tiles Library Documentation /
  put name=header value=/common/header.jsp /
  put name=menu   value=doc.menu.main /
  put name=footer value=/common/footer.jsp /
  put name=body   value=doc.portal.body /
  /definition

In this case you have a tile called doc.mainLayout.  In most cases  
you want to have a URL that pulls in the doc.mainLayout and replaces  
the body component with something else.  Right now you have to  
create an intermediate JSP page:


intermediate.jsp

tiles:insert name=doc.mainLayout
  tiles:put name=body value=/somenewpage.jsp/
/tiles:insert

Right now, I don't think there's a way around that problem, but it's  
perhaps a missing feature in Tiles that we will eventually correct.   
More discussion on that in a separate thread.


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Tiles 2.0] Tiles Without Intermediate Pages WAS: [tiles] page content

2006-08-30 Thread Greg Reddin
One thing that has often bothered me about Tiles in a standalone web  
application is the need for a JSP page that calls a tiles  
definition.  Consider the following from the Tiles 2.0 test application:


tiles-defs.xml
  definition name=doc.mainLayout path=/layout/classicLayout.jsp
  put name=title  value=Tiles Library Documentation /
  put name=header value=/common/header.jsp /
  put name=menu   value=doc.menu.main /
  put name=footer value=/common/footer.jsp /
  put name=body   value=doc.portal.body /
  /definition

In this case you have a tile called doc.mainLayout.  In most cases  
you want to have a URL that pulls in the doc.mainLayout and replaces  
the body component with something else.  Right now you have to  
create an intermediate JSP page:


intermediate.jsp

tiles:insert name=doc.mainLayout
  tiles:put name=body value=/somenewpage.jsp/
/tiles:insert

If you're using Tiles with Struts you can use the forward mechanism  
to achieve this without the intermediate JSP page:


action path=/mypage forward=doc.myPage

But you essentially have to do the intermediate page in tiles-defs.xml:

definition name=doc.myPage extends=doc.mainLayout
put name=body value=/somenewpage.jsp/
/definition

In JSF you have a similar issue.  I haven't used Tiles with JSF yet,  
but I think you could do the same thing you do with Struts.  You just  
use navigation-rules instead of action mappings.  I'm currently  
building an app using JSF and Facelets.  Facelets gets around the  
intermediate page by being sort of a backwards Tiles - or more  
precisely - an inline Tiles.  In Facelets you extend things  
inline.  Here's an example:


With Tiles you might have a template that does this:

template-stuff/
  tiles:insert name=header/
more-template-stuff/
  tiles:insert name=body/
still-more-template-stuff/
  tiles:insert name=footer/

In the above code your template invokes named sections that are  
defined in the tile definition.  You invoke the template and  
substitute values for the named section.


To do the same thing in Facelets you might have this:

template-stuff/
  ui:insert name=headerDefault Header Stuff/ui:insert
more-template-stuff/
  ui:insert name=bodyDefault Body Stuff/ui:insert
still-more-template-stuff/
  ui:insert name=footerDefault Footer Stuff/ui:insert

Then you extend it with a page like this:

ui:composition template=/layout.xhtml
ui:define name=body
Extended/Overridden Body Content
/ui:define
/ui:composition

JSF removes the intermediate step b/c the FacesServlet will always  
render a view - so if you hit the URL myapp/somepage.jsf you'll get  
forwarded to /somepage.xhtml which can invoke a template.  So you can  
see how Facelets sort of works backwards.  You define a page that  
extends a template and defines the extended portions inline.  If  
Facelets was supported in a standalone environment (i.e. without  
JSF)  you could possibly just invoke a *.xhtml URL and skip the  
intermediate step altogether.


It would be nice if we could make Tiles work this way.  Then you'd  
have a Facelets-like templating technology that is based on JSP and  
works the same in JSF, Struts, any other MVC framework in which it is  
supported, and standalone without any MVC framework whatsoever.


Thoughts?
Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Struts 2] Templating available like Tiles

2006-08-25 Thread Greg Reddin


On Aug 25, 2006, at 12:40 PM, Garner Shawn wrote:


Is there templating available like Tiles where I can define a template
JSP with a header,side menu, body, and footer and then just reuse it
accross pages?


Matt Raible created a solution[1] for WebWork using Tiles 2.0.  I'm  
not sure if it will work for Struts 2, but it seems like it should.   
In case you didn't know, Tiles 2.0 is in the sandbox.


[1] http://raibledesigns.com/page/rd?entry=how_to_use_tiles_with

Thanks,
Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [FRIDAY][OT] Slogan for Open Source

2006-07-28 Thread Greg Reddin


On Jul 28, 2006, at 10:41 AM, Frank W. Zammetti wrote:


Hehe... I hope your using the Johnny Damon definition of idiots :)


That's awesome :-)

Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles Configuration Plug-in Help

2006-07-18 Thread Greg Reddin


On Jul 18, 2006, at 4:47 PM, Jim Reynolds wrote:


 controller
  inputForward=false
  maxFileSize=5M
  contentType=text/html;charset=UTF-8
  locale=true
  nocache=true
  processorClass=org.apache.struts.action.SecureRequestProcessor
  /


I believe sslext contains a SecureTilesRequestProcessor

	http://sslext.cvs.sourceforge.net/sslext/sslext120/src/org/apache/ 
struts/action/SecureTilesRequestProcessor.java?view=log


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles: Why need to declare taglibs in each sub-jsp?

2006-07-10 Thread Greg Reddin


On Jul 10, 2006, at 1:18 PM, Mississippi John Hurt wrote:

I have a MainTemplate.jsp with header, body, footer in it. Weird  
thing is it
seems that even though I put taglib declaration in my header.jsp,  
as in ...


%@ taglib uri=http://jakarta.apache.org/struts/tags-html;  
prefix=html %


I still also have to put taglibs declaration in the subBody.jsp or  
else my

struts tags like html and bean don't work!  Why is this?  Is this
correct?  If I have to do this in all my sub.jsp's then why even  
use Tiles?
I want to put all my taglibs declaration once, at the header, and  
not in
every sub.jsp. Is this the way Tiles works? It renders each sub-jsp  
first
then plugs everything in; or it plugs everything in, then renders  
it as a

whole single jsp page? Thanks.


It has the same functionality as jsp:include.  With jsp:include  
each JSP page is evaluated separately and the output is included in  
the output of the including page.  If you use the @include  
directive you are doing something like #includes in C.  It merges the  
JSP content together before evaluating it.


You can have both.  You can @include your taglibs, but I don't really  
like this approach.  I prefer to just go ahead and explicitly define  
taglibs.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles W/JSP Sans Struts

2006-07-10 Thread Greg Reddin


On Jul 10, 2006, at 2:24 PM, Wendy Smoak wrote:


Keep in mind that this is in the sandbox, unreleased, and subject to
change!  In particular, issues SB-21 and SB-30 call for removing
several elements and attributes from the TLD and DTD.


This is very true.  I have not closed the TLD ticket yet because I'm  
still testing, but the current version of the TLD in svn should be  
mostly compacted.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles W/JSP Sans Struts

2006-07-06 Thread Greg Reddin
Hi Jeff,  I'd recommend taking a look at Standalone Tiles.   
Basically, Struts-Tiles is Tiles 1.0 and Standalone Tiles is Tiles  
2.0.  Honestly, I'm not putting any efforts into improving Tiles 1.0,  
but focusing on making 2.0 stable and ready.  You can search for  
Standalone Tiles on the dev list to follow the progress.   See other  
comments below...


On Jul 6, 2006, at 7:22 AM, Jeff Conrad wrote:


1. The a
href=http://struts.apache.org/1.x/struts-tiles/ 
installation.htmlTiles

installation document/a states that in order
to use Tiles independently, you would use the TilesServlet,
located in the struts-tiles-VERSION.jar. There is not a
TilesServlet, nor a struts-tiles-VERSION.jar, in the
struts-1.2.9-src, -lib, or -bin deliveries.


Wow.  You're right and I'm really surprised.  I'll have to check into  
that.  I really have no idea when, how, or why that was removed.   
There is one in Tiles 2.0.



The a
href=http://struts.apache.org/1.x/struts-tiles/ 
installation.htmlTiles

installation document/a has a dead link to
http://struts.apache.org/1.x/struts-tiles/cvs-usage.html.


That's supposed to point to the Struts source distribution download  
page.  It needs to be fixed.



2.  The a
href=http://struts.apache.org/1.x/struts-tiles/faq.html;Tiles
FAQ page/a has a dead link to
http://cvs.apache.org/builds/jakarta-struts/nightly/sandbox/tiles- 
core/.


That's supposed to point to Standalone Tiles.  It also needs to be  
fixed.



3.  The example in the a
href=http://struts.apache.org/1.x/struts-tiles/apidocs/org/apache/ 
struts/tiles/package-summary.htmlAPI

from 1.x Struts/a has some extra escaping
of amp;gt; characters.


This will be superceded by Standalone Tiles.  Actually it will  
probably be ported to Standalone Tiles and needs to be fixed.



4.  The
http://struts.apache.org/1.x/struts-tiles/examples.html
(Examples from 1.x Struts) page is incomplete.


Yes, intentionally so.  I left some gaping holes in the hopes that  
patches would soon follow from people who have better ideas than  
myself :-)  Actually, I think the doc would flow better if the  
Examples page was just Chapter 2 of the User Guide.  Basically,  
replace the bottom section of the User Guide page with the Examples  
stuff.



5.  The
http://struts.apache.org/1.x/struts-tiles/tagreference.html
definition tag does not mention name. Name is a required
attribute for definition.


I thought that doc was auto-generated from the TLD file.  Perhaps it  
is out of date or something.




Solutions
1.  To use the Tiles in the current version of Struts, you
will need to
use the Struts servlet.  I have uploaded a working example
with all of the necessary components (minus the libraries)
at
http://www.guesttime.com/members/ledlogic/struts/TilesTest-0.1-src.jar

If you build this and deploy the war to a webserver, there
are 3 examples in the line of the original struts examples,
one for pure JSP (/jsp/jspExample.jsp), one with JSP +
tiles (/jsp/tilesExample.jsp), and the last is
(/jsp/tilesXMLExample.jsp).


If you look in the sandbox there is a skeletal test app taking shape  
for Standalone Tiles (tiles-test).  There's also a TilesServlet  
there.  I'd also like to take a look at your examples and see what  
you've done.


http://svn.apache.org/repos/asf/struts/sandbox/trunk/tiles/tiles-test/



2.  I am not sure if there are nightly builds
somewhere for tiles.  Who manages these for Struts?


You should find a nightly for struts-tiles-x.jar in the same place as  
Struts 1.3 jars.  (Sorry I don't know off the top where that is.)   
Prior to Struts 1.3, Tiles was just a subdirectory of the Struts  
distro.  As of 1.3, it is a sub-project, and nomadic is a pretty  
good way to describe it.  I really can't tell you where it will  
live.  I am forming an opinion about where I think it *should* live,  
but that's another discussion.



3.  The javadoc needs to be fixed in the java
source for the tiles package.
4.  Perhaps some of the information here could be
incorporated. Do you need someone to finish the
documentation for
Tiles? If so I can help.


Yes :-)  That would be awesome!!

If you're offering to help I would point you to Standalone Tiles.   
(Check the links George Dinwiddie sent.)  There are hooks in the  
(Tiles 1.x) doc where the missing information should go, but I would  
like to see that information added based on Tiles 2.0.  If you're  
still committed to advancing the 1.x product, then we welcome any  
work in that arena as well.


Here's a fairly definitive list of outstanding tasks/issues related  
to Tiles:


	http://issues.apache.org/struts/secure/IssueNavigator.jspa? 
reset=truemode=hidepid=10122sorter/order=DESCsorter/ 
field=priorityresolution=-1component=21260


Thanks,
Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Tiles] Embedding tiles inside of tiles

2006-06-08 Thread Greg Reddin

On Jun 8, 2006, at 9:05 AM, Susan G. Conger wrote:


First, my header.jsp has a section where the graphic changes depend
on what page is begin displayed.  I can't seem to figure out the  
correct way

to implement this.


The short answer is to use Tile attributes.  The longer answer is  
that attributes don't always work the way you might think.  One of  
the weaknesses of Tiles is that there's no good way to pass data from  
one tile to another.  Attributes are better suited for static  
parameter substitution.


For example suppose you have Tile A that defines some attributes and  
Tile B that extends Tile A and overrides some attributes as follows:


definition name=tileA path=/layout.jsp
  put name=headerGraphic value=image1.gif/
  put name=someOtherThing value=.../
/definitioin

definition name=tileB extends=tileA
  put name=headerGraphic value=image2.gif/
/definition

As long as your layout is completely defined in one JSP page this  
will all work.  It breaks down if your layout has separate pages for  
header, footer, etc.  See below:


definition name=tileA path=/layout.jsp
  put name=header value=/header1.jsp/
  put name=headerGraphic value=image1.gif/
  put name=someOtherThing value=.../
/definitioin

definition name=tileB extends=tileA
  put name=header value=header2.jsp/
  put name=headerGraphic value=image2.gif/
/definition

Above you want to define your header differently for two layouts and  
you want to pass different images in.  This won't work because the  
headerGraphic attribute will not be passed along to the header page  
unless you do it manually from the page where it is inserted.   
There's a couple ways to hack this.  One is described in another thread:


http://mail-archives.apache.org/mod_mbox/struts-user/200605.mbox/% 
[EMAIL PROTECTED]


The other would be, as you indicated in the subject, to embed a tile  
within a tile:


definition name=tileA path=/layout.jsp
  put name=header value=headerTile1/
  put name=someOtherThing value=.../
/definitioin

definition name=tileB extends=tileA
  put name=header value=headerTile2/
/definitioin

definitiion name=headerTile1 path=/header.jsp
  put name=headerGraphic value=image1.jpg/
/definition

definitiion name=headerTile2 path=/header.jsp
  put name=headerGraphic value=image2.jpg/
/definition

I haven't tried this, but I don't think it works out of the box.  In  
layout.jsp when you insert the header tile, you'll have to do some  
magic I think to resolve the name to a tile definition.  This should  
be better supported and hopefully will eventually.



Also do I need an html/jsp page to display this image
change or can I just point to the gif file?


If I understand you correctly I think you should be able to just  
point to the image file.


HTH,
Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles Question

2006-05-08 Thread Greg Reddin

On May 8, 2006, at 7:49 AM, Troy Bull wrote:

I have read through the documentation and haven't seen this example  
(I may be blind).  The error I get is :
[ServletException in:/header.jsp] Error - tag.getAsString :  
attribute 'title' not found in context. Check tag syntax'


Ah, I'm sorry.  I missed that you were trying to use the title  
attribute in the included header page.  It looks like you're  
basically using the example from the doc, but trying to add the  
getAsString to the header.jsp page.  I've needed the same  
functionality on several occasions.  Here's what's happening:


Tiles creates a ComponentContext with 2 attributes title and header.   
When it sees tiles:insert attribute=header/ in layout.jsp it  
invokes the InsertTag.  InsertTag creates a sub-ComponentContext that  
it puts in request scope.  If InsertTag is invoked with no attributes  
that sub-context is empty.  That's why your title attribute is not  
being passed along.


There are a couple of ways to hack this:

1) In layout.jsp use the importAttribute tag to put the title  
attribute in request scope.
2) In layout.jsp use the importAttribute tag to put title in page  
scope.   If you can use EL you can then do the following:


tiles:insert name=header
tiles:put name=title value=${pageScope.title}/
/tiles:insert

If you're not using EL, you can do the same with scriptlet (I think  
the following is legal):


tiles:insert name=header
	tiles:put name=title value=%= pageContext.findAttribute 
(title); %/

/tiles:insert

But, I think those are hacks.  It would be nice if Tiles  
automatically propagated its context down the component tree.  Does  
anyone know why it doesn't do that or if there are good motivations  
to not do that?  There may be history behind this issue that I  
missed.   Perhaps we could add an attribute to the insert tag that  
would do this.


Greg



troy


Greg Reddin said the following on 5/5/2006 3:01 PM:

Have you tried the instructions in the tiles documentation?

http://struts.apache.org/struts-action/struts-tiles/

I think it describes your use case.  Are you trying this and  
getting some kind of error you can send us?


Thanks,
Greg

On May 5, 2006, at 1:33 PM, Troy Bull wrote:


Greetings

I am new to tiles and so far I like it.  I have a question  
though.  Seems like it should be easy to do but I haven't seen  
how yet.  I will try to describe the situation as concisely as I  
can.  This can be reproduced with just 2 jsp files.


layout.jsp (interesting lines only)

title
 tiles:getAsString name=title/
/title
/head
HR
tiles:insert attribute=header/

header.jsp

hrtiles:getAsString name=title//h2
hr



int my tiles-defs.xml I have

 definition name=main.layout path=/layout.jsp
put name=title  value=This is the title/
put name=header value=/header.jsp/
/definition


And finally, what I want is to display in the browser This is  
the title inside an H2 tag so that on each screen of my app the  
user gets visual feed back for what page they are on.


This seems to me like something I should be able to do but I dont  
know how, anyone with any tips I am greatfull.


thanks
troy

 
-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles without Struts

2006-05-08 Thread Greg Reddin
If you're willing to work with unreleased software, please do give  
Standalone Tiles a try.  From the perspective of the JSP API (meaning  
the tag interface) nothing has changed.  The rest of it is beginning  
to stabilize and I hope to have it at al least alpha status before I  
leave for JavaOne on Thursday.  I'd love for some people to start  
testing it.


Greg

On May 8, 2006, at 8:47 AM, [EMAIL PROTECTED] wrote:


Hmmm...  You're right that http://struts.apache.org/ doesn't list any
1.3 versions in the menu.  If you go to the 1.2.x page and download
development releases you can find
http://svn.apache.org/dist/struts/action/ with later builds.

Standalone tiles may be downloaded at
http://cvs.apache.org/builds/jakarta-struts/nightly/sandbox/tiles- 
core/

per the short FAQ at
http://struts.apache.org/struts-action/struts-tiles/faq.html  See
http://wiki.apache.org/struts/StandaloneTiles for the status on this
project.

Hope this helps.

 - George Dinwiddie
   http://www.idiacomputing.com/


-Original Message-
From: Klaus O K [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 06, 2006 2:53 PM
To: user@struts.apache.org
Subject: Tiles without Struts


Hi I am an experienced user of Struts and Tiles. Now I am
trying to run Tiles without Struts, and I can not get it to
work at all. The installation instructions say: First,
download a binary distribution of Tiles, currently
distributed with the Struts Framework I have not been able
to find this. There is no struts-tiles-VERSION.jar in the
Struts download. I Google search turns up a notice that 1.3.2
contains no jar for tiles. Use 1.3.3 instead. But the Struts
site has no version higher than 1.2.9. Klaus O K


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SAF 1.3.x and legacy RequestProcessor

2006-05-05 Thread Greg Reddin


On May 5, 2006, at 9:02 AM, Niall Pemberton wrote:


For me the ideal end point is just a single RP and it seems cleaner to
have it called RP than CRP. That would be my preference, but if others
disagree and think that getting there is a PITA - its not a big deal.


I'd be in favor of this approach.  It was the first thing that came  
to mind when Michael mentioned it.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles Question

2006-05-05 Thread Greg Reddin

Have you tried the instructions in the tiles documentation?

http://struts.apache.org/struts-action/struts-tiles/

I think it describes your use case.  Are you trying this and getting  
some kind of error you can send us?


Thanks,
Greg

On May 5, 2006, at 1:33 PM, Troy Bull wrote:


Greetings

I am new to tiles and so far I like it.  I have a question though.   
Seems like it should be easy to do but I haven't seen how yet.  I  
will try to describe the situation as concisely as I can.  This can  
be reproduced with just 2 jsp files.


layout.jsp (interesting lines only)

title
 tiles:getAsString name=title/
/title
/head
HR
tiles:insert attribute=header/

header.jsp

hrtiles:getAsString name=title//h2
hr



int my tiles-defs.xml I have

 definition name=main.layout path=/layout.jsp
put name=title  value=This is the title/
put name=header value=/header.jsp/
/definition


And finally, what I want is to display in the browser This is the  
title inside an H2 tag so that on each screen of my app the user  
gets visual feed back for what page they are on.


This seems to me like something I should be able to do but I dont  
know how, anyone with any tips I am greatfull.


thanks
troy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles vs. jsp:include + XHTML/CSS

2006-04-25 Thread Greg Reddin


On Apr 24, 2006, at 7:57 PM, Michael Jouravlev wrote:


Does using Tiles still makes sense in 2006?


I'm still trying to decide but I'm pretty sure the answer is yes.  If  
I was working on existing code that relied heavily on Tiles I would  
certainly be glad to know that new development is still taking  
place.  If I was starting a new project and deciding on a layout  
mechanism I'd have to evaluate Tiles in the context of all the other  
layout mechanisms currently available and make a decision.  I haven't  
had the time to do such an evaluation so I'm just not sure how to  
answer that question.



This antiquated sample does not promote good HTML design. It uses
table instead of div or span elements, and it uses HTML attributes
like bgcolor.


Yes, I pretty much agree with that.  That documentation was lifted  
almost directly from the documentation that Cedric wrote several  
years ago when it represented best practice.  It was an attempt to  
get some basic documentation up as quickly as possible in the hopes  
that people would submit patches to extend and correct it.  There is  
a ticket open to accept documentation patches and you can be that I  
will commit patches that are submitted.






The concrete page would use code like this [1]:

%@ taglib uri=http://struts.apache.org/tags-tiles; prefix=tiles %
tiles:insert template=layout.jsp
  tiles:put name=title  value=This is the title. /
  tiles:put name=header value=header.jsp /
  tiles:put name=body   value=body.jsp /
/tiles:insert

I still have to specify all these tiles:put tags that refer to
particular header/footer files (Definition solves that, see below).

What if instead of using

  tiles:put name=header value=header.jsp /

one would use something like this:

  div class=headerjsp:include page=header.jsp //div

and would have an appropriate set of rules for header class in a CSS
file? Would not it be the same without using Tiles layout file?


Yes, I agree that this pattern doesn't seem to make a great deal of  
sense.  Using Tiles like this does seem to be more overhead than the  
JSP include tag.  I would rarely do it this way though and would  
normally use tiles defined in an XML file.  But I can see a place for  
this use case.  If you want to define your tiles using named  
definitions but want the values to be based on some dynamic values  
rather than fixed values as they would in an XML file, you might use  
this pattern.  The advantage of this pattern is that it gives you the  
ability to extend the named definition and replace the named  
attributes.  But even in that use case, I would have to be able to  
gain a *lot* from the dynamic values to overcome the disadvantages of  
error-prone and hard to debug tiles definitions set up in a JSP.  In  
practice I've never done it this way, but have always used the XML file.




Again, what if a JSP file with definitions contained just a list of
regular JSP includes for the header, menu and footer, and every
include would be wrapped into a div or span with specific CSS
id/class? Would not it be quite similar?


It would be quite similar except that you don't have a single name  
associated with that page that you can reference.  With just a very  
small bit of overhead (IMHO) you can associate a name with the layout  
and always reference it by name.  Then you can make arbitrary changes  
to the layout (including the JSP page that defines it) without having  
to change all the code that consumes it.  You can also create a sub- 
layout that extends it and overrides desired parameters without  
having to write a whole new layout.  That's why I would almost  
*always* choose tiles over simple jsp:includes.  YMMV :-)


Thanks,
Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles vs. jsp:include + XHTML/CSS

2006-04-25 Thread Greg Reddin


On Apr 25, 2006, at 5:15 PM, Michael Jouravlev wrote:


If it is in the xml file, it is not dynamic anymore, is it?


No it's not.


But if the value is a really dynamic one, say
you read it from a database, then you cannot set it in the definition
file anyway, can you?


No.  It would have to be derived on the page, in the action  
beforehand, or in a controller class (see below).



if I have a
composite page out of three JSP files, how would I run their
corresponding setup actions before the page is composed?

Instead of including JSP pages I would include Struts actions (Will it
work with Tiles? I haven't tried it yet) like this (seems that I can
use include directive instead of dynamic include tag here):


The thought scares me :-)  I haven't tried it like that.  Tiles used  
to allow you to specify a Struts action as a controller.  It probably  
still does but I haven't used that pattern in a long time and I can  
guarantee that Standalone Tiles will not support that.  You should  
really check out the Controller interface.  Sorry, the documentation  
is non-existent currently, but it's in the pipeline.  It allows you  
to specify a controller class that will be executed before the  
definition is rendered.  In that class you have access to the Tiles  
Context and whatever else you need.  The only drawback is that I  
don't believe you can specify a controller for each piece of the  
composite page.


Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles vs. jsp:include + XHTML/CSS

2006-04-25 Thread Greg Reddin


On Apr 25, 2006, at 6:19 PM, Michael Jouravlev wrote:


On 4/25/06, Craig McClanahan [EMAIL PROTECTED] wrote:
According to the APIs, it is actually one Controller per Tile, not  
one
Controller per page ... doesn't that give you (Michael) the hook  
you'd need

to grab the dynamic data for each fragment?


I guess it does. But how is this better/different than simply
including Struts actions or any other resources?

Also, can I submit to a particular controller? Does a controller  
have URL?


Actually there is the controllerUrl parameter that will allow Tiles  
to submit a request to an URL as a controller.  IIRC, the purpose of  
this is to invoke a Struts action.  The use case you describe is not  
unheard of.   But to me it can be problematic.  As another poster  
pointed out, I would not want my app to be invoking the entire Struts  
request processing chain 2 or more times in one request.  Besides  
that, there's the mental overhead of having to remember that certain  
actions are Tiles pseudo-controller actions that just make app  
maintenance difficult.  But again, the support is there and I suppose  
it was added for a reason :-)


The truth is I haven't fully put Tiles through its paces and I don't  
nearly claim to understand everything it was designed to do or is  
capable of doing.  I'm trying to be careful to not present things as  
fact that I can only speculate on.   But I've used Tiles in several  
apps and in every case I pulled the calls to actions as prerender  
steps and replaced them with controllers.  The controller class has  
access to everything the action does.  About the only thing a  
controller cannot do is return a forward to an alternative location.   
But it does have access to the Tiles context and can set or change  
values.  I agree that one controller per Tiles definition creates a  
coupling with the definition and its attributes.  So if one of the  
definition's attributes is a JSP page with dynamic content you can  
manage the dynamic content with a Tiles controller, but that creates  
an undesirable coupling (a coupling that, IMO is not resolved by  
using an action instead of a controller).  I might like to have a  
prerender controller for each attribute as well as for the whole  
definition.  This is a case where I can see the value of JSF's  
component model.


If I understand you correctly you're wanting each part of a composite  
view to have a controller class invoked before rendering the view.  I  
don't think tiles directly supports this.  It does allow you to  
execute a controller that has effect over the entire view.  I guess  
the rationale is that if you are working at the composite view level  
and making changes there you can also manage changes to the  
controller class.  But it certainly introduces complications if a JSP  
arbitrarily includes another JSP that depends on dynamic data.  So...  
if I'm changing my tile definition to add an advertisement fragment  
then I can go into the controller class to deal with the data  
requirements.  Not a perfect solution, but doable.  I'd argue that it  
is better than invoking a Struts action to do the same thing.  I just  
don't want the overhead and potential for error of calling another  
action in that context.


There are other options.  You could implement a custom tag as part of  
your advertisement fragment that handled the dynamic parts in a self- 
contained way.You could hack tiles by specifying your  
advertisement fragment as a definition in its own right and using the  
tiles:insert tag to include it.  Then the advertisement fragment  
becomes a definition with no attributes and you have to use some  
weird code in a page somewhere to include it, but it's not too  
terrible.  So, there are options.



I guess I have to go read the docs one more time. Please excuse me for
heating up the discussion without checking the facts.


I don't think it's heated at all.  Sounds like you're just trying to  
understand.  I'm sorry if this response seems disjointed.  I'm trying  
to bring back up all the stuff I used to do :-)


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles vs. jsp:include + XHTML/CSS

2006-04-25 Thread Greg Reddin


On Apr 25, 2006, at 11:13 PM, Zoran Avtarovski wrote:


I've found that with
struts that tiles is the weakest kink in terms of documentation and
tutorials.


Agreed.  There is a ticket open to accept patches to doc[1].  The  
ticket description contains an overview of what is needed.  I started  
by porting some of the most crucial portions of Cedric's doc so we'd  
have *something.*  I've left a gaping hole for anyone who is  
interested in continuing the effort :-)



In short our feeling was rather than write tiles off improve our
understanding of the product and press for better documentation  
from the
developers. I'm happy to help on this side of things I guess I'd  
appreciate
it if somebody with a bit better knowledge of the workings of tiles  
could

take the lead.


The best way to press for better documentation is to submit a patch.   
To be very frank my priority right now is to get Standalone Tiles  
going and I don't plan to do any doc work until it's done (other than  
committing patches).   I would love for someone else to start filling  
holes in the doc.  Your work won't be wasted.  The sections in the  
existing doc will still be relevant with Standalone.


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: variable in one tile to another

2006-04-11 Thread Greg Reddin


On Apr 11, 2006, at 1:43 AM, Raghuveer wrote:


Is there a facility to get a variable in one tile from another tile in
Struts Tiles


Sorry, I'm strapped for time, but I'll try to answer.

If you mean an attribute that is part of a Tiles definition then the  
only ways I know of are to make one tile inherit from another or to  
use a Tiles controller to pull the variable out of context.  If  
you're just talking about a variable in the JSP page, you can put it  
in page context or request scope in one tile and pull it in the other  
tile.  I'd consider this a pretty dangerous practice though.  It  
makes your app very fragile.  Simple changes such as the  
rearrangement of the page could potentially break the app.


HTH,
Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jsp:include or tile

2006-04-11 Thread Greg Reddin


On Apr 11, 2006, at 10:42 AM, Caroline Jen wrote:


Both the jsp:include tag and the Struts tiles can
incorporate dynamic resources into the current JSP.

Is there rule of thumb that one is preferable over
another?


To me, the benefit of Tiles is the fact that you can configure  
reusable page components and give them attributes and controllers.   
But if you were doing a very simplistic app and didn't need these  
features jsp:include works just as well.


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tiles and best practice

2006-03-29 Thread Greg Reddin


On Mar 29, 2006, at 2:58 PM, Rolando Martinez wrote:


The question is:
Where Can I define the form that encapsulates defined fields in forms?

Is it better to define it in a JSP page that contains the layout or to
define a form for each JSP page that instances the layout?


I'm not sure I fully understand.  Are you saying you have some common  
form fields that will be shared among multiple forms?  If so, I've  
done this in the past by including them in a template.


I think the best practice is usually to put as much stuff as possible  
in the layout template.  Then your instance pages become as small as  
they can, and contain mostly stuff that is specific to that  
particular page.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT][Friday] funny

2006-03-24 Thread Greg Reddin

I thought Friday and beer were synonymous :-)

Greg

On Mar 24, 2006, at 1:12 PM, Rick Reumann wrote:



Sorry, meant to put Friday in the subject or is it still Beer  
we are supposed to use?


Rick Reumann wrote the following on 3/24/2006 1:54 PM:

D20 magic missile, and no saving throw!... those that played DD  
back in the day can relate:)...

http://video.google.com/videoplay?docid=7521044027821122670




--
Rick
http://www.learntechnology.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: has struts reached the saturation

2006-03-15 Thread Greg Reddin


On Mar 14, 2006, at 10:25 PM, Frank W. Zammetti wrote:

JSF is a way for a lot of people to make money.  Many vendors have  
a stake in its commercial success or failure.  This has been true  
from the beginning.  Some would say the whole point of JSF from the  
start was to make money for one company, and eventually a lot of  
other companies.  Incidentally, I'm a happy capitalist, I therefore  
have no problem whatsoever with that!  I just like that fact not  
being denied, and I for one do see it as fact.  Contrast this with  
how something like Struts began, which came straight from the  
idealism you speak of, a desire to help a community, a desire by  
one developer to create something that not only helped themselves  
but helped others.  I think that is a wonderful motivation.  And  
that may have been that same developers' motivation with JSF as  
well, but I to this day do not believe it was the motivation of the  
larger entities involved.


I find it ironic that people are bemoaning JSF for its commercial  
interests.  First, I seem to remember sometime between 2001 and 2003  
there were a lot of people asking When is Struts going to become a  
JSR?.  So, for the moment let's just pretend that the motivation for  
JSR-127 was to standardize an MVC framework.  By the time JSR-127 was  
introduced we were already discussing the things we'd do differently  
in version 2 of Struts.  Surely we didn't think the output of JSR-127  
would be Struts as we knew it then.  Surely we wouldn't have been  
happy if it had.


Second, look at who is represented on the Expert Group for JSR-127.   
Why would companies like Oracle, Borland, IBM, Macromedia, BEA, HP,  
etc. bother to participate in a such project if they weren't  
protecting their own interests?  Just look at how many tool-makers  
are present among the expert group.  Is it any wonder the resulting  
spec brings them the opportunity to cash in?  That's not even to  
mention all the other community-driven framework options that were in  
play when JSF was under development.  Personally, I think the  
resulting framework is not too bad considering.  I would've liked the  
Struts worldview to have been better represented - or maybe I am  
saying the tool-less developer's worldview.  But given all the  
players, I'm not surprised or disappointed with what we have.


Now, directly to your point of commercial interests.  You say JSF is  
a way for a lot of people to make money.  What is Java?  Do you  
think Sun developed Java as a love offering to the developer  
community?  Why do any of these organizations exist?  For that  
matter, why do I develop software?  Is it because I've found the  
meaning of life or simply because it's better than working at a  
rendering plant?  Well, for me it's somewhere in the middle.  But for  
organizations like Sun, Oracle, or BEA, it's all about the  
economics.  I'm not talking about the individuals that work at these  
companies.  I'm talking about the organizations themselves.  At the  
organizational level, they are solely about increasing financial  
gain.  And I'm not saying that's bad.  If they weren't they would  
quickly go out of business.  People start companies to grow  
business.  People start non-profit organizations (like ASF) for the  
betterment of mankind.  So I guess I find the argument of commercial  
interests to be completely irrelevant.


I like some aspects of JSF and I dislike others.  For some tasks I  
find it vastly superior to Struts.  For others I find it difficult to  
use.  Now *maybe* if JSF was developed in a community instead of a  
committee it would be less intrusive and more useful.  But that's one  
of the reasons I have hope for Shale.  It starts with the foundation  
of the JSF standard.  It then builds on the foundation in a community- 
centric way and that has the possibility of resulting in something  
very useful.


Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: has struts reached the saturation

2006-03-15 Thread Greg Reddin


On Mar 15, 2006, at 10:13 AM, Frank W. Zammetti wrote:


I value honesty and openness above all else, and when I
feel like those ideals are not being met completely, even if  
relatively

beningnly as is the case in sales generally, it bugs me a bit.


Hmm, interesting.  I value honesty and openness as well.  I just  
don't expect to see it in marketing material.  I guess I don't even  
desire it in marketing material.  I tend to skip over marketing  
altogether and look for the truth below.



From a purely *technical* standpoint though, as I've said
before, I'm not at this point a fan of JSF.  That being said, I'm  
in no
way dismissing it forever.  In fact, I look forward to the next  
major rev
as I hear a great many things are being addressed that may well  
make it
more paletable to me.  Where it came from and the motivations  
behind it
are at this point largely just a historical discussion.  Where it  
is and

where its going is far more interesting to me :)


I'm in a similar place, though, perhaps a bit closer to acceptance.   
I've completed one proof of concept project based on JSF and found a  
lot of difficulties.  Again, some aspects of it worked better than  
Struts, others cried out for Struts :-)  My biggest difficulties came  
in trying to get the JSP pages to work right.  I too await the next  
version and hope for improvement.  But I really liked the controller  
strategy.


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: has struts reached the saturation

2006-03-15 Thread Greg Reddin


On Mar 15, 2006, at 11:26 AM, Frank W. Zammetti wrote:

Isn't it interesting how polarizing JSF seems to be?  I don't know  
about
you, but I talk to more people with a strong opinion either way  
than most
other technologies.  The only other one I can think of in the same  
vein is

EJBs.  Seems like you either love EJBs or you hate them, and the same
seems, largely, to be true of JSF.  There seems to be relatively  
few of us

in the middle.


I think it's largely because the JCP moved into a space that was  
already well-populated and people tend to be very skeptical of  
governing bodies.  I think that the simple fact that JSF is a  
standard means there's a certain slice of people who will  
automatically refuse to accept it.  I wonder how different the  
response would be if the exact same technology had been developed by  
ASF or FSF without the involvement of a standards body.  Conversely,  
I wonder how different the response to Struts would've been if it had  
started out as a JSR.


Developers seem to have the most difficult time with the not created  
here syndrome.  At my last job I was on an architecture team for a  
large firm.  We inherently held great skepticism for any framework  
handed to us that we didn't develop ourselves.  And any framework we  
developed ourselves seemed to be completely rejected by everyone  
else.  The portal software I'm working with right now really needs to  
be rewritten IMO.  The only frameworks that seem to gain widespread  
acceptance are those that are developed in an open community rather  
than a closed one.  Hmm.  But there's always politics and egos  
involved.  I strive to be the developer who can walk into any  
framework already in use and get work done without complaining about  
how broken everything is.  I'm still a long way from achieving that  
goal.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts / Tiles Caching No Frames and Inter Tile communication

2006-03-10 Thread Greg Reddin


On Mar 10, 2006, at 3:00 AM, Antonio Petrelli wrote:


By the way, why are not you using portlets?


That was my thought as well.  It sounds like a portlet environment is  
more like what you are looking for.


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error finding tiles-defs.xml

2006-03-10 Thread Greg Reddin


On Mar 10, 2006, at 12:52 PM, Dave Newton wrote:


Hilton, Steve wrote:

Oshima, thank you VERY VERY much!  That fixed it.  I had  
looked on
so many web site, and at so many examples, and in so many books,  
and not
one single resource I looked at EVER said to add that code to  
web.xml.

Thanks again.  I really appreciate it!





Is this a modules thing? I've never used them.


That's what I was wondering too.  I'm surprised Steve had to do that.

Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help Needed: Struts-Tiles Configuration and/or Definition Error

2006-03-08 Thread Greg Reddin


On Mar 8, 2006, at 10:06 AM, Hilton, Steve wrote:


First of all, I am using Websphere 5.1.0.  The problem is this
Any time I try to reference a definition name in the tiles-defs.xml
file, any reference to that definition in the struts-config file  
always
produces a warning which states Target page.default cannot be  
resolved

in the context of the following modules: /




To make this even more frustrating, I can create a welcome page  
like the

index.jsp listed below and that works fine.


Looks like you need to specify the TilesRequestProcessor in your  
struts-config.xml.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tiles : Path teste does not start with a / character

2006-03-08 Thread Greg Reddin


On Mar 8, 2006, at 7:14 AM, vinicius wrote:


My forward and action:

forward
name=institucional
path=/Institucional.do/

 action
path=/Institucional
forward=.teste/







my tiles.defs.xml

definition name=.teste extends=Layout
put name=body   value=/tiles/teste.jsp /
/definition


Does it work to specify a Tiles Forward that begins with a . or  
will it try to find a relative URL?  That looks a bit strange to me  
and I'm not sure if I'd expect it to work.  I'd try using a name like  
teste.tiles in your forward and tiles def.


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help Needed: Struts-Tiles Configuration and/or Definition Error

2006-03-08 Thread Greg Reddin
Ok, I noticed that you have moduleAware=true in your plugin  
configuration.  Are you using modules?  I'm not very familiar with  
them myself, but will it work if you take the moduleAware attribute out?


Greg

On Mar 8, 2006, at 10:36 AM, Hilton, Steve wrote:

Sorry, I should have shown that.  I just stripped down the struts- 
config

file that I pasted in the e-mail.  I do have the following code in the
struts-config file...

controller
processorClass=org.apache.struts.tiles.TilesRequestProcessor
bufferSize=4096 debug=0/



-Original Message-
From: Greg Reddin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 10:33 AM
To: Struts Users Mailing List
Subject: Re: Help Needed: Struts-Tiles Configuration and/or Definition
Error



On Mar 8, 2006, at 10:06 AM, Hilton, Steve wrote:



First of all, I am using Websphere 5.1.0.  The problem is this
Any time I try to reference a definition name in the tiles-defs.xml
file, any reference to that definition in the struts-config file
always
produces a warning which states Target page.default cannot be
resolved
in the context of the following modules: /







To make this even more frustrating, I can create a welcome page
like the
index.jsp listed below and that works fine.



Looks like you need to specify the TilesRequestProcessor in your
struts-config.xml.

Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tiles : Path teste does not start with a / character

2006-03-08 Thread Greg Reddin


On Mar 8, 2006, at 10:49 AM, Joe Germuska wrote:


At 10:36 AM -0600 3/8/06, Greg Reddin wrote:


On Mar 8, 2006, at 7:14 AM, vinicius wrote:



My forward and action:

forward
name=institucional
path=/Institucional.do/

 action
path=/Institucional
forward=.teste/





...
Which is a long way of saying that a tiles definition can be any  
string, but if you get an IllegalArgumentException Path XXX does  
not start with a / character, the reason is that Tiles was not  
able to replace the ActionForward whose path was a tiles definition  
with one whose path is acceptable to  
ServletContext.getRequestDispatcher()


The thing that baffles me about that is that the action mapping is  
not specifying an action class.  So the only way it would not be able  
to find the forward is if either the .teste def doesn't exist or  
the TilesRequestProcessor is not specified.  I guess you should check  
the following:


1)  Any startup errors with Tiles?
2)  Is your tiles-defs.xml file in the right place?
3)  Are you using TilesRequestProcessor?

Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: layout

2006-03-01 Thread Greg Reddin
Yes you can do this using tiles.  Start here (http:// 
struts.apache.org/struts-tiles/)  Look particularly at the examples  
page for basic usage patterns.


Thanks,
Greg

On Mar 1, 2006, at 8:20 AM, fea jabi wrote:

in my jsp's have to put some common text at upper right corner of  
every jsp. how can be done? can this be done using tiles? is there  
an example I can look at to do this?


Thanks.

_
Express yourself instantly with MSN Messenger! Download today -  
it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/ 
direct/01/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Java Hosting Providers, yes, I know it's been brought up before on the list.

2006-03-01 Thread Greg Reddin
I've had terrible experience with Astrahosting.  I wouldn't use  
anything by them or Web Design Plus (I think is the parent company  
name).


Greg

On Mar 1, 2006, at 11:55 AM, Wendy Smoak wrote:


On 3/1/06, Rick Reumann [EMAIL PROTECTED] wrote:

Of my mailing list searching, this hosting provider seems to hold  
the most



promise:

http://www.lunarpages.com/plan2.php




I wouldn't... LunarPages has a habit of just disabling access to  
anything
that they suspect is causing a problem.  Sometimes they have a  
legitimate

point, sometimes they just say you're using too many resources or
affecting other customers on the server.

And look at the things that they say are not allowed, including JSF  
and

Spring:
http://helpdesk.lunarpages.com/faq.php?do=articlearticleid=120

--
Wendy




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles + WebWork

2006-02-16 Thread Greg Reddin

Matt,

Just as an addendum, I have plans to eventually implement a listener  
to handle the stuff being done by TilesServlet now.  Unfortunately,  
It's a pretty good ways down the list, which you can see here:   
http://wiki.apache.org/struts/StandaloneTiles.  I'm hoping very soon  
to actually have some time to start working this list.


Greg


On Feb 16, 2006, at 8:23 AM, Matt Raible wrote:


Nevermind, I figured it out.

http://raibledesigns.com/page/rd?anchor=how_to_use_tiles_with

Thanks,

Matt

On 2/15/06, Matt Raible [EMAIL PROTECTED] wrote:


I'd like to use Tiles with WebWork for reasons outlined on my blog:

http://raibledesigns.com/page/rd?entry=large_sites_powered_by_java

I'm able to get the Tiles tag library to work, because it's
essentially JSPs loading other JSPs at that point. Creating a
tiles-config.xml file is a much better solution IMO - then you don't
need to create JSP-loading JSPs.

I tried to get WebWork + Tiles working (using a nightly build),  
but no
dice. The TilesFilter doesn't seem to load the definitions, so I  
tried
using both the TilesServlet and the TilesFilter. TilesFilter is  
mapped
to *.tile and all my view names in xwork.xml map to viewname.tile.  
I'm

guessing the problem is WebWork communicating the name of the tiles
definition to the filter.

Is it possible to integrate these two frameworks?

Thanks,

Matt




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles + WebWork

2006-02-16 Thread Greg Reddin

Thank you!!  I'll take a look at it as soon as possible.

Greg

On Feb 16, 2006, at 3:46 PM, Matt Raible wrote:


Here's a TilesListener that works for me.  It could probably use some
polishing and a unit test, but it works for me.

http://issues.apache.org/bugzilla/attachment.cgi?id=17721

From bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=38255

Matt

On 2/16/06, Matt Raible [EMAIL PROTECTED] wrote:


quote
Matt,

Just as an addendum, I have plans to eventually implement a listener
to handle the stuff being done by TilesServlet now.  Unfortunately,
It's a pretty good ways down the list, which you can see here:
http://wiki.apache.org/struts/StandaloneTiles.  I'm hoping very soon
to actually have some time to start working this list.

Greg
/quote

Sorry, unsubscribed from the list - but saw your message via a Nabble
Alert.  Where can I checkout the Standalone Tiles module?  The one I
saw off of http://struts.apache.org/struts-tiles has
org.apache.struts.tiles and the tiles-core.jar I found is
org.apache.tiles.  I'd like to try and create the listener.

Thanks,

Matt


On 2/16/06, Matt Raible [EMAIL PROTECTED] wrote:


Nevermind, I figured it out.

http://raibledesigns.com/page/rd?anchor=how_to_use_tiles_with

Thanks,

Matt

On 2/15/06, Matt Raible [EMAIL PROTECTED] wrote:


I'd like to use Tiles with WebWork for reasons outlined on my blog:

http://raibledesigns.com/page/rd?entry=large_sites_powered_by_java

I'm able to get the Tiles tag library to work, because it's
essentially JSPs loading other JSPs at that point. Creating a
tiles-config.xml file is a much better solution IMO - then you  
don't

need to create JSP-loading JSPs.

I tried to get WebWork + Tiles working (using a nightly build),  
but no
dice. The TilesFilter doesn't seem to load the definitions, so I  
tried
using both the TilesServlet and the TilesFilter. TilesFilter is  
mapped
to *.tile and all my view names in xwork.xml map to  
viewname.tile. I'm

guessing the problem is WebWork communicating the name of the tiles
definition to the filter.

Is it possible to integrate these two frameworks?

Thanks,

Matt










-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Tiles] Definition with extends and path attributes

2006-01-31 Thread Greg Reddin


On Jan 31, 2006, at 8:09 AM, Antonio Petrelli wrote:


Does a definition such as this have sense?

definition name=myName extends=myExtends path=path.jsp


I've personally never had a situation like this where I extend a tile  
and redefine the path at the same time.  I've always extended a tile  
definition and overridden only the attributes.  But I can see merit  
to the approach.  If the framework does not currently support it, it  
probably should.



 definition name=page.index path=/layout/classic_layout.jsp
   put name=top value=/tiles/top.jsp/
   put name=left value=/tiles/fourth.jsp/
   put name=body value=/tiles/login.jsp /
 /definition


The second file contains:

 definition name=page.index.bug path=/layout/ 
three_rows_layout.jsp /

 definition name=page.index extends=page.index.bug
   put name=top value=/tiles/top_pda.jsp/
   put name=left value=/tiles/fourth.jsp/
   put name=body value=/tiles/login.jsp /
 /definition


To make sure I have this straight: You have page.index defined  
twice in 2 different files?  Why not do something like this?


First file:
 definition name=page.index path=/layout/classic_layout.jsp
   put name=top value=/tiles/top.jsp/
   put name=left value=/tiles/fourth.jsp/
   put name=body value=/tiles/login.jsp /
 /definition

2nd file:
definition name=page.index.bug path=/layout/ 
three_rows_layout.jsp extends=page.index /


Is it a requirement that you always reference page.index but get  
different definitions in different contexts or can you reference  
page.index.bug when you want the 3 row layout?


When I use XmlDefinitionSet.extend method, the page.index  
definition has both the extends (in fact inherit) and path  
attributes! After doing resolveInheritances it does not solve the  
problem.
I think the (possible) bug is in XmlDefinition.overload, where the  
attributes are simply copied and not checked.


That's definitely a possibility.  Can you verify it?

Thanks,
Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSF and Tiles

2006-01-06 Thread Greg Reddin
Both MyFaces and Shale have Tiles Integration strategies.  I haven't  
quite used either yet, but I will be soon.  Integration will be much  
simpler once we get Standalone Tiles out of the sandbox.


Here's some info on Tiles with MyFaces: http://wiki.apache.org/ 
myfaces/Tiles_and_JSF


and here's some stuff on Shale: http://jroller.com/page/dgeary? 
catname=%2FShale


HTH,
Greg

On Jan 6, 2006, at 12:06 PM, Chan, Jim wrote:



This has probably been posted before, but is there anyway to  
integrate JSF
and Tiles seamlessly like Struts?  I dont want to have to create  
two pages
(i.e. one template page, one included fragment page) per forward.   
If this
is the only solution, then I dont see any advantage using JSF in my  
app and

I will have to revert back to Struts.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using an attribute defined in tiles-defs.xml in a JSP as a JAVA var

2005-12-29 Thread Greg Reddin


On Dec 29, 2005, at 9:40 AM, Andreas B. Thun wrote:


%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %

tiles:useAttribute id=selectedCountry  
classname=java.lang.String name=selectedCountry/


%
String country = selectedCountry + something;
%


Try this:

%
String country = (String) pageContext.findAttribute 
(selectedCountry) + something;

%

I'm pretty sure Tiles places these attributes in page context and  
does not create JSP variables for them.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles with Struts

2005-12-22 Thread Greg Reddin


On Dec 22, 2005, at 8:59 AM, Buntin, Seth - KATE wrote:

I am having an issue getting Tiles to work.  I am totally new to  
Struts

so bear with me.  The issue is I don't see anything.  I got to home.do
(which is set up as what the user will see first) and it is totally
blank and the source is totally empty.  I think I have everything  
in my

configuration correct but don't know what to do.


Does your web.xml point to an index.jsp or something similar for a  
welcome-file?  Can you post the contents of that?  What does the  
configuration for the home.do action look like?


There are several reasons why this might happen.

Thanks,
Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with Tiles and URLRewrite Filter

2005-12-15 Thread Greg Reddin


On Dec 15, 2005, at 5:14 PM, Randy Shepherd wrote:

So I am trying to get outbound url rewriting working using the  
Tuckey URLRewrite Filter (http://tuckey.org/urlrewrite/) with  
Struts 1.2.7 with Tiles 1.1.


It appears that my outbound rules are not even being evaluated when  
the Struts target is a tile. As a result none of my links that  
match the rule are being rewritten. So, if put a vanilla JSP as the  
Struts target in which there is a href which should be rewritten,  
it works. But if I define that same JSP as a tile, then have the  
Struts target as that tile., the url is not rewritten.


I'm not familiar with the Tuckey tool, but at first glance my hunch  
would be that it's related to Tiles' use of RequestDispatcher.include 
() as opposed to forward(), which is typically used by Struts.


Are you running under Servlet 2.3 or 2.4?  If under 2.3 and the  
Tuckey tool is implemented as a filter then it won't be executed when  
the RequestDispatcher is used if my understanding is correct.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] Using standalone tiles?

2005-11-29 Thread Greg Reddin

On Nov 29, 2005, at 7:31 AM, Christopher Becker wrote:


I am using Tiles in a Struts (v.1.2.7) app, and also experienced an
error when the Apache site was temporarily down.
So to prevent this from happening in the future, what is the suggested
solution?

Removing the DOCTYPE element from the tiles-def.xml file does not seem
appropriate - or is it?


No, that doesn't seem like an adequate solution to me.  The *right*  
thing to do is make sure your DTD public identifiers are pointing to  
the right place and your URLs are pointing to the right place.  Then  
we have to figure out how to make sure they resolve to the jar file  
instead of the URL.  I'm not sure we know the right thing to do in  
the framework yet to make that happen.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] Using standalone tiles?

2005-11-28 Thread Greg Reddin


On Nov 28, 2005, at 10:08 AM, [EMAIL PROTECTED] wrote:


Those public identifiers (the part that starts with --/Apache...)
are registered to copies of the DTD inside the tiles-core.jar file,
you can see them in there under /org/apache/tiles/resources.



Wendy, I remember you saying this was so a while back (and a few times
since!) and so i rechecked my tiles-cores.jar and found (in tiles- 
core.tld

within META-INF) the following:
urihttp://jakarta.apache.org/tiles/uri


We changed the location of the DTDs a while back.  I wonder if the  
change did not happen in the standalone TIles repo.  I'll check on it.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] Using standalone tiles?

2005-11-28 Thread Greg Reddin


On Nov 28, 2005, at 10:22 AM, Wendy Smoak wrote:



Hmmm... maybe we should wait for Greg to sort this all out. :)

It should _not_ be going out to retrieve the dtd, that much I know.



Ok, here's what's happening.  The DigesterDefinitionsReader class is  
the class that reads Tiles defs using Digester in Standalone Tiles.   
In part, it contains the following code:


protected String registrations[] = {
-//Apache Software Foundation//DTD Tiles Configuration 1.1// 
EN,

/org/apache/tiles/resources/tiles-config_1_1.dtd,
-//Apache Software Foundation//DTD Tiles Configuration 1.2// 
EN,

/org/apache/tiles/resources/tiles-config_1_2.dtd,
};

...

public DigesterDefinitionsReader() {
digester = new Digester();
digester.setValidating(validating);
digester.setNamespaceAware(true);
digester.setUseContextClassLoader(true);

// Register our local copy of the DTDs that we can find
for (int i = 0; i  registrations.length; i += 2) {
URL url = this.getClass().getClassLoader().getResource(
registrations[i+1]);
if (url != null) {
digester.register(registrations[i], url.toString());
}
}
}

The registrations array definition creates a set of Strings to pass  
to digester.  The constructor then gets the Resource for each  
registration string and calls the Digester register() method to point  
to the DTD in the JAR instead of on the web.


The problem is that the ClassLoader cannot resolve the URL if it  
begins with /.  So if I change this:


protected String registrations[] = {
-//Apache Software Foundation//DTD Tiles Configuration 1.1// 
EN,

/org/apache/tiles/resources/tiles-config_1_1.dtd,
-//Apache Software Foundation//DTD Tiles Configuration 1.2// 
EN,

/org/apache/tiles/resources/tiles-config_1_2.dtd,
};

to this:

protected String registrations[] = {
-//Apache Software Foundation//DTD Tiles Configuration 1.1// 
EN,

org/apache/tiles/resources/tiles-config_1_1.dtd,
-//Apache Software Foundation//DTD Tiles Configuration 1.2// 
EN,

org/apache/tiles/resources/tiles-config_1_2.dtd,
};

it works.  I can completely disconnect from any network and still  
resolve the DTDs. Interestingly, the problem seems to only occur when  
running with a JAR.  If I run the original code against an exploded  
directory instead of a JAR it works fine.   But if I JAR the code up  
I have to remove the leading / or the URL won't resolve.  Any idea  
why that is?


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] Using standalone tiles?

2005-11-28 Thread Greg Reddin


On Nov 28, 2005, at 1:11 PM, Greg Reddin wrote:


public DigesterDefinitionsReader() {
digester = new Digester();
digester.setValidating(validating);
digester.setNamespaceAware(true);
digester.setUseContextClassLoader(true);

// Register our local copy of the DTDs that we can find
for (int i = 0; i  registrations.length; i += 2) {
URL url = this.getClass().getClassLoader().getResource(
registrations[i+1]);
if (url != null) {
digester.register(registrations[i], url.toString());
}
}
}

The problem is that the ClassLoader cannot resolve the URL if it  
begins with /.


BTW, the Struts version of Tiles does something similar.  I remember  
seeing something a while back about Apache complaining about too many  
requests to the website for the Tiles DTD.  The struts-tiles digester  
parser class has the following:


digester = new Digester();
digester.setValidating(validating);
digester.setNamespaceAware(true);
digester.setUseContextClassLoader(true);
// Register our local copy of the DTDs that we can find
  for (int i = 0; i  registrations.length; i += 2) {
  URL url = this.getClass().getResource(registrations[i+1]);
  if (url != null)
  {
  digester.register(registrations[i], url.toString());
  }

No error is logged if url is null.  It just doesn't register it and  
gets the DTD from the web instead.  Could it be that we are always  
getting it from the web b/c Tiles never resolves the URL in a web  
application?


Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] Using standalone tiles?

2005-11-28 Thread Greg Reddin


On Nov 28, 2005, at 1:57 PM, Craig McClanahan wrote:


On 11/28/05, Greg Reddin [EMAIL PROTECTED] wrote:




 protected String registrations[] = {
 -//Apache Software Foundation//DTD Tiles Configuration  
1.1//

EN,
 /org/apache/tiles/resources/tiles-config_1_1.dtd,
 -//Apache Software Foundation//DTD Tiles Configuration  
1.2//

EN,
 /org/apache/tiles/resources/tiles-config_1_2.dtd,
 };




Hmm ... Shale uses exactly this style for its own config resources,
including the leading slash on the URLs, and it seems to work fine  
when I
disconnect from the Internet.  I suspect there might be version  
specific

issues with URL resolution between JVMs in this area.


I think the issue is this:  Standalone Tiles uses the ClassLoader  
directly, while Struts-Tiles goes through the Class (which delegates  
to the ClassLoader according to the Javadoc).  Compare Standalone Tiles:


URL url = this.getClass().getClassLoader().getResource(

to Struts-Tiles:

 URL url = this.getClass().getResource(

The effect is that if you use the ClassLoader you cannot have a  
leading / on the name.  Now I'm not sure which is more correct...


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles Again - Can anyone help?

2005-11-23 Thread Greg Reddin


On Nov 22, 2005, at 5:40 PM, Leahy, Kevin wrote:


Hi
Here's MasterLayout.jsp ( abridged )
html:html
head
titletiles:getAsString name=title //title
tiles:insert attribute=MenuDefinitions /
/head
body
tiles:insert attribute=body /
tiles:insert attribute=MenuInitializer /
/body
/html:html

Here's FormLayout.jsp ( again very abridged )

html:form action=/EventSearch method=GET
onsubmit=eventSearchPreSubmit();return validateEventSearchForm 
(this); 

table 
trtdtiles:insert attribute=SecurityFilter //td/tr
trtdtiles:insert attribute=SourceFilter //td/tr

trtdtiles:insert attribute=FromAndToDateFilter //td/tr
/table
/html:form


Is FormLayout.jsp a separate layout used *instead of*  
MasterLayout.jsp or is it to be inserted into the body of  
MasterLayout.jsp?


If FormLayout is a body component then you can just extend the  
tile.base definition, set FormLayoutl.jsp as the body and add your  
attributes:


definition name=tile.form1 extends=tile.base  
put name=body value=/layout/FormLayout.jsp/
put name=SecurityFilter
value=/pageComponents/SecurityFilter.jsp /
put name=SourceFilter value=/pageComponents/ 
SourceFilter.jsp /

/definition

Or define the form tile as a completely separate one:

definition name=tile.form1 extends=tile.base
put name=body value=tile.formTemplate/
/definition

definition name=tile.formTemplate path=/layout/FormLayout.jsp
put name=SecurityFilter
value=/pageComponents/SecurityFilter.jsp /
put name=SourceFilter value=/pageComponents/ 
SourceFilter.jsp /

/definition

If FormLayout.jsp is a replacement for MasterLayout.jsp could it be  
refactored to work like the above?  It seems like it would include a  
lot of the same elements.


A controller is useful for defining attributes at runtime.  However,  
I'd be careful about using it to override values that are specified  
in your config file.  This may make it really confusing to maintain.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles Again - Can anyone help?

2005-11-23 Thread Greg Reddin


On Nov 23, 2005, at 12:09 PM, Leahy, Kevin wrote:


definition name=tile.form path=/layout/FormLayout.jsp 
put name=AlwaysThereFilter
value=/pageComponents/AlwaysThereFilter.jsp /
/definition

But now I want to user the base tiles for actual pages.
I want to be able to insert components into both layouts i.e.

definition name=tile.form1 extends=tile.base 
put name=title value=Form 1 Page /
put name=body value=tile.form /
put name=SometimeFilter
value=/pageComponents/SometimeFilter.jsp /
/definition

When I try this, it just doesn't display the components inserted (
supposedly ) into the FormLayout.


I think your SometimeFilter would need to be in tile.form instead  
of tile.form1


Unfortunately, the only way I can think of to do that in definitions  
is this:


definition name=tile.form path=/layout/FormLayout.jsp 
put name=AlwaysThereFilter
value=/pageComponents/AlwaysThereFilter.jsp /
 /definition

definition name=tile.form.withSomeFilter extends=tile.form
put name=SometimeFilter
value=/pageComponents/SometimeFilter.jsp /
/definition

 definition name=tile.form1 extends=tile.base 
 put name=title value=Form 1 Page /
 put name=body value=tile. form.withSomeFilter /
/definition

I guess that's fine if you only have a couple different templates.   
But your config file will get pretty cluttered if you have a lot.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles Again - Can anyone help?

2005-11-23 Thread Greg Reddin


On Nov 23, 2005, at 4:13 PM, Leahy, Kevin wrote:


definition name=tile.page1 extends=tile.outer 
!-- insert into OuterLayout --
put name=Title value=/pageComponents/GenericTitle.jsp /
put name=Content value=tile.inner 
put name=Optional1 value=/pageComponents/Optional1.jsp
/
put name=Optional2 value=/pageComponents/Optional2.jsp
/
/put
/definition

However the put tag doesn't take nested elements. I tried already.


You're right, that's not supported.  I like the idea though.  I  
wonder how hard it would be to support that.



I'm sure
there must be way to do this though. Is there a way to make layouts  
extend
other layouts. I.e. in the example above could I specify a third  
layout that

combined the inner and outer into a third one somehow?


I thought the code I posted in my last response would basically do  
this.  With Tiles anything can be a definition.  If you just wrap up  
what you need in another definition then insert that, you should be  
able to accomplish what you want.  Does the code reposted below not  
do that?


Unfortunately, the only way I can think of to do that in  
definitions is

this:

definition name=tile.form path=/layout/FormLayout.jsp 
 put name=AlwaysThereFilter
 value=/pageComponents/AlwaysThereFilter.jsp /
  /definition

definition name=tile.form.withSomeFilter extends=tile.form
 put name=SometimeFilter
 value=/pageComponents/SometimeFilter.jsp / /definition

  definition name=tile.form1 extends=tile.base 
  put name=title value=Form 1 Page /
  put name=body value=tile. form.withSomeFilter / / 
definition




Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [tiles]

2005-11-22 Thread Greg Reddin


On Nov 22, 2005, at 4:22 PM, Garner, Shawn wrote:


I know struts-templates didn't work if you did a put on a blank value.

Does this work with tiles?


Hmm, I don't know.  Try it and see what happens.  I suspect it won't  
work.  The  only thing I can think of right now is to include a blank  
JSP but that's a terrible way to have to do it.



Why isn't there a remove or delete tag?


I've personally never thought of that.  I'd be in favor of making an  
attribute optional, so that you can specify that it won't be  
displayed.  We could accomplish it through the XML defs or through a  
JSP tag.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [tiles]

2005-11-22 Thread Greg Reddin


On Nov 22, 2005, at 4:42 PM, Wendy Smoak wrote:


I have that exact situation where I don't want the menu showing up on
a resolution screen.  I'm doing it in tiles-defs.xml,  so this may not
apply, but it works:

tiles-definitions
  definition name=masterPage path=/WEB-INF/jsp/layout/ 
basicLayout.jsp

 put name=title   value=IRM Web /
 put name=menubar value=/WEB-INF/jsp/menubar.jsp /
 put name=footer  value=/WEB-INF/jsp/footer.jsp /
 ...
  /definition

  definition name=resolution.page extends=masterPage
put name=heading value=Resolution /
put name=menubar value= /
put name=bodyvalue=/WEB-INF/jsp/resolutionBody.jsp /
  /definition
...



So it does work.  How do you use the menubar definition in the JSP  
page?  Are you using the insert tag?


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles Again - Can anyone help?

2005-11-22 Thread Greg Reddin


On Nov 22, 2005, at 5:04 PM, Leahy, Kevin wrote:

I am defining tiles in tiles-def.xml that user MasterLayout - all  
working

fine using the put tags to inject the components.
But I also want tiles where in the tiles definition file I can use  
the put

tags to add components into both the MasterLayout and the FormLayout.


I don't quite get what you mean by this.  Can you post relevant  
portions of your tiles-defs file?


Thanks,
Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NEWBIE Problem with Tiles

2005-11-21 Thread Greg Reddin


On Nov 19, 2005, at 2:11 PM, Laurie Harper wrote:

I haven't been tracking the status of the 'standalone Tiles' work,  
but I believe it's either done or close to done.


I haven't had much time to work on Standalone of late.  I've been  
trying to shore up the doc for the Struts version.  But, hopefully,  
once that is done it will mostly still apply to the Standalone  
version with only a few changes.  I have begun a major refactoring  
effort on the internals of Standalone Tiles.  I'm about halfway  
done.  The next big step is to get the taglib working again.  Then I  
can check in the refactored version, test cases and all.  After that  
another refactoring step will be required to remove servlet API  
dependencies so tiles will work in a portlet environment.  Then we  
might be close to being done :-)


I'll try to get my changes in sooner rather than later so people can  
start playing with them and giving feedback/contributions, etc.   
Maybe over the holiday?


Thanks,
Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Moving from struts-layout to struts-tiles

2005-11-18 Thread Greg Reddin


On Nov 18, 2005, at 3:03 PM, Garner, Shawn wrote:


When I change template:get name='header' %@ include
file=header.jsp%/template:get

to tiles it says it can not have content in a body.  I would like  
to default

the header to this if they don't supply a header.


You probably need to include this in your Tiles definition.  The best  
way to do this is to include it in a tiles-defs.xml file:


definition name=something template=/something.jsp
put name=header value=/header.jsp/
/definition

Then inside your template file (something.jsp) you'd use the Tiles  
insert tag:


tiles:insert name=header/

See the User Guide for more information on the configuration:
http://struts.apache.org/struts-tiles/userGuide.html



tiles:put name='header' type='page' value='header.jsp'
tiles:put name='footer' type='page' value='blankFooter.jsp/


You probably need to use tiles:insert for these.  I think the put  
tag just adds an attribute to the definition.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles/Action design question

2005-11-16 Thread Greg Reddin


On Nov 16, 2005, at 4:31 PM, Laurie Harper wrote:

I'm not sure exactly what you meant by 'polymorphism off of a  
submit' so this might be completely off-base but... Passing the  
action into the tile definition may be one option, depending on how  
your tiles and actions are set up. Another option may be to wait  
for the Struts 1.3 release that's coming up. 1.3 lets you have  
'extends' relationships between various configuration elements. I'm  
not sure, but I think this includes tiles definitions, in which  
case you can have a tile for each of your 'precedence levels' with  
each extending the higer-level one.


Tiles definitions are already extendable in this manner in 1.2.x if I  
understand what you are saying correctly.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] how to convert an existing struts web application into portal

2005-11-10 Thread Greg Reddin


On Nov 9, 2005, at 3:25 PM, Ted Husted wrote:


This is suppose to work:

* http://portals.apache.org/bridges/multiproject/portals-bridges- 
struts/index.html


It definitely works with Jetspeed-2.  I just got that going today.

Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles without Struts

2005-11-09 Thread Greg Reddin


On Nov 8, 2005, at 9:23 PM, Paul Benedict wrote:


I have gone to this link:
http://struts.apache.org/struts-tiles/installation.html

I am looking for those 3 WAR files listed but I can't find them.  
The link in this paragraph is
broken so I can't get to the distribution: First, download a  
binary distribution of Tiles by
following the instructions --here--. Then, make sure you have  
downloaded and installed the

prerequisite software packages described above.

Someone needs to fix the website.


The website is out of date.  I'm in the process of fixing it in svn  
but haven't copied it over to the site directory yet - maybe today?   
Those .war files are not being built anymore.


You should be able to configure the Tiles Servlet like this:

servlet
  servlet-nameTiles Servlet/servlet-name
  servlet-classorg.apache.struts.tiles.servlets.TilesServlet/ 
servlet-class

  init-param
 param-namedefinitions-config/param-name
 param-value/WEB-INF/tiles-defs.xml/param-value
  /init-param
  load-on-startup1/load-on-startup
   /servlet



In any event, I want to know if anyone has used Tiles without  
Struts. If you're doing the XML
method, I know you need a controller in the middle to decide which  
Tile to load. So that's really

Struts or Spring. Has anyone done that? Just wanting to know.


You don't have to use a controller servlet.  You can insert a tile  
from a JSP.  It's not pretty, but here's how it might be done:


In tiles-defs.xml

definition name=main path=/mailLayout.jsp
  
  put name=body value=/body.jsp/
/definition

definition name=child extends=main
put name=body value=/aPage.jsp/
/definition


In your web app you'd have the following JSPs:

/mainLayout.jsp
/body.jsp
/aPage.jsp
/aPageTiles.jsp


/aPageTiles.jsp would look like this:

tiles:insert definition=child/

Then you would link to /aPageTiles.jsp.  I know this isn't elegant,  
but it works.  I'm looking at better ways to do this sort of thing  
with Standalone Tiles using a Filter or something.


HTH,
Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [shale] Advantages of Shale over JSF alone

2005-11-08 Thread Greg Reddin


On Nov 8, 2005, at 9:00 AM, Garner, Shawn wrote:


I don't immediately see the benefits to using Shale over JSF alone.


I'm sort of a JSF newbie and I've had a hard time seeing the  
advantages as well.  But I think the light is beginning to flicker  
just a bit.  One very clear advantage I noted is that you don't have  
to do the stupid security-constraint trick to block people from  
viewing JSP pages.  Shale handles that in a filter (I think).


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Basic template

2005-11-07 Thread Greg Reddin

I would suggest using Tiles.

Greg

On Nov 7, 2005, at 12:55 PM, Marcio Ghiraldelli wrote:


Hello,

What would be the best aproach without hurting MVC framework in  
having one central template.jsp and inserting into it Struts  
actions, such as:


table
trtd
jsp:include=/Menu.do
/tdtd
jsp:include=/News.do
/td/tr
/table

The usual jsp:include apparently only work with Servlets and/ 
or others JSP files, not with Struts actions.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles, pass parameters between tiles's frames

2005-11-02 Thread Greg Reddin

On Nov 2, 2005, at 6:51 AM, Rodolfo García Esteban/CYII wrote:
I have a problem with tiles, I have four tile`s frames: a head, a  
menu, a
content and a foot. I load all the frames from a JSP which is  
generic I
need to pass parameters from the content frame to the menu frame, I  
have

tried some alternatives without success. I would appreciatte any help.


What are some of the alternatives you've tried?  Are the parameters  
you are passing part of the Tile definition or stored somewhere  else?


One caveat:  You should never rely on the order of Tiles being  
processed in a template.  For example suppose you have a menu tile  
and a content tile.  If you add a request attribute in the content  
tile, hoping it will be available in the menu tile, it won't work if  
the menu tile has already been processed.  But you can set something  
in the request before the template is invoked (i.e. in your Action if  
you're using Struts).


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles, pass parameters between tiles's frames

2005-11-02 Thread Greg Reddin


On Nov 2, 2005, at 8:45 AM, Ronald Holshausen wrote:

It would probably be best to use the session as the medium for passing
between your tile components.


Request would work just as good as session, but either way my  
previous caveat still applies.  If you set something in one tile,  
then retrieve it in another you are dependent on the order in which  
they are invoked.  If you change your layout and shuffle them around  
it won't work anymore.  This is unless, of course, you actually  
invoke one tile from within another (using tiles:insert).


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Struts , Portal how does this fit

2005-10-06 Thread Greg Reddin


On Oct 6, 2005, at 10:53 AM, Ashish Kulkarni wrote:


We have developed a intranet site using struts, and it
works great, i was curious what would i have to do if
i have to make this website a part of portal,
we have a group which manages portals, so will have
change to build a war file, and give it to this team
so they can deploy it in there portal server


I think a lot of that depends on what portal server is being used.   
I've been evaluating portal servers the last few weeks.  I think the  
JBoss portal has some information on including Struts apps, but I  
have not yet tried it.  LifeRay is another portal that supports  
Struts, but it is not easy to get set up.  It's probably easier if  
you pay for their support package, but we haven't gotten that far  
yet.  Other options are Jetspeed, Pluto, and Gridsphere but I have  
only spent a very small amount of time with these and I don't know  
how well they would support Struts.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where to start?

2005-10-05 Thread Greg Reddin


On Oct 5, 2005, at 3:29 PM, Brian Gorby wrote:

Where is a good place to begin here? Should I start at the View and  
work my way down, or first program the model and ORM service?


Personally, I'd probably start with the model and ORM layer.  Once  
you get that part written (and tested) it basically provides an API  
to your application.  You can then write Struts actions and view  
components to use your API.


Another approach would be to just write the API to your application  
and a set of mock objects to implement it.  Then your time spent  
coding actions and views will not be bogged down by debugging  
database access, etc.  Once you get the flow of the app done, you can  
throw in the details with data access and all that.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale]Newbie question

2005-10-04 Thread Greg Reddin

On Oct 4, 2005, at 3:55 AM, Leon Rosenberg wrote:


That's another interesting question, if JSF is all-component, what do
I need tiles for? I mean Tiles was cool to define a common renderer
for an abstract view-component which was then implicitely defined with
struts-classic. Now JSF supports component-rendering which should make
Tiles obsolete. What would I need Tiles for then? Or do I miss
something (as usual)? :-)


In my limited experience with JSF it does not seem to contain  
templating capabilities.  So in Struts classic I would use Tiles for  
creating site templates as well as reusable views (or component-based  
views).  But with JSF Tiles still proves useful for templating and  
for further breaking up view components into smaller reusable  
pieces.But, honestly, I have yet to use the two together simply  
because I haven't built a real app on JSF yet.  So much of my view is  
based on conceptual thinking and not real world experience.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles standalone

2005-10-04 Thread Greg Reddin


On Oct 4, 2005, at 7:49 AM, Rafael Nami wrote:


I was trying to search some info about tiles standalone, but I
couldn't find anything in apache jakarta site. Where can i find such
info?


For now, there's really not much information.  You can download  
Standalone Tiles from the Struts sandbox in source or binary form.   
Functionally, it's no different from Struts-Tiles, except that it  
does not integrate with Struts.



What is the compatibility with JSF/MyFaces?


Probably moreso than Struts-Tiles.  Standalone Tiles is being built  
to work with JSF, Portlets, and other technologies as well as  
Struts.  But it's still in the sandbox and is still undergoing  
significant change.  However, that change will not likely affect the  
way you create pages using Tiles.  It may affect the way you write  
controllers and components that extend the Tiles API.


HTH,
Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale]Newbie question

2005-10-04 Thread Greg Reddin


On Oct 4, 2005, at 9:34 AM, Leon Rosenberg wrote:


In my limited experience with JSF it does not seem to contain
templating capabilities.  So in Struts classic I would use Tiles for
creating site templates as well as reusable views (or component-based
views).  But with JSF Tiles still proves useful for templating and
for further breaking up view components into smaller reusable
pieces.But, honestly, I have yet to use the two together simply
because I haven't built a real app on JSF yet.  So much of my view is
based on conceptual thinking and not real world experience.



Maybe I'm misunderstanding the concept completely, but I thought JSF
goal would be to create a component structure (tree) which allows
itself to be rendered with a special rendering kit to anything. So in
case I have template-able html (or whatever) code, I define a new
component, which manages exactly this piece of resulting code and
provide a renderer for it. What am i getting false?


I don't have any experience with the render kit, so I may have missed  
the point of it.  Keep in mind that my comments are based on very  
limited experience with JSF so I hope if I've missed something  
someone else will correct me.  But, when going through some tutorials  
and creating very simple pages I still found Tiles useful for  
templating.   I'll leave it to someone more familiar with JSF to say  
for sure :-)


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale]Newbie question

2005-10-04 Thread Greg Reddin


On Oct 4, 2005, at 9:36 AM, [EMAIL PROTECTED] wrote:

ok, asking the other way around, does someone have anything that  
could

serve an example application for Shale and he or she is ready to
share?



I think the problem is that even though people probably do have  
example

apps working they may be hesitant to share them since it may well be
riddled with worst-practices code, or worse (speaking strictly for
myself), completely missing the point.


Please don't let that stop you from sharing.  In the world of open  
source we all learn from each other.  I'm sure the experts will be  
happy to point out worst practices and the rest of us will be happy  
to learn :-)


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles problem - how to put attr in right context

2005-09-30 Thread Greg Reddin
A very similar question was asked earlier this week.  Check the  
archives for more.


Here's how I've done it, but it's not extremely elegant:

tiles-defs.xml
!-- main layout --
definition name=main.layout path=/mainlayout.jsp
  put name=title value=Title /
  put name=header value=/header.jsp /
  put name=footer value=/footer.jsp /
/definition

definition name=somepage extends=main.layout
  put name=title value=Sample Page Title /
/definition

Here's a snippet from mainlayout.jsp:
  tiles:useAttribute name=title/
  tiles:insert attribute=header
tiles:put name=title value=${title} direct=false/
  /tiles:insert

and here's header.jsp:
h1Header/h1
h2Title is: tiles:getAsString name=title//h2

The problem is that header.jsp is contained in the main.layout  
tile.  It does not inherently have any information about the tile it  
is contained in, so you have to pass any relevant attributes when you  
insert the page.


Greg


On Sep 30, 2005, at 4:59 AM, Java News wrote:


Hello,
I have problem with putting attributes in right context - my tiles
definitions look like:

definition name=.add_product.form path=/WEB-INF/pages/ 
add_product.jsp

extends=.mainLayout
put name=title value=Sample Page Title /
/definition

definition name=.header path=/WEB-INF/pages/tiles/header.jsp
put name=title value=Sample Page Title /
/definition

What I would like to achieve is:
1) I would like that .header attribute title was passed from
.add_product.form, so i can have only one header definition and many
rendering pages like .add_product.form, .add_product.confirm,
.add_product.thank_you and also i dont want (or other words i  
can't) extend

header definition
2) I tried to put header in .add_product.form as:
definition name=.add_product.form path=/WEB-INF/pages/ 
add_product.jsp

extends=.mainLayout
put name=title value=Sample Page Title /
put name=header value=/WEB-INF/pages/tiles/header.jsp
/definition

and use it in jsp page as:

tiles:get name=header/

but when I used in header.jsp:

h1tiles:getAsString name=title//h1

I got an error about lack of attr title in context:

11:38:22,134 ERROR [[action]] Servlet.service() for servlet action  
threw

exception
javax.servlet.jsp.JspException: ServletException in
'/WEB-INF/pages/tiles/header.jsp': Error - tag.getAsString : attribute
'title' not found in context. Check tag syntax
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(
InsertTag.java:921)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java: 
460)

at
org.apache.jsp.WEB_002dINF.pages.add_005fproduct_jsp._jspx_meth_tiles_ 
get_0(

org.apache.jsp.WEB_002dINF.pages.add_005fproduct_jsp:136)
at org.apache.jsp.WEB_002dINF.pages.add_005fproduct_jsp._jspService(
org.apache.jsp.WEB_002dINF.pages.add_005fproduct_jsp:77)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile 
(JspServlet.java:314)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

What should I do to put this attribute in right context - could you  
help me?


Best Regards,
Lee




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Action mapping to a Tile

2005-09-30 Thread Greg Reddin

Are you using the TilesRequestProcessor?  In struts-config.xml:

controller
   processorClass=org.apache.struts.tiles.TilesRequestProcessor/

Also make sure the Tiles Plugin is configured:

plug-in className=org.apache.struts.tiles.TilesPlugin 

  !-- Path to XML definition file --
  set-property property=definitions-config
   value=/WEB-INF/tiles-defs.xml /
  !-- Set Module-awareness to true --
  set-property property=moduleAware value=true /
/plug-in

Greg

On Sep 30, 2005, at 4:47 PM, Graham Reeds wrote:


I'm trying to set an action mapping to a tile.

I have a jsp page with a link to Tester: a href=pages/ 
TesterTest/a


In my struts-config.xml I have a forward mapped: action  
path=pages/Tester forward=Test.page /


And in tile-def.xml I have Test.page defined:
definition name=Test.page extends=Main.layout
  put name=title value=Test /
/definition

However this gives a 404 for the page test/pages/Tester

I thought it might be that the application hasn't been updated so I  
stopped and restarted Tomcat and that had no effect - still 404's.


Anything else I need to check?

Thanks Graham Reeds.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Action mapping to a Tile

2005-09-30 Thread Greg Reddin


On Sep 30, 2005, at 8:55 PM, Graham Reeds wrote:


I suppose you could do a forward from within index.jsp


That's the best way I can think of.

Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: More Tiles and Definitions problems

2005-09-29 Thread Greg Reddin

On Sep 29, 2005, at 11:22 AM, Graham Reeds wrote:

Is there any plans to extend tiles so the attributes are propagated  
to jsp's defined as attributes for 1.3x?


I thought about that last night as I was working up an example for  
your question.  It would be cool if you could pass a Tiles definition  
around as an object so included pages can have access to the  
attributes.  The example I sent last night shows how to do that now,  
but it's not very artfully done.  I'd like to be thinking about how  
to do what you're talking about.


Right now there are 2 big pushes for Tiles that might hold this up:
1.  Decouple Tiles from Struts
2.  Decouple Tiles from Servlet API.

I also have a 3rd itch which is to further refine and clean up the  
Tiles internal API.  Once those priorities are complete I think we  
can focus on enhancements like you mention, unless we can figure out  
how to squeeze it into one of those items.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upgrade from Struts 1.0.2

2005-09-29 Thread Greg Reddin

On Sep 29, 2005, at 4:33 PM, Bob Paige wrote:

This was a much quicker response than I anticipated!


You'd be surprised how many people are trying to upgrade from 1.0.2 :-)

Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: More Tiles and Definitions problems

2005-09-28 Thread Greg Reddin

On Sep 28, 2005, at 7:39 PM, Guillermo Castro wrote:


In order to do what you want you have to define your tiles as:

!-- main layout --
definition name=Main.layout path=/_common/layouts/mainLayout.jsp
  put name=header value=layout.header /
  put name=footer value=/_common/layouts/tiles/_footer.jsp /
/definition

definition name=layout.header path=/_common/layouts/_header.jsp
  put name=title value=Test /
/definition

!-- test Page --
definition name=Test.page extends=Main.layout
/definition


At the risk of stating the obvious, if you want your title to be  
specified in the extended definition you can do it like this:


!-- main layout --
definition name=main.layout path=/mainlayout.jsp
  put name=title value=dummy title /
  put name=header value=/header.jsp /
  put name=footer value=/footer.jsp /
/definition

definition name=test.page extends=main.layout
  put name=title value=Test /
/definition

Then your mainlayout.jsp:

  tiles:useAttribute name=title/
  tiles:insert attribute=header
tiles:put name=title value=${title} direct=false/
  /tiles:insert

And your header.jsp:

   Title is: tiles:getAsString name=title/

It's a bit wicked but it works.

Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles and tile definitions

2005-09-23 Thread Greg Reddin


On Sep 23, 2005, at 9:17 PM, Graham Reeds wrote:

Now nothing appears when I try to open Test.jsp from a page that  
has uses the tiles:insert method


I'm not quite following what you mean there.  Are you saying you have  
a page with the following?


tiles:insert path=pages/Test.jsp/

and you expect Test.jsp to include the definition?

Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exception trying to read tiles definition file in JSF..

2005-09-07 Thread Greg Reddin

On Sep 7, 2005, at 1:03 AM, Bjørn T Johansen wrote:


Yes, that did the trick... :)

But isn't there another way setting this up so it's not dependent  
on having an

internet connection and that the site is actually up??


In the DigesterDefinitionsReader we have the following code:

protected String registrations[] = {
-//Apache Software Foundation//DTD Tiles Configuration 1.1// 
EN,

/org/apache/tiles/resources/tiles-config_1_1.dtd,
-//Apache Software Foundation//DTD Tiles Configuration 1.2// 
EN,

/org/apache/tiles/resources/tiles-config_1_2.dtd,
};

and later we have this:

// Register our local copy of the DTDs that we can find
for (int i = 0; i  registrations.length; i += 2) {
URL url = this.getClass().getClassLoader().getResource(
registrations[i+1]);
if (url != null) {
digester.register(registrations[i], url.toString());
}
}

So this basically tells Digester that if we get the DTD reference -// 
Apache Software Foundation//DTD Tiles Configuration 1.1//EN to look  
for it in or/apache/tiles/resources/tiles-config_1_1.dtd, which is  
packaged with the tiles jar file.  So in these cases it should be  
looking in the local jar file instead of going to the URL.  In fact,  
it seems to be working for me.  If I run the tests with my network  
disconnected it all still runs fine.  At one point I was getting test  
failures without connectivity but I think that was before Wendy fixed  
the Tiles build to include the resources in the jar file.


If you are using  -//Apache Software Foundation//DTD Tiles  
Configuration 1.1//EN or -//Apache Software Foundation//DTD Tiles  
Configuration 1.2//EN in your DOCTYPE definition and are using the  
latest cut of Standalone Tiles, I can't figure out why you had to  
change the URL to get it to work.  Anybody else have any idea?


Greg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tile usage

2005-09-07 Thread Greg Reddin

On Sep 7, 2005, at 12:06 PM, Xavier Vanderstukken wrote:

definition name=Main path=/layout.jsp
   put name=navbar value=navigation.jsp/
   put name=login value=login.jsp/
   put name=locale value=locale.jsp/
   put name=body   type=string/   /definition





java.lang.NullPointerException
   at  
org.apache.jasper.runtime.JspRuntimeLibrary.getContextRelativePath 
(JspRuntimeLibrary.java:908)


Are your pages at the root level of your webapp?  Maybe you should  
define them as /navigation.jsp, /login.jsp, etc.


Greg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exception trying to read tiles definition file in JSF..

2005-09-06 Thread Greg Reddin

On Sep 6, 2005, at 1:40 PM, David G. Friedman wrote:


web-app
servlet
servlet-nameTiles Servlet/servlet-name
servlet-classorg.apache.struts.tiles.TilesServlet/servlet-class
init-param
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles.xml/param-value
/init-param
load-on-startup2/load-on-startup
/servlet


The above is correct except that it appeared from your original post  
that you are using Standalone Tiles.  So remove struts from the  
package name.


Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exception trying to read tiles definition file in JSF..

2005-09-06 Thread Greg Reddin
If you are behind a firewall or access the Internet via a proxy  
server the problem may be due to Tiles trying to load the DTDs.  I've  
found on at least one occasion that setting the registrations for  
Digester does not seem to prevent Tiles from trying to go to the  
Internet to resolve the DTDs.  I'm not sure why that is.


The problem surfaced for me when trying to run the unit tests.  If I  
was logged in to the office VPN I got the IO exception while Digester  
was trying to resolve DTDs.  If I was not logged in to the VPN the  
tests ran just fine.  Could that be your problem?


Greg

On Sep 6, 2005, at 1:59 PM, Bjørn T Johansen wrote:


Yes, I have the following in my web.xml..:

servlet
servlet-nameTiles Servlet/servlet-name
servlet-classorg.apache.tiles.servlets.TilesServlet/servlet- 
class

init-param
  param-namedefinitions-config/param-name
  param-value/WEB-INF/tiles.xml/param-value
/init-param
load-on-startup2/load-on-startup
  /servlet

and /WEB-INF/tiles.xml exists and contains valid tiles definitions  
(copied from a working

Struts project...)


BTJ

Greg Reddin wrote:


On Sep 6, 2005, at 1:40 PM, David G. Friedman wrote:



web-app
servlet
servlet-nameTiles Servlet/servlet-name
servlet-classorg.apache.struts.tiles.TilesServlet/servlet-class
init-param
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles.xml/param-value
/init-param
load-on-startup2/load-on-startup
/servlet




The above is correct except that it appeared from your original post
that you are using Standalone Tiles.  So remove struts from the
package name.

Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exception trying to read tiles definition file in JSF..

2005-09-06 Thread Greg Reddin

Does this one work?

http://struts.apache.org/dtds/tiles-config_1_1.dtd

I still don't understand why the registration feature of Digester  
wouldn't get around this issue.


Greg

On Sep 6, 2005, at 3:35 PM, Bjørn T Johansen wrote:


Or it might
What is the correct uri for the dtd? The one I am using, is not  
working..

(http://apache.org/dtds/tiles-config_1_2.dtd)


BTJ

Bjørn T Johansen wrote:

Nope, I access the internet without any problems, so that is not  
the case here...


BTJ

Greg Reddin wrote:


If you are behind a firewall or access the Internet via a proxy   
server
the problem may be due to Tiles trying to load the DTDs.  I've   
found on
at least one occasion that setting the registrations for   
Digester does
not seem to prevent Tiles from trying to go to the  Internet to  
resolve

the DTDs.  I'm not sure why that is.

The problem surfaced for me when trying to run the unit tests.  If I
was logged in to the office VPN I got the IO exception while  
Digester

was trying to resolve DTDs.  If I was not logged in to the VPN the
tests ran just fine.  Could that be your problem?

Greg

On Sep 6, 2005, at 1:59 PM, Bjørn T Johansen wrote:




Yes, I have the following in my web.xml..:

servlet
   servlet-nameTiles Servlet/servlet-name
   servlet-classorg.apache.tiles.servlets.TilesServlet/servlet-
class
   init-param
 param-namedefinitions-config/param-name
 param-value/WEB-INF/tiles.xml/param-value
   /init-param
   load-on-startup2/load-on-startup
 /servlet

and /WEB-INF/tiles.xml exists and contains valid tiles definitions
(copied from a working
Struts project...)


BTJ

Greg Reddin wrote:




On Sep 6, 2005, at 1:40 PM, David G. Friedman wrote:





web-app
servlet
servlet-nameTiles Servlet/servlet-name
servlet-classorg.apache.struts.tiles.TilesServlet/servlet- 
class

init-param
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles.xml/param-value
/init-param
load-on-startup2/load-on-startup
/servlet




The above is correct except that it appeared from your original  
post

that you are using Standalone Tiles.  So remove struts from the
package name.

Greg






-
To unsubscribe, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >