--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote: > FYI, I had a case once where I needed to make my CSS > files JSP's because > I was using HTC's and for some reason I couldn't get > the path mappings > to work right unless I used request.getContextPath() > to prefix the HTC > names... more than likely just my mistake somewhere, > but making it a JSP > (as Yaakov says, just renaming it to .jsp) did the > trick. > > I would personally prefer that approach because > should you ever need to > move to another app server, or even a hosted > environment like I moved to > a few months back, this way you won't have to mess > with server settings, > or getting some grumpy old admin to do it :) > > Frank > > Yaakov Chaikin wrote: > > I assume you need this because you want to place > some JSP code inside > > your stylesheet.... > > > > Two approaches: > > 1) If you know that ALL of your .css files will > need to include JSP > > code in them, then go to tomcat_dir/conf/web.xml > and add another > > <servlet-mapping> like so: > > <servlet-mapping> > > <servlet-name>jsp</servlet-name> > > <url-pattern>*.css</url-pattern> > > </servlet-mapping> > > > > 2) If you need to place JSP code in just one or > two .css files, I > > would not start messing with server specific > configurations and just > > rename those .css files to have extension of .jsp. > So, now you will > > have a stylesheet file with .jsp. It seems weird > and unusual, but > > really doesn't make any difference as far as your > HTML/JSP page is > > concerned. Just point the link to the .jsp page > instead in your > > HTML/JSP page: > > <link href="styles/myStyle.jsp" rel="stylesheet" > type="text/css"> > > > > Hope that helps. > > > > Yaakov. > > > > On 11/16/05, Marten Lehmann <[EMAIL PROTECTED]> > wrote: > > > >>Hello, > >> > >>how can I define, that e.g. the extension .css > shall be processed by > >>tomcat same as a .jsp-file? > >> > >>Regards > >>Marten > >> > >>--------------------------------------------------------------------- > >>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] > > > > > > > > > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > AIM: fzammetti > Yahoo: fzammetti > MSN: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > >
You can simply add a servlet mapping inside your local web application web.xml for different file types as well. Wade --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]