JSP root webapp displaying directory
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > JSP root webapp displaying directory




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    JSP root webapp displaying directory  
NullBock


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-24-05 09:44 PM

Hi,

I'm putting together a JSP/Servlet webapp for shortening URLs--it can
be found at http://linkfrog.net.  It works fine when the actual
directory is included with the URL, ie, http://linkfrog.net/linker.
But it needs to be accessed as a root webapp , which unfortunately
displays the directory instead.  I'm using AJP13/mod_2k connections,
but I don't imagine the problem is there, since is does this whether I
use port 8080 or not (http://linkfrog.net:8080 doesn't work any
better).

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>

The pertinent 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."
I've tried setting appBase to the webapp sub-directory itself, w/o
success.

I've also played with different filter-mappings, like
<url-pattern>/</url-pattern> <url-pattern></url-pattern>.  They don't
make any difference.  Also, I cannot use a default servlet filter,
since I need access to various local resource (images, style sheets,
jsps and the like), plus any dynamically-created link mnemonics.  Using
a default servlet mapping merely results in inifinite loops.

Any ideas?

Thanks,
Walter Gildersleeve
Freiburg, Germany






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:46 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register