dcsimg
why my page not show css when use struts?
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, May 30, 2005 05:42 AM

When I use redirect, the page can show the css, but why when I use dispatch, the page can't show css ?

my css is in /jsp/stylesheet.css, my page is in jsp/folder1/folder2/testing.jsp.


my code is :

Re: why my page not show css when use struts?

Posted By:   Anonymous  
Posted On:   Tuesday, May 31, 2005 11:51 PM

Thanks for all the reply, I sloved this pbm already:
add in this in struts-config:





then in every JSP which need to use that css, put in this:

Re: why my page not show css when use struts?

Posted By:   alan_do  
Posted On:   Monday, May 30, 2005 02:43 PM

when making references to shared 'html' files such as .css, .js, and images, i always find it's best to refer to them using a '/' to return to server root directory then the application context root 'myapp'. for example:


/myapp/css/style.css

/myapp/images/icon_arrow.gif


this way, if you have include files that may be included in other files that are sitting in different directory levels, you are certain to refer to the path directly. fixed fully qualified URL is painful if you move from environment to environment (e.g QA to production). relative URL (the way you have it), is just that...relative to what?

Re: why my page not show css when use struts?

Posted By:   Anonymous  
Posted On:   Monday, May 30, 2005 07:34 AM

try ../jsp/stylesheet.css
About | Sitemap | Contact