Shakila,

On 11/30/15 2:07 PM, Rajaiah, Shakila wrote:
> I am using Tomcat 8.0.21 with EE7.0 on windows 7.0. For one of my
> projects it needs to read the style sheets from /style directory which
> has been placed under /webapps directory.

That's probably not where you want it, but it will certainly work.

> In my jsp I have added:
> 
> <test:includeStyle rel="stylesheet" type="text/css" context="/style" 
> href="/ext-4.0.6/resources/css/ext-all.css" />

You should probably do this instead:

<test:includeStyle rel="stylesheet" type="text/css" context="/style"
href="<c:url value="/ext-4.0.6/resources/css/ext-all.css" />" />

I'm not sure if you'll need the "context" parameter there, or what
<test:includeStyle> will or will not do for you with the "href"
parameter. It's common to have your stylesheets bundled with your
application, but it's not uncommon to have them external to the
application, either.

> Under the tomcat 8.0/webapps directory I added the style folder.
> tomcat 8.0/webapps/style.
> 
> I created a context.xml file with path="/style" and placed it in
> C:\tools\apache-tomcat-8.0.21-EE7.0\webapps\style\META-INF directory.

Okay so you are intending to have a separate context for the "style"
"application". At least you understand what's going on, here.

> The application does not pick up the path for /style.

What do you mean by that?

> I tried adding this path attribute to the context.xml file in the
> conf directory and it did not work either.

The "path" attribute will be ignored at best, and double-deployed at worst.

> Any help as to where this information can be configured in the
> tomcat server 8.0 will be appreciated.

When the JSP runs, what output does it actually produce? What does the
layout of your webapps/styles application look like?

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to