Re: [railo] <img and <link tag don't work

42 views
Skip to first unread message

Igal Sapir

unread,
May 23, 2013, 10:36:47 AM5/23/13
to Railo List

In order for Tomcat top serve those files you need to setup a servlet mapping and map those extensions (e.g *.gif and *.css) to that servlet.

You can try either "default" for the servlet name or setup the FileServlet that ships with Railo.

--
typos, misspels, and other weird words brought to you courtesy of my mobile device and its auto-(in)correct feature.

On May 23, 2013 6:59 AM, "tjl" <t...@erdw.ethz.ch> wrote:
Dear all, I installed the latest railo server (4.0.4.001) on W7. I created a folder "test" in "c:\railo\tomcat\webapps" and added

<Host name="address" appBase="webapps"
   unpackWARs="true" autoDeploy="true"
   xmlValidation="false" xmlNamespaceAware="false">
   <Context path="" docBase="C:\railo\tomcat\webapps\test" />
</Host>

The page is accessible at http://address/index.cfm, but the tags, e.g. <link href="CSS/bc.css" rel="stylesheet" type="text/css" /> and <img src="images/blind.gif" width="1" height="70" /> don't work. The files are in "c:\railo\tomcat\webapps\test\CSS" and "C:\railo\tomcat\webapps\test\images", respectively.

I searched, but couldn't find why doesn't it work and how can this be solved?

TIA.

--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
 
 
If you don't have time, add a request to the Railo Server wiki to-do page at https://github.com/getrailo/railo/wiki/Todo
---
You received this message because you are subscribed to the Google Groups "Railo" group.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

AJ Mercer

unread,
May 23, 2013, 6:46:19 PM5/23/13
to ra...@googlegroups.com

tjl

unread,
May 24, 2013, 6:57:50 AM5/24/13
to ra...@googlegroups.com
Ok, thanks. I found https://groups.google.com/forum/#!msg/railo/DmLUzaCGX_8/6Do6u3I3Q6cJ and added a FileServlet to c:\railo\tomcat\conf\web.xml, restarting tomcat service. I added

<servlet>
  <servlet-name>FileServlet</servlet-name>
  <description>File Servlet for static files</description>
  <servlet-class>railo.loader.servlet.FileServlet</servlet-class>
  <load-on-startup>2</load-on-startup>
</servlet>

<servlet-mapping>
  <servlet-name>FileServlet</servlet-name>
  <url-pattern>*.css</url-pattern>
</servlet-mapping>

but id didn't work.

TIA.

andreas

unread,
May 24, 2013, 8:14:20 AM5/24/13
to ra...@googlegroups.com

my guess is that you are using IIS as front webserver and static file requests aren't being passed all way through to tomcat. If you want static files delivered by tomcat you will have to add extendsions in the IIS-Admin for handlers, so that requests for that files will be passed to tomcats IIS connector. But best way is to have those static files delivered by IIS directly. Then make sure static file handler is set in the IIS also and the paths are set up in IIS corectly also.

best regards.

tjl

unread,
May 24, 2013, 10:55:30 AM5/24/13
to ra...@googlegroups.com
yes, that was the problem. Thank you!

andreas

unread,
May 24, 2013, 2:35:43 PM5/24/13
to ra...@googlegroups.com

it was a pleasure :D

--
Reply all
Reply to author
Forward
0 new messages