Tomcat JSP displaying file list

S

subscriptions

Hi,

I'm putting together a JSP/Servlet webapp for shortening URLs. It
works fine if I install it as a sub-directory of my domain for instance
"example.com/linker." But I need it to be the root webapp for my
domain; when I do this, however, I get a directory listing instead. I
get the listing whether or not I go through connectors, thus
"example.com:8080" also shows the listing, but
"example.com:8080/linker" does not.

I don't have a welcome-file, nor do I have a catch-all servlet mapping.
What I do have is a catch-all filter-mapping, thus:

<filter-mapping>
<filter-name>ControllerFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

The ControllerFilter then links to the required resource, be it local
or remote. Here are all the servlet filters that I use:

<servlet-mapping>
<servlet-name>MainPage</servlet-name>
<url-pattern>/start</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>ErrorPage</servlet-name>
<url-pattern>/error</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SubmitLinkServlet</servlet-name>
<url-pattern>/submitLink</url-pattern>
</servlet-mapping>

I'm linking from Apache to Tomcat 5.5 via ajp13/mod_jk2. The Host
entry in my server.xml file looks like this:

<Host name="example.com" appBase="/usr/local/tomcat/webapps.other">
<Context path="" docBase="linker" debug="0"/>
</Host>

with the webapp being at "/usr/local/tomcat/webapps.other/linker."

Any ideas?

Thanks,
Walter Gildersleeve
Freiburg, Germany

Here are links to the actual on-line application:
http://linkfrog.net (should work, doesn't though)
http://linkfrog.net:8080 (doesn't work either)
http://linkfrog.net/linker (works)
http://linkfrog.net:8080/linker (also works)
 
S

subscriptions

It just occurred to me how off-topic this post is. Sorry in advance,
and it won't happen again! Now I'm off to find a Tomcat group to post
this to.
 
S

subscriptions

Well, it's working, though I'm not quite sure why. I added autoDeploy
and deployOnStartup attributes; maybe that was the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top