On 7/4/06, Alec Swan [EMAIL PROTECTED] wrote:
I need to reference Styles.css from Test.jsp in such a way that it works in
static as well as in deployed mode. Note that for this to work in the static
mode (no web servers or servlet containers) all paths should be relative.
Therefore, when I
Web designers don't run web servers or servlet containers on their machines. (I
call their environment static). They just create web pages using Dreamweaver
and preview them in different browsers. So, in my running example Test.jsp
would have the following relative link ../../css/Styles.css in
On 7/5/06, Alec Swan [EMAIL PROTECTED] wrote:
Web designers don't run web servers or servlet containers on their machines. (I call
their environment static).
I understand -- and I think that's a bad idea. But whatever.
So, in my running example Test.jsp would have the following relative
I don't have the logs in front of me right now, but I will send them later
today. In any case I don't understand why this works in your case. What URL do
you use to access your Test.jsp? I would assume it's
http://localhost:8080/testapp/jsp/Test.jsp. Therefore, if this jsp page
references
In your Test.jsp, why don't you have something similar to:
stylesheet type=text/css
location=${pageContext.request.contextPath}/css/Styles.css /
I'm of course assuming tomcat 5.x.x and the web.xml file is declared for
servlet spec 2.4. This should work whether the running tomcat instance
David, the problem is that there is no servlet container or web server running
on the local machine. I need the JSP page to load the CSS page correctly
whether it's deployed on tomcat or not.
David Smith [EMAIL PROTECTED] wrote: In your Test.jsp, why don't you have
something similar to:
On 7/5/06, Alec Swan [EMAIL PROTECTED] wrote:
In any case I don't understand why this works in your case.
Now that I have more coffee in me, me neither :-) It really shouldn't, and
I'm at another location now, so I can't revisit that, but...
The problem is that relative to the container
You are right, the problem is with the way JSPs are deployed. I do use the
first servlet-mapping pattern, which does NOT match the full path, but rather
the context path /testapp.
I like your idea of using filters to rewrite CSS paths. Could you give me a
hint on how to do that best?
Thanks.
I have a different perspective on using consistent environments across
development and design teams. I think it will be unreasonable to expect
designers to change a CSS file, update the WAR file and redeploy it on the
local Tomcat instane just to see how CSS changes affected the look of the
On 7/5/06, Alec Swan [EMAIL PROTECTED] wrote:
I like your idea of using filters to rewrite CSS paths. Could you give
me a hint on how to do that best?
Actually, if you're in a hurry, you could just use the URL Rewrite Filter
-- see http://tuckey.org/urlrewrite/ -- an incredibly handy tool
Beautiful! I'll give it a try!
Thanks.
Hassan Schroeder [EMAIL PROTECTED] wrote: On 7/5/06, Alec Swan wrote:
I like your idea of using filters to rewrite CSS paths. Could you give
me a hint on how to do that best?
Actually, if you're in a hurry, you could just use the URL Rewrite Filter
--
The problem is that my JSP uses relative paths to reference CSS files. These
paths work fine in the static mode, i.e. when I open JSP file directly in the
browser without deploying it on Tomcat. However, when I deploy the JSP all
relative links stop working.
Here is an example. Suppose I have
On 7/2/06, Alec Swan [EMAIL PROTECTED] wrote:
I have a servlet, which I deploy as a WAR file. I want this servlet to service
all .jsp requests, but have Tomcat service .css files from /site/css/ directory
inside the servlet WAR file. I don't want Tomcat to invoke my servlet when
serving CSS
Hi,
I have a problem I've been struggling with for the last couple of hours.
Basically, I need to configure Tomcat (preferably using web.xml) to server
requests for CSS pages from a certain context path. For example, I want Tomcat
to serve the request for /css/styles.css from
14 matches
Mail list logo