A Strange Title Tile Problem

2004-06-26 Thread Caroline Jen
I have been using tiles for a while.  All of a sudden,
a piece of title tile in one of my web pages behaves
weird; e.g. all others work fine except this one.  It
is 2:30 am in the morning.  Maybe, I am not sober
enough to see the problem:

In my application.properties, I have:

#-- message pages --
message.Form.title=Send A New Message
thread.Form.title=List of All Discussion Topics
posting.Form.title=Postings Under Each Topic

The values of message.Form.title and thread.Form.title
all get picked up properly and displayed in the
browser.  Something went wrong with
posting.Form.title.  In the browser, I got:

???en_US.posting.Form.title??? 

What could cause this kind of problem?

In my tiles-defs.xml:

tiles-definitions
  definition name=.article.Base
path=/article/common/layouts/Article.jsp
put name=title value =${title}/
put name=header   
value=/article/common/header.jsp/
put name=message  
value=/article/common/message.jsp/
put name=content   value=${content}/
put name=navbar   
value=/article/common/navbar.jsp/
  /definition
   ...
   ...
  definition name=.message.Form
extends=.article.Base
put name=title value=message.Form.title/
put name=content  
value=/article/content/postForm.jsp/
   /definition
  definition name=.thread.Form
extends=.article.Base
put name=title value=thread.Form.title/
put name=content  
value=/article/content/listthreads.jsp/
  /definition
  definition name=.posting.Form
extends=.article.Base
put name=title value=posting.Form.title/
put name=content  
value=/article/content/viewpostings.jsp/
  /definition
   ...
   ...

/tiles-definitions

My page layout looks like:

%@ taglib uri=/tags/struts-bean prefix=bean %
%@ taglib uri=/tags/struts-html prefix=html %
%@ taglib uri=/tags/tiles prefix=tiles %
html:html
HEAD
html:base/
LINK rel=stylesheet type=text/css
href=html:rewrite forward='baseStyle'/
TITLEbean:message key=app.title//TITLE
/HEAD
BODY
tiles:useAttribute name=title/bean:message
name=title/
tiles:get name=header/
tiles:get name=message/
tiles:get name=content/
tiles:get name=navbar/
/BODY
/html:html








__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



Re: Converting Java Code in JSP to JSTL

2004-06-26 Thread Mark Lowe
c:if test='${not null ${prevArticle}}  ${article != prevArticle}'
The article != preArticle I am not quite sure.
c:if test=${!empty prevArticle  article != preArticle}
At least in terms of how the el works (not nesting el).
Cant see the point in porting this to JSTL unless there's nothing else 
to do. I'd sooner copy and past the java in the jsp page into an action 
like bill was saying.

On 26 Jun 2004, at 11:48, Pedro Salgado wrote:
On 04/06/26 1:33, Michael McGrady [EMAIL PROTECTED] wrote:
Looks like a test, Caroline!
At 05:20 PM 6/25/2004, Caroline Jen wrote:
I was told that JSTL can convert most of the Java code
in JSP.  I still have some problem with initializing
variables and if statments; for example, I do not know
how to write in JSTL of the following:
1. int i = 0;
c:set var='i' value='0'/
2. i++;
c:set var='I' value='${i + 1}'/
3. String prevArticle = null;
c:set var='prevArticle'/
4. if ( numberOfPosts - 1 == 1 ) {}
c:if test='${numberOfPosts} - 1 == 1'
5. if ( nextTopic != 0 )
c:if test='${nextTopic != 0}'
6. String threadID = String.valueOf( threadID_int );
c:set var='threadID' value='${threadID_int}'/
7. if ( threadRows.size() == 0 ) {}
c:if test='${not empty threadRows}'
8. if ( previousOffset = 0 || nextOffset = 0 ) {}
c:if test='${previousOffset} = 0 || ${nextOffset} = 0'
9. if ( prevArticle != null )  ( !article.equals(
prevArticle ) ) {}
c:if test='${not null ${prevArticle}}  ${article != prevArticle}'
The article != preArticle I am not quite sure.
Pedro Salgado
-
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]


Newbie question re. forms in combination with tiles

2004-06-26 Thread Jan Behrens
Hi List,

