URL-Mapping in Jetty

676 views
Skip to first unread message

Michael Hnat

unread,
Feb 8, 2012, 10:03:24 AM2/8/12
to ra...@googlegroups.com
Hi,

I'm trying to set a mapping in my Jetty Server.
I have a central CSS folder outside my Webcontext and want a mapping to
that. Google has no answer.

In Resin I would do the following:
<path-mapping real-path="D:/wwwroot/central/css" url-pattern="/css/*" />

But I can find a information how to do that in Jetty.

Any ideas?

Thx, Michi

--
Mit herzlichen Grᅵᅵen,
Michael Hnat

bluegras - Internetlᅵsungen
Kriegerstr. 49
82110 Germering
Tel.: 089 81029340
Fax: 089 81029339
E-Mail: m.h...@bluegras.de


Andrew Penhorwood

unread,
Feb 8, 2012, 2:57:10 PM2/8/12
to ra...@googlegroups.com
You will most likely get better results by posting to one of these mailing lists.

http://www.eclipse.org/jetty/mailinglists.php

Michael Hnat

unread,
Feb 8, 2012, 3:58:55 PM2/8/12
to ra...@googlegroups.com
Your definitely right, but I can't believe I'm the only one trying this
with Railo.

Let's see if there is a way to do it. Searching the docu says 'no'. Or
the answer is hidden very well.

/Michi

Andrew Penhorwood

unread,
Feb 8, 2012, 5:54:56 PM2/8/12
to ra...@googlegroups.com
Please post back if you get it to work.

Andrew Penhorwood

Mark Drew

unread,
Feb 8, 2012, 6:02:55 PM2/8/12
to ra...@googlegroups.com
I think you can do it by adding another context I guess and giving it a mapping.

Regards
Mark Drew

melinite

unread,
Feb 8, 2012, 6:23:44 PM2/8/12
to Railo
why don't you use the webserver to handle this? Nginx handles this
exceptionally well.

You do use a proxy to jetty right? :)

Or you can create symbolic links (ln or mklink does wonders)

Michael Hnat

unread,
Feb 9, 2012, 3:03:41 AM2/9/12
to ra...@googlegroups.com
Finally it's the Railo Express I installed on my machine for
demonstration purposes. But I can't believe that it is so difficult to
say 'If the url is /css look in the folder....' for non cfm files.
The jetty documentation is awful. Every third link doesn't exist and for
some explanations you need to study astronomy first.

We got it running by doing the following:
We replaced the default servlet in Jetty with this:

<servlet>
<servlet-name>FileServlet</servlet-name>
<description>File Servlet for simple 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>/</url-pattern>
</servlet-mapping>

Now all files are processed by railo and I'm doing my mappings in the
Railo-admin.

Thanks Michi Streit for the idea!


/Michi

Reply all
Reply to author
Forward
0 new messages