You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ni...@indus.com on 2002/01/24 03:47:36 UTC
Using CSS with struts jsp's
Hi,
I am trying to use CSS with my JSP pages but CSS does not seem to be
reachable. It works when I bring up the jsp's by themselves but when
invoked through an action, the page does not display with correct fonts.
The jsp code I am using is:
_______________________________________
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-form-1.0" prefix
="form" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean-1.0" prefix
="bean" %>
<html:html locale="false">
<head>
<LINK REL="stylesheet" HREF="bowb_style.css" TYPE="text/css">
<META http-equiv="Content-Style-Type" content="text/css">
<title>
<bean:message key="boSegDefForm.title" />
</title>
</head>
______________________________________
Thanks for any pointers.
- Nitish
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Using CSS with struts jsp's
Posted by Martin Fekete <fe...@zoznam.sk>.
Hi,
using <html:base /> and relative paths are OK but not when using templates.
solution that works fine is simple ...
<LINK REL="stylesheet" HREF="<html:rewrite page="/pathToCss" />
TYPE="text/css">
Feky
----- Original Message -----
From: "Ted Husted" <hu...@apache.org>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, January 24, 2002 4:27 AM
Subject: Re: Using CSS with struts jsp's
> You can use the <html:base> tag, and then use relative referneces to
> stylesheets and other assets.
>
> Though, I'm thinking we could really use a tag for specifying
> stylesheets, since the relative references can get to be a pain. The
> idea being you could specify a context relative path, and the tag would
> render it correctly.
>
> html:link is already taken, so I guess the next candidate would be
> html:rel
>
> But for today, right-now, <html:base> and a relative path works just
> fine :)
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Java Web Development with Struts.
> -- Tel +1 585 737-3463.
> -- Web http://www.husted.com/struts/
>
>
>
> Nitish.Naharas@indus.com wrote:
> >
> > Hi,
> > I am trying to use CSS with my JSP pages but CSS does not seem to be
> > reachable. It works when I bring up the jsp's by themselves but when
> > invoked through an action, the page does not display with correct fonts.
> >
> > The jsp code I am using is:
> > _______________________________________
> > <%@ page language="java" %>
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> > <%@ taglib uri="http://jakarta.apache.org/struts/tags-form-1.0" prefix
> > ="form" %>
> > <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean-1.0" prefix
> > ="bean" %>
> >
> > <html:html locale="false">
> > <head>
> > <LINK REL="stylesheet" HREF="bowb_style.css" TYPE="text/css">
> > <META http-equiv="Content-Style-Type" content="text/css">
> > <title>
> > <bean:message key="boSegDefForm.title" />
> > </title>
> > </head>
> > ______________________________________
> >
> > Thanks for any pointers.
> > - Nitish
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Using CSS with struts jsp's
Posted by Ted Husted <hu...@apache.org>.
You can use the <html:base> tag, and then use relative referneces to
stylesheets and other assets.
Though, I'm thinking we could really use a tag for specifying
stylesheets, since the relative references can get to be a pain. The
idea being you could specify a context relative path, and the tag would
render it correctly.
html:link is already taken, so I guess the next candidate would be
html:rel
But for today, right-now, <html:base> and a relative path works just
fine :)
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/
Nitish.Naharas@indus.com wrote:
>
> Hi,
> I am trying to use CSS with my JSP pages but CSS does not seem to be
> reachable. It works when I bring up the jsp's by themselves but when
> invoked through an action, the page does not display with correct fonts.
>
> The jsp code I am using is:
> _______________________________________
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-form-1.0" prefix
> ="form" %>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean-1.0" prefix
> ="bean" %>
>
> <html:html locale="false">
> <head>
> <LINK REL="stylesheet" HREF="bowb_style.css" TYPE="text/css">
> <META http-equiv="Content-Style-Type" content="text/css">
> <title>
> <bean:message key="boSegDefForm.title" />
> </title>
> </head>
> ______________________________________
>
> Thanks for any pointers.
> - Nitish
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Using CSS with struts jsp's
Posted by David Bolsover <da...@bolsover.com>.
Hi
Why is everyone making this so difficult?
<!--
@import "./styles/style.css";
-->
works fine!
David Bolsover
-----Original Message-----
From: Nitish.Naharas@indus.com [mailto:Nitish.Naharas@indus.com]
Sent: 24 January 2002 02:48
To: Struts Users Mailing List
Subject: Using CSS with struts jsp's
Hi,
I am trying to use CSS with my JSP pages but CSS does not seem to be
reachable. It works when I bring up the jsp's by themselves but when
invoked through an action, the page does not display with correct fonts.
The jsp code I am using is:
_______________________________________
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-form-1.0" prefix
="form" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean-1.0" prefix
="bean" %>
<html:html locale="false">
<head>
<LINK REL="stylesheet" HREF="bowb_style.css" TYPE="text/css">
<META http-equiv="Content-Style-Type" content="text/css">
<title>
<bean:message key="boSegDefForm.title" />
</title>
</head>
______________________________________
Thanks for any pointers.
- Nitish
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>