I am quite new to Struts and hit a bit of a wall right now. Here is what I
am doing:
I am using tiles to manage the layout of my webapp - it consists basically
of a table that defines something like this:

---
|||
|||
|||
|||
|||
|||


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



Re: A Strange Title Tile Problem

2004-06-26 Thread Michael McGrady
I am surprised, if you have been working with messages much, that you have 
not seen this.  It means that the message was put into the properties 
files after you last started your server instance in most cases.  Restart 
the application, and if you have the message in the properties file, it 
should show up.

At 11:57 PM 6/25/2004, you wrote:
I have been using tiles for a while.  All of a sudden,
a piece of title tile in one of my web pages behaves
weird; e.g. all others work fine except this one.  It
is 2:30 am in the morning.  Maybe, I am not sober
enough to see the problem:
In my application.properties, I have:
#-- message pages --
message.Form.title=Send A New Message
thread.Form.title=List of All Discussion Topics
posting.Form.title=Postings Under Each Topic
The values of message.Form.title and thread.Form.title
all get picked up properly and displayed in the
browser.  Something went wrong with
posting.Form.title.  In the browser, I got:
???en_US.posting.Form.title???
What could cause this kind of problem?
In my tiles-defs.xml:
tiles-definitions
  definition name=.article.Base
path=/article/common/layouts/Article.jsp
put name=title value =${title}/
put name=header
value=/article/common/header.jsp/
put name=message
value=/article/common/message.jsp/
put name=content   value=${content}/
put name=navbar
value=/article/common/navbar.jsp/
  /definition
   ...
   ...
  definition name=.message.Form
extends=.article.Base
put name=title value=message.Form.title/
put name=content
value=/article/content/postForm.jsp/
   /definition
  definition name=.thread.Form
extends=.article.Base
put name=title value=thread.Form.title/
put name=content
value=/article/content/listthreads.jsp/
  /definition
  definition name=.posting.Form
extends=.article.Base
put name=title value=posting.Form.title/
put name=content
value=/article/content/viewpostings.jsp/
  /definition
   ...
   ...
/tiles-definitions
My page layout looks like:
%@ taglib uri=/tags/struts-bean prefix=bean %
%@ taglib uri=/tags/struts-html prefix=html %
%@ taglib uri=/tags/tiles prefix=tiles %
__ Do you Yahoo!? Yahoo! Mail Address 
AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail 
- 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: A Strange Title Tile Problem

2004-06-26 Thread Michael McGrady
Oh!  I see, Caroline.  You don't know how to use Struts messages.  Or I 
don't.  One of us doesn't.  If you can reference a property message with 
plain text and no tag, that is a surprise to me.

At 11:57 PM 6/25/2004, you wrote:
I have been using tiles for a while.  All of a sudden,
a piece of title tile in one of my web pages behaves
weird; e.g. all others work fine except this one.  It
is 2:30 am in the morning.  Maybe, I am not sober
enough to see the problem:
In my application.properties, I have:
#-- message pages --
message.Form.title=Send A New Message
thread.Form.title=List of All Discussion Topics
posting.Form.title=Postings Under Each Topic
The values of message.Form.title and thread.Form.title
all get picked up properly and displayed in the
browser.  Something went wrong with
posting.Form.title.  In the browser, I got:
???en_US.posting.Form.title???
What could cause this kind of problem?
In my tiles-defs.xml:
tiles-definitions
  definition name=.article.Base
path=/article/common/layouts/Article.jsp
put name=title value =${title}/
put name=header
value=/article/common/header.jsp/
put name=message
value=/article/common/message.jsp/
put name=content   value=${content}/
put name=navbar
value=/article/common/navbar.jsp/
  /definition
   ...
   ...
  definition name=.message.Form
extends=.article.Base
put name=title value=message.Form.title/
put name=content
value=/article/content/postForm.jsp/
   /definition
  definition name=.thread.Form
extends=.article.Base
put name=title value=thread.Form.title/
put name=content
value=/article/content/listthreads.jsp/
  /definition
  definition name=.posting.Form
extends=.article.Base
put name=title value=posting.Form.title/
put name=content
value=/article/content/viewpostings.jsp/
  /definition
   ...
   ...
