I have tried both suggestion.
Still no luck and even worse.

The resulting href becomes the following by display the source page on IE.

<link rel="stylesheet" href="/css/screen.css" type="text/css"
media="screen, print" />

It is so strange that both http://localhost:8080/erp/
and  http://localhost:8080/erp/addUserProfile.do
cannot display with css.

Eventuallt, I change the href to this
<link rel="stylesheet" href="/erp/css/screen.css" type="text/css"
media="screen, print" />

Then both url can display with css beautifully.

Then I try to get the contextpath, instead of hard code.
But fail, the following line return null

<% String contextPath=request.getContextPath(); %>    
<c:out value="${contextPath}"></c:out>

Why?


2005/9/15, Michael Ewers <[EMAIL PROTECTED]>:
> Quick solution:
> <link rel="stylesheet" href='<bean:rewrite page="/css/screen.css />'>
> 
> And don't forget to set the requestURI-attribute in the display:table tag.
> 
> > --- Ursprüngliche Nachricht ---
> > Von: ±ç¬±³õ <[EMAIL PROTECTED]>
> > An: Struts Users Mailing List <user@struts.apache.org>
> > Betreff: Struts and DisplayTag CSS?
> > Datum: Thu, 15 Sep 2005 22:09:02 +0800
> >
> > For this link, http://localhost:8080/erp/
> > displaytag is okay to display with css beautifully.
> >
> > For this link, http://localhost:8080/erp/addUserProfile.do
> > all the css effect disappear.
> >
> > my web.xml
> >   <welcome-file-list>
> >     <welcome-file>/user/addUserProfile.jsp</welcome-file>
> >   </welcome-file-list>
> >
> > my jsp file has a css line
> >   <head>
> >   <link rel="stylesheet" href="css/screen.css" type="text/css"
> > media="screen, print" />
> >   </head>
> >
> > my struts mapping is
> >     <action
> >       attribute="userProfileForm"
> >       input="/user/addUserProfile.jsp"
> >       name="userProfileForm"
> >       parameter="method"
> >       path="/addUserProfile"
> >       scope="request"
> >       type="com.erp.struts.user.action.UserProfileDispatchAction" >
> >       <forward name="success" path="/user/addUserProfile.jsp" />
> >     </action>
> >
> > Any hints to solve?
> >
> > ---------------------------------------------------------------------
> > 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]

Reply via email to