You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Christy Kudlac <ck...@silverpop.com> on 2007/02/16 16:58:03 UTC
[S2] Help - Attempting to load static resources from my own jar file
First, I apologize for the dual posting. I pushed this to the
user-group yesterday, but I don't think most users will have hit this
since it's more about how the application is configured and bundled.
A quick overview is that I see static resources being loaded that are
included in the struts-core.jar (eg. tabs.css, dojo library, etc) and I
would like to mimic the same behavior from my own custom jar (reusable
UI components). However, I'm failing miserably.
TIA!
Christy
________________________________
From: Christy Kudlac
Sent: Thursday, February 15, 2007 4:18 PM
To: 'user@struts.apache.org'
Subject: [S2] Attempting to load static resources from my own jar file
Hello, all.
I have built a custom jar which, in addition to classes, contains some
static javascript and css files. I'm deploying an exploded war to
tomcat 5.5 which has this jar in it's lib. I was hoping that my static
resource files within my jar would be loaded to allow jsps to reference
these files. Looking around, it looks like I should just have to
specify in struts.properties the following settings to have these files
loaded:
struts.serve.static=true
struts.serve.static.browserCache=true
Some additional info, I have placed my js and css files in package
structures such as: com.mycompany.static. And they are being
referenced from within the jsp using:
<link rel="stylesheet" type="text/css" href="<s:url
value="/struts/header.css"/>">
When my page loads, it's pretty apparent that the style sheets are not
being referenced. I've additionally used "header.css" and "/header.css"
in the value to see if those worked, but no such luck. I'm running
against S2 2.0.4.
Any help would be greatly appreciated!!!
Regards,
Christy Kudlac
Senior Software Engineer
Silverpop
200 Galleria Pkwy, Suite 750
Atlanta, GA 30339