/tiles-definitions
My page layout looks like:
%@ taglib uri=/tags/struts-bean prefix=bean %
%@ taglib uri=/tags/struts-html prefix=html %
%@ taglib uri=/tags/tiles prefix=tiles %
__ Do you Yahoo!? Yahoo! Mail Address 
AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail 
- 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] Storing Birth Date

2004-06-26 Thread Mark Lowe
I do string - calendar conversion in an action form, its gets and sets 
strings modifying a calendar object which can be then given to the 
action ready to be saved back to the model.

private Calendar dob = Calendar.getInstance();
public String getDayOfBirth() {
int dayInt = dob.get(Calendar.DAY_OF_MONTH);
return Integer.parseInt(dayInt);
}
public void setDayOfBirth(String month) {
int monthInt = Integer.parseInt(month);
this.dob.set(Calendar.DAY_OF_MONTH,monthInt);
}
public Calendar getDob() {
return dob;
}
public void setCalendar(Calendar dob) {
this.dob = dob;
}
I should warn you that you need to validate input in a validate method 
to in case the day is out of range for the given calendar month. Unless 
you generate your select menus when the user changes the month and 
year.

Some folk will frown upon such practice and claim its not MVC, I could 
be wrong but I disagree. And also gets the action form doing a little 
more work.


Mark
On 26 Jun 2004, at 13:24, Eddie Yan wrote:
Anyone know what is the best practices to store a person
date of birth ? How should we design our detail object, JSP and 
database
in such way we don't have a messy approached to populate the day,
month and year in Action class to be able to display in JSP during 
UPDATE
process.

Currently, I have a JSP with combo box for day, month and year.
Using mySQL db, I set the dateOfBirth column to TIMESTAMP.
(Some told me to use DATE for this column).
Obviously TIMESTAMP have the limitation since date of birth before
Jan 1 1970 will be stored as 000. Know any workaround
to this one ?


-
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: Newbie question re. forms in combination with tiles

2004-06-26 Thread Jan Behrens
please ignore, 

solved this one myself ;)

-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 26, 2004 12:58 PM
To: Struts Users Mailing List
Subject: Newbie question re. forms in combination with tiles


Hi List,

I am quite new to Struts and hit a bit of a wall right now. Here is what I
am doing: I am using tiles to manage the layout of my webapp - it consists
basically of a table that defines something like this:

---
|||
|||
|||
|||
|||
|||


-
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]



Newbie question re. CSS and Struts

2004-06-26 Thread Jan Behrens
Hi List,

I wonder what would be a best practice for formating output when using
Struts. Is there such a thing as a struts.css that gets included by default
and might even contain elements for each / some tags out of the tld's?

TIA

Jan


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



Re: [OT] Storing Birth Date

2004-06-26 Thread Eddie Yan
Thanks for the input Mark.

This approach seems OK to me.
What is the column you use to store dob ?
We need to specify in the repository_user.xml the data type 
for this column.

Ed.

