RE: Tiles Definition problem

2003-08-25 Thread David Friedman
Bryce,

You're welcome.

-David

-Original Message-
From: Bryce Fischer [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 3:55 PM
To: Struts Users Mailing List
Subject: Re: Tiles Definition problem


David.

Thank you very much. I knew I was missing something very simple. I had 2
books I had been referencing, Programming Jakarta Struts and Struts In
Action. I guess I missed the forward thing in those docs.

Thanks again, its working great.

-- 
Bryce Fischer <[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 Definition problem

2003-08-25 Thread Bryce Fischer
David.

Thank you very much. I knew I was missing something very simple. I had 2
books I had been referencing, Programming Jakarta Struts and Struts In
Action. I guess I missed the forward thing in those docs.

Thanks again, its working great.

-- 
Bryce Fischer <[EMAIL PROTECTED]>


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



RE: Tiles Definition problem

2003-08-25 Thread David Friedman
Bryce,

To show a tile inside an independent, externally
usable JSP, you're going in the wrong direction.
I also suggested this broken path so let me help
you get on the right path. These below 2 lines are
all you need in your index.jsp to invoke your tile.
I have included some explanations below on why the
other methods didn't work.  Your taglib URL might
be different, so be sure to check your web.xml file.

<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>


You were using a logic:redirect tag.  I even wrote
to you to take out the 'redirect="true"' and use
the forward.  I didn't think it out clearly.  A
logic redirect tag forces the container to kick
out a redirect which tells your browser to try
the URL:

http://localhost:8080/default.layout

The problem is, that url isn't real.  It is a tile and
tiles cannot be accessed over the web that way.  They
can only be accessed within Struts or within pages
in a way that is very different from the struts-logic
tags.  I was next going to suggest the more logical
logic:forward tag, but the documents on Struts 1.1 note
it cannot be used with tiles:

> Note: forwarding to Tiles definitions is not
> supported from this tag. You should forward
> to them from an Action subclass.

>From my perspective, you can either setup an action
such as '/testtiles.do' to go to the tile:



Or force the JSP to import the tile definition and
display it using a JSP made of two simple lines:

<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>


I might use this method for my application's main
homepage /index.jsp, just to remove the initial
redirect that I might otherwise use (as it slows
the user down a second or two as they get the HTTP
redirect and ask for the new /index.do page).  For
everything else, I think I'll be consistent and use
actions (*.do) for external access, not JSPs.

Regards,
David

-Original Message-
From: Bryce Fischer [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 1:45 PM
To: Struts Users Mailing List
Subject: Re: Tiles Definition problem


Thanks to everyone who responded. Everyone recommended doing this:

> Try this:
>
> 

Still doesn't seem to work. I get the feeling I'm missing something so
insanely stupid that its tough to figure out. I'm not sure how to get
any more debug information. The only thing I'm getting on the console
that looks like its Struts related are these  lines:

Aug 25, 2003 1:32:08 PM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
Aug 25, 2003 1:32:09 PM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
Aug 25, 2003 1:32:10 PM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='resources.application', returnNull=true
Aug 25, 2003 1:32:10 PM org.apache.struts.tiles.TilesPlugin init
INFO: Tiles definition factory loaded for module ''.
Aug 25, 2003 1:32:11 PM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Aug 25, 2003 1:32:11 PM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Aug 25, 2003 1:32:12 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Aug 25, 2003 1:32:13 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Aug 25, 2003 1:32:13 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=30/331
config=C:\jtools\jakarta\jakarta-tomcat-4.1.2\conf\jk2.properties
Aug 25, 2003 1:33:01 PM org.apache.struts.util.PropertyMessageResources

INFO: Initializing, config='org.apache.struts.taglib.logic.LocalStrings',
returnNull=true


I don't know if any of this will point to problems or not. Instead of
reposting all my code again, It can be downloaded here:
http://www.berzerker-soft.com/testtiles.zip

here's the content of my previous email, in case you don't want to
download. Thanks in advance...


 /WEB-INF/tiles-def.xml 

http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>










-

 /WEB-INF/struts-config.xml --

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>



























 index.jsp 
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


--
Bryce Fischer <[EMAIL PROTECTED]>


--

Re: Tiles Definition problem

2003-08-25 Thread Bryce Fischer
Thanks to everyone who responded. Everyone recommended doing this:

> Try this:
> 
> 

Still doesn't seem to work. I get the feeling I'm missing something so
insanely stupid that its tough to figure out. I'm not sure how to get
any more debug information. The only thing I'm getting on the console
that looks like its Struts related are these  lines:

Aug 25, 2003 1:32:08 PM org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Aug 25, 2003 1:32:09 PM org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Aug 25, 2003 1:32:10 PM org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='resources.application', returnNull=true
Aug 25, 2003 1:32:10 PM org.apache.struts.tiles.TilesPlugin init
INFO: Tiles definition factory loaded for module ''.
Aug 25, 2003 1:32:11 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Aug 25, 2003 1:32:11 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Aug 25, 2003 1:32:12 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Aug 25, 2003 1:32:13 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Aug 25, 2003 1:32:13 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=30/331  
config=C:\jtools\jakarta\jakarta-tomcat-4.1.2\conf\jk2.properties
Aug 25, 2003 1:33:01 PM org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.struts.taglib.logic.LocalStrings', 
returnNull=true


I don't know if any of this will point to problems or not. Instead of
reposting all my code again, It can be downloaded here:
http://www.berzerker-soft.com/testtiles.zip

here's the content of my previous email, in case you don't want to
download. Thanks in advance...


 /WEB-INF/tiles-def.xml 

http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>










-

 /WEB-INF/struts-config.xml --

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>



























 index.jsp 
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


-- 
Bryce Fischer <[EMAIL PROTECTED]>


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



Re: Tiles Definition problem

2003-08-24 Thread [EMAIL PROTECTED]
Bryce,

You don't have to write the path wbeginning witha a slash.

Try this:



Antonio Gonzalez


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



RE: Tiles Definition problem

2003-08-22 Thread Joe at Team345
I don't think you want the slash when you reference your page.

try this:
 
 
 


instead of:

 
 
 


> -Original Message-
> From: Bryce Fischer [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 22, 2003 4:23 PM
> To: 'Struts Users Mailing List'
> Subject: Tiles Definition problem
>
>
> I'm going to describe my problem, then list the appropriate files below.
>
> I'm new with tiles, and am trying to get a simple tiles-definition
> working.
>
> Here's what I did:
>
> 1. I create a file called tiles-def.xml, and put it in my WEB-INF
> directory (listed below)
>
> 2. Make sure my definitiions-config property is set for the TilesPlugin.
>
> 3. While I'm in the struts-config, I set up a forward for my definition
> (see below).
>
> 4. I have verified that the individual tiles and layouts do exist and
> seem to be correct.
>
> typing: http://localhost:8080/testtiles
>
> I end up getting a 404: The requested resource
> (/testtiles/default.layout) is not available.
>
> Any  help is appreciated.
>
>  /WEB-INF/tiles-def.xml 
> 
>  Foundation//DTD Tiles Configuration//EN"
>
> "http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> -
>
>  /WEB-INF/struts-config.xml --
> 
>  Foundation//DTD Struts Configuration 1.1//EN"
>
> "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> 
> 
> 
>
> 
>  path="/default.layout"/>
> 
>
> 
> 
>
>  processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
>
> 
>
> 
>  value="/WEB-INF/tiles-defs.xml"/>
> 
> 
>  value="true"/>
> 
>
> 
>  value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> 
> 
>
>  index.jsp 
> <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
> 
> --
> Bryce Fischer <[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 Definition problem

2003-08-22 Thread David Friedman
Bryce,

Try taking our your leading slash on the /default.layout tile reference:


If you didn't put a slash in your tile name, don't use it with a slash in
your definition.  Tiles are specific to the 'name="something"', not path
specific.

Regards,
David

-Original Message-
From: Bryce Fischer [mailto:[EMAIL PROTECTED]
Sent: Friday, August 22, 2003 4:23 PM
To: 'Struts Users Mailing List'
Subject: Tiles Definition problem


I'm going to describe my problem, then list the appropriate files below.

I'm new with tiles, and am trying to get a simple tiles-definition
working.

Here's what I did:

1. I create a file called tiles-def.xml, and put it in my WEB-INF
directory (listed below)

2. Make sure my definitiions-config property is set for the TilesPlugin.

3. While I'm in the struts-config, I set up a forward for my definition
(see below).

4. I have verified that the individual tiles and layouts do exist and
seem to be correct.

typing: http://localhost:8080/testtiles

I end up getting a 404: The requested resource (/testtiles/default.layout)
is not available.

Any  help is appreciated.

 /WEB-INF/tiles-def.xml 

http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>










-

 /WEB-INF/struts-config.xml --

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>



























 index.jsp 
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

--
Bryce Fischer <[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]



Tiles Definition problem

2003-08-22 Thread Bryce Fischer
I'm going to describe my problem, then list the appropriate files below.

I'm new with tiles, and am trying to get a simple tiles-definition
working.

Here's what I did:

1. I create a file called tiles-def.xml, and put it in my WEB-INF
directory (listed below)

2. Make sure my definitiions-config property is set for the TilesPlugin.

3. While I'm in the struts-config, I set up a forward for my definition
(see below).

4. I have verified that the individual tiles and layouts do exist and
seem to be correct. 

typing: http://localhost:8080/testtiles

I end up getting a 404: The requested resource (/testtiles/default.layout) is not 
available.

Any  help is appreciated.

 /WEB-INF/tiles-def.xml 

http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>










-

 /WEB-INF/struts-config.xml --

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>



























 index.jsp 
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

-- 
Bryce Fischer <[EMAIL PROTECTED]>


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



RE: Tiles definition problem

2002-06-18 Thread wbchmura


This was not bad for getting to know tiles also...
http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html

-Original Message-
From: Chmura, William B. 
Sent: Tuesday, June 18, 2002 1:25 PM
To: struts-user
Subject: RE: Tiles definition problem



I am not sure I understand what you are saying here, but I think I know 
where you are heading...

You action mapping looks okay... When your action sends it to wiz1, it 
will go to the tiles definition below and build it there...

Is this what you were looking for?

--
BodyOnlyLayout.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
...some html...




... more html...
















   












-Original Message-
From: java.sse [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:46 AM
To: struts-user
Subject: Tiles definition problem


Hi all,

I'm trying to use the Tiles definitions to define my
pages, and not have JSP pages assembling the tiles. I
can get Tiles to recognize a named definition for the
header element, but I can't get it to use a named
definition for the main page (the action forward). See
the files below. If I set the forward for "input1" to
wiz1.jsp, then it works fine. But I want to use the
definition "wiz1" and avoid having a wiz1.jsp. When I
set the action forward to "wiz1" I get a file not
found error.

Things are basically working since the header
definition works. But the page definition isn't.

Ideas?

Thanks,

Dave

--
tiles-defs.xml:
http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>




















--
wiz1.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>









-
struts-config.xml:












__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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



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



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




RE: Tiles definition problem

2002-06-18 Thread wbchmura


I am not sure I understand what you are saying here, but I think I know 
where you are heading...

You action mapping looks okay... When your action sends it to wiz1, it 
will go to the tiles definition below and build it there...

Is this what you were looking for?

--
BodyOnlyLayout.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
...some html...




... more html...
















   












-Original Message-
From: java.sse [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:46 AM
To: struts-user
Subject: Tiles definition problem


Hi all,

I'm trying to use the Tiles definitions to define my
pages, and not have JSP pages assembling the tiles. I
can get Tiles to recognize a named definition for the
header element, but I can't get it to use a named
definition for the main page (the action forward). See
the files below. If I set the forward for "input1" to
wiz1.jsp, then it works fine. But I want to use the
definition "wiz1" and avoid having a wiz1.jsp. When I
set the action forward to "wiz1" I get a file not
found error.

Things are basically working since the header
definition works. But the page definition isn't.

Ideas?

Thanks,

Dave

--
tiles-defs.xml:
http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>




















--
wiz1.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>









-
struts-config.xml:












__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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



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




Tiles definition problem

2002-06-18 Thread Dave Peckham

Hi all,

I'm trying to use the Tiles definitions to define my
pages, and not have JSP pages assembling the tiles. I
can get Tiles to recognize a named definition for the
header element, but I can't get it to use a named
definition for the main page (the action forward). See
the files below. If I set the forward for "input1" to
wiz1.jsp, then it works fine. But I want to use the
definition "wiz1" and avoid having a wiz1.jsp. When I
set the action forward to "wiz1" I get a file not
found error.

Things are basically working since the header
definition works. But the page definition isn't.

Ideas?

Thanks,

Dave

--
tiles-defs.xml:
http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>




















--
wiz1.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>









-
struts-config.xml:












__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: