You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ylva Degerfeldt <yl...@gmail.com> on 2008/09/09 20:02:10 UTC
[S2]How can I get red error messages?
Hello, Struts users!
I'm just wondering how to make my error messages (specifically the
ones that Struts 2 generates) red, because currently they're not.
Isn't there some default css file I can use or do I have to create one?
And how do I use it in my jsp:s? (I know nothing about css.)
I appreciate any kind of help!
/Ylva
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2]How can I get red error messages?
Posted by Ylva Degerfeldt <yl...@gmail.com>.
> It'd be easier to just include your own stylesheet after the <s:head> tag and overwrite the styles.
Alright. Good to know. But that's for "some time in the future when I
have more time - investigation".
Thanks!
/Ylva
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2]How can I get red error messages?
Posted by Dave Newton <ne...@yahoo.com>.
--- On Tue, 9/9/08, Pascal Lalonde wrote:
> Didn't I read somewhere that one of the good practices
> was to copy the template folder in the project WEB-INF
> folder? If this is true, then just directly edit the
> style sheet of the theme?
Overwriting the styles is still easier. The template issue was largely an issue of FreeMarker template caching; the CSS file isn't a FreeMarker template.
The CSS file is served from the static resources, which (IIRC) ends up under /org/apache/struts2/static, on the classpath. If you view the source generated by the <s:head> tag, you'll see this:
<link rel="stylesheet" type="text/css"
href="/${context}/struts/xhtml/styles.css"/>
If S2 is serving the static files (the default) then it's easier to override the stylesheet by including your own.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2]How can I get red error messages?
Posted by Pascal Lalonde <pl...@auroramsc.com>.
Didn't I read somewhere that one of the good practices was to copy the
template folder in the project WEB-INF folder ? If this is true, then
just directly edit the style sheet of the theme ?
- Pascal
Dave Newton wrote:
> --- On Tue, 9/9/08, Ylva Degerfeldt wrote:
>
>> Just out of curiosity.. If I would want to change these
>> default style settings, where could I find the file that
>> I need to edit?
>>
>
> It'd be easier to just include your own stylesheet after the <s:head> tag and overwrite the styles.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
Re: [S2]How can I get red error messages?
Posted by Dave Newton <ne...@yahoo.com>.
--- On Tue, 9/9/08, Ylva Degerfeldt wrote:
> Just out of curiosity.. If I would want to change these
> default style settings, where could I find the file that
> I need to edit?
It'd be easier to just include your own stylesheet after the <s:head> tag and overwrite the styles.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2]How can I get red error messages?
Posted by Ylva Degerfeldt <yl...@gmail.com>.
No, that was it! I wasn't using the s:head tag, but I am now.
Thank you, Dave!
Just out of curiosity.. If I would want to change these default style
settings, where could I find the file that I need to edit?
/Ylva
On Tue, Sep 9, 2008 at 8:10 PM, Dave Newton <ne...@yahoo.com> wrote:
> --- On Tue, 9/9/08, Ylva Degerfeldt wrote:
>> I'm just wondering how to make my error messages (specifically the
>> ones that Struts 2 generates) red, because currently they're not.
>
> Are you using the <s:head/> tag tat includes the default Struts CSS?
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2]How can I get red error messages?
Posted by Dave Newton <ne...@yahoo.com>.
--- On Tue, 9/9/08, Ylva Degerfeldt wrote:
> I'm just wondering how to make my error messages (specifically the
> ones that Struts 2 generates) red, because currently they're not.
Are you using the <s:head/> tag tat includes the default Struts CSS?
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org