- Original Message - 
From: Mark Lowe [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Saturday, June 26, 2004 8:05 PM
Subject: Re: [OT] Storing Birth Date


 I do string - calendar conversion in an action form, its gets and sets 
 strings modifying a calendar object which can be then given to the 
 action ready to be saved back to the model.
 
 private Calendar dob = Calendar.getInstance();
 
 public String getDayOfBirth() {
 int dayInt = dob.get(Calendar.DAY_OF_MONTH);
 return Integer.parseInt(dayInt);
 }
 
 public void setDayOfBirth(String month) {
 int monthInt = Integer.parseInt(month);
 this.dob.set(Calendar.DAY_OF_MONTH,monthInt);
 }
 
 public Calendar getDob() {
 return dob;
 }
 
 public void setCalendar(Calendar dob) {
 this.dob = dob;
 }
 
 I should warn you that you need to validate input in a validate method 
 to in case the day is out of range for the given calendar month. Unless 
 you generate your select menus when the user changes the month and 
 year.
 
 Some folk will frown upon such practice and claim its not MVC, I could 
 be wrong but I disagree. And also gets the action form doing a little 
 more work.
 
 
 
 Mark
 
 On 26 Jun 2004, at 13:24, Eddie Yan wrote:
 
  Anyone know what is the best practices to store a person
  date of birth ? How should we design our detail object, JSP and 
  database
  in such way we don't have a messy approached to populate the day,
  month and year in Action class to be able to display in JSP during 
  UPDATE
  process.
 
  Currently, I have a JSP with combo box for day, month and year.
  Using mySQL db, I set the dateOfBirth column to TIMESTAMP.
  (Some told me to use DATE for this column).
 
  Obviously TIMESTAMP have the limitation since date of birth before
  Jan 1 1970 will be stored as 000. Know any workaround
  to this one ?
 
 
 
 
 
 
  -
  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: Newbie question re. CSS and Struts

2004-06-26 Thread Jan Behrens
Thanks Matthias,

looks like a powerfull tool for formatting tables, on first glance it seemed
a bit of an overkill for what I need to do though. I wonder, what the
general approach for this is? I mean, do many people use CSS in combination
with Struts or do you normally attache something like font bla... to each
property in your message property file, or...

TIA Jan

-Original Message-
From: Matthias Wessendorf [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 26, 2004 2:19 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie question re. CSS and Struts


Jan,

take a look at http://displaytag.sf.net
that taglib builds nice html-tables

you can you it with struts. 

Cheers,

 -Original Message-
 From: Jan Behrens [mailto:[EMAIL PROTECTED]
 Sent: Saturday, June 26, 2004 2:16 PM
 To: 'Struts Users Mailing List'
 Subject: Newbie question re. CSS and Struts
 
 
 Hi List,
 
 I wonder what would be a best practice for formating output
 when using Struts. Is there such a thing as a struts.css that 
 gets included by default and might even contain elements for 
 each / some tags out of the tld's?
 
 TIA
 
 Jan
 
 
 -
 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: Newbie question re. CSS and Struts

2004-06-26 Thread Rick Reumann
Jan Behrens wrote:
 I mean, do many people use CSS in combination
with Struts or do you normally attache something like font bla... to each
property in your message property file, or...
I usually use SiteMesh now for controlling the overall layout of my 
pages, but even if using Struts Tiles, it's a good idea to have at least 
one main style sheet that is imported on say your site's header page. 
That way each page automatically gets the 'site style' included for 
every page. I usually just call mine main.css out of habit. Sometimes 
I'll give it the webapp name ie. myapp.css. Any 'extremely' unique 
styles that a page needs you could add custom to the page in question.

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


Re: [OT] Storing Birth Date

2004-06-26 Thread Rick Reumann
Eddie Yan wrote:
Anyone know what is the best practices to store a person
date of birth ? How should we design our detail object, JSP and database
in such way we don't have a messy approached to populate the day,
month and year in Action class to be able to display in JSP during UPDATE
process.
Currently, I have a JSP with combo box for day, month and year.
Using mySQL db, I set the dateOfBirth column to TIMESTAMP.
(Some told me to use DATE for this column).
I tend to do it slightly different than Mark's approach or yours above 
using combo boxes. I like to let the user be able to free form type in 
the date and also provide the option of calendar date picker (plenty of 
free javascript ones out there). I hate having to select each part of 
the date from a drop down since I can type in a date pretty quickly (If 
the user hates typing that's what the calendar picker is for).

I usually put the format I want next to the date field in the JSP as 
defined as bean message property that can be looked up in the 
ApplicationResources file (ie form.date.format=mm/dd/yy ). Not only is 
this good in case you want to deal with localization issues, but it's 
nice if someone comes to you and says Product Manager John Doe would 
rather the user's enter the date as mm-dd- instead of mm/dd/yy

The form field I take is a simple String. I then validate using the 
validator framework or simply validate in the Action itself. (If you use 
the validator framework you have to register your date converter, but 
once registered it's set for the whole application so you only do it 
once. If you want to go that route I can show you how to do it.. there 
are some posts in the archives here how to do it also). When needing to 
display the date back in the form it's just as easy when you have that 
converter registered since BeanUtils can convert it correctly for you.

I like the flexibility of this approach. I can see the benefit also of 
having the ActionForm return the Date formats you want, but it's not my 
preferred way of doing it.

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


Re: Newbie question re. forms in combination with tiles

2004-06-26 Thread Rick Reumann
Jan Behrens wrote:
please ignore, 

solved this one myself ;)
he he did you solve it half way into typing up the message:) You never 
really asked a question:)

-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 26, 2004 12:58 PM
To: Struts Users Mailing List
Subject: Newbie question re. forms in combination with tiles

Hi List,
I am quite new to Struts and hit a bit of a wall right now. Here is what I
am doing: I am using tiles to manage the layout of my webapp - it consists
basically of a table that defines something like this:
---
|||
|||
|||
|||
|||
|||
-
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]

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


Re: [OT] Storing Birth Date

2004-06-26 Thread Michael McGrady
There are lots of ways to do this, of course, but I have found over the 
years that working from a long value works best for me.  From there you can 
go any direction.

Michael
At 09:46 AM 6/26/2004, Rick Reumann wrote:
Eddie Yan wrote:
Anyone know what is the best practices to store a person
date of birth ? How should we design our detail object, JSP and database
in such way we don't have a messy approached to populate the day,
month and year in Action class to be able to display in JSP during UPDATE
process.
Currently, I have a JSP with combo box for day, month and year.
Using mySQL db, I set the dateOfBirth column to TIMESTAMP.
(Some told me to use DATE for this column).
I tend to do it slightly different than Mark's approach or yours above 
using combo boxes. I like to let the user be able to free form type in the 
date and also provide the option of calendar date picker (plenty of free 
javascript ones out there). I hate having to select each part of the date 
from a drop down since I can type in a date pretty quickly (If the user 
hates typing that's what the calendar picker is for).

I usually put the format I want next to the date field in the JSP as 
defined as bean message property that can be looked up in the 
ApplicationResources file (ie form.date.format=mm/dd/yy ). Not only is 
this good in case you want to deal with localization issues, but it's nice 
if someone comes to you and says Product Manager John Doe would rather 
the user's enter the date as mm-dd- instead of mm/dd/yy

The form field I take is a simple String. I then validate using the 
validator framework or simply validate in the Action itself. (If you use 
the validator framework you have to register your date converter, but once 
registered it's set for the whole application so you only do it once. If 
you want to go that route I can show you how to do it.. there are some 
posts in the archives here how to do it also). When needing to display the 
date back in the form it's just as easy when you have that converter 
registered since BeanUtils can convert it correctly for you.

I like the flexibility of this approach. I can see the benefit also of 
having the ActionForm return the Date formats you want, but it's not my 
preferred way of doing it.

--
Rick
-
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: RE : Struts, XDoclet, and Maven...

2004-06-26 Thread Andy Akins
Thank you! This was exactly what I was looking for.
Sadly, being new to Maven, I was unaware of the genapp plugin. Very 
useful!

Again, thanks!
Andy
On Jun 24, 2004, at 8:00 AM, Heritier Arnaud wrote:
Did you try :
maven -Dtemplate=struts-jstl genapp
Arnaud
-Message d'origine-
De : Andy Akins [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 24 juin 2004 14:51
À : Struts Users Mailing List
Objet : Struts, XDoclet, and Maven...
I am trying to learn these technologies (and Hibernate too, for that
matter) - and I'm having the typical problem of knowing where
to start.
I've been programming Struts for over a year, so I'm decent with it -
but I'm fairly new to Maven but have coded two simple struts
apps with
it - and XDoclet is brand new to me. I'm looking to combine
all of the
above (and eventually Hibernate - but that's for a later day).
Does anyone out there have, or know of (or can create) a super-simple
example app (maybe the archtypical Struts hello app: two jsp's, one
action, one form) that shows how to set up your maven project
directory
(like where do you put your XDoclet merge files) and sample
values for
your project.xml, project.properties, and maven.xml files?
It would be a big help to jump start the learning process. Nothing
fancy - just a push in the right direction. I have XDoclet
in Action
to learn the XDoclet stuff - but I'd like to use Maven
instead of just
Ant.
Thanks for any help/insight...
Andy Akins
-
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: Newbie question re. CSS and Struts

2004-06-26 Thread Paul
I typically use my own style sheet on the finished product.  During
development though I normally use embedded styles, but imported from
their own page using tiles.  As the browser is seeing embedded styles
and not an imported style sheet, I don't have the caching problem during
development.



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



Using multiple message-resources from Java

2004-06-26 Thread Jacob Weber
Hello fellow Strutters,

I've added multiple message-resources tags to my struts-config file, 
each with a different key attribute. Is there a way to access these 
from my Java code? I can call MessageResources.getMessageResources, but 
it requires the full path name. Is there a way to just provide the key?

Thanks,
Jacob


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



html:img .... Tag

2004-06-26 Thread Caroline Jen
%@ taglib uri=/tags/struts-html prefix=html %

in the beginning of my JSP.

This statement that makes an image clickable:
td nowrap%if ( previousTopic != 0 ) {%a
href=viewthread?thread=%=previousTopic%html:img
page=/article/common/images/left.gif border=0
alt=[previous topic]/a%}%/td

gives me an error message:
/article/content/viewpostings.jsp(163,101) According
to TLD, tag html:img must be empty, but is not'

I have checked two things:

1. the JSP works if I replace the html:img ... tag
with some text:

td nowrap%if ( previousTopic != 0 ) {%a
href=viewthread?thread=%=previousTopic%[previous
topic]/a%}%/td  

2. the image left.gif ( I have checked the spelling
and the extension) is in the
MyApplication/article/common/images directory.

I do not understand the error message.  Please help.




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: Newbie question re. CSS and Struts

2004-06-26 Thread Paul
 I am using tiles:
 
 definition name=.article.Base
 path=/article/common/layouts/Article.jsp
   put name=title value =${title}/
   put name=header   
 value=/article/common/header.jsp/
   put name=message  
 value=/article/common/message.jsp/
   put name=content   value=${content}/
   put name=navbar   
 value=/article/common/navbar.jsp/
/definition
 
 I want to control the color of links.  My links are in
 the /article/common/navbar.jsp.
 
 If I put the style tag in the
 /article/common/hearder.jsp, will the style tag
 control the color in another piece of tile?   

Yes, it will.  Those separate files are put together by the tiles
plugin, and what the web browser sees is one file - it doesn't know that
the separate pieces began life on the server as separate files.  So
putting your styles into header.jsp will effect (or can effect) anything
else on the finished page.



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



Never Mind.Re: html:img .... Tag

2004-06-26 Thread Caroline Jen
Never mind, I have found the problem.  Thank you.
--- Caroline Jen [EMAIL PROTECTED] wrote:
 %@ taglib uri=/tags/struts-html prefix=html %
 
 in the beginning of my JSP.
 
 This statement that makes an image clickable:
 td nowrap%if ( previousTopic != 0 ) {%a

href=viewthread?thread=%=previousTopic%html:img
 page=/article/common/images/left.gif border=0
 alt=[previous topic]/a%}%/td
 
 gives me an error message:
 /article/content/viewpostings.jsp(163,101) According
 to TLD, tag html:img must be empty, but is not'
 
 I have checked two things:
 
 1. the JSP works if I replace the html:img ... tag
 with some text:
 
 td nowrap%if ( previousTopic != 0 ) {%a

href=viewthread?thread=%=previousTopic%[previous
 topic]/a%}%/td  
 
 2. the image left.gif ( I have checked the spelling
 and the extension) is in the
 MyApplication/article/common/images directory.
 
 I do not understand the error message.  Please help.
 
 
 
   
 __
 Do you Yahoo!?
 Yahoo! Mail - 50x more storage than other providers!
 http://promotions.yahoo.com/new_mail
 

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: html:img .... Tag

2004-06-26 Thread Michael McGrady
Looks as if the value of the page attribute begins with  and ends with 
'.  That won't work if that is accurate.

At 07:59 PM 6/26/2004, Caroline Jen wrote:
%@ taglib uri=/tags/struts-html prefix=html %
in the beginning of my JSP.
This statement that makes an image clickable:
td nowrap%if ( previousTopic != 0 ) {%a
href=viewthread?thread=%=previousTopic%html:img
page=/article/common/images/left.gif border=0
alt=[previous topic]/a%}%/td
gives me an error message:
/article/content/viewpostings.jsp(163,101) According
to TLD, tag html:img must be empty, but is not'
I have checked two things:
1. the JSP works if I replace the html:img ... tag
with some text:
td nowrap%if ( previousTopic != 0 ) {%a
href=viewthread?thread=%=previousTopic%[previous
topic]/a%}%/td
2. the image left.gif ( I have checked the spelling
and the extension) is in the
MyApplication/article/common/images directory.
I do not understand the error message.  Please help.

__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
-
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]