Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8131081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:58:15+00:00 2026-06-06T08:58:15+00:00

The title is pretty self-explanatory. When I run my app on Netbeans (Tomcat 7),

  • 0

The title is pretty self-explanatory. When I run my app on Netbeans (Tomcat 7), everything works fine (the root index.jsp file from my dir structure is shown in the browser):

enter image description here

When I deploy the app to my production server, it deploys successfully:

enter image description here

however, when I try to access the page in the production server, it only shows me a blank page and not the index.jsp file:

enter image description here

Here is my web.xml file for this app:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<filter>
    <filter-name>filter</filter-name>
    <filter-class>com.dendro.mvc.filters.StaticFilesFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>filter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
<!-- abstract controller to filter static file requests -->
<servlet>
    <servlet-name>Controller</servlet-name>
    <servlet-class>com.dendro.mvc.filters.Controller</servlet-class>
</servlet>
<!-- servlet names -->
<servlet>
    <servlet-name>PropagatedResults</servlet-name>
    <servlet-class>com.dendro.query.PropagatedResultsServlet</servlet-class>
</servlet>
<servlet>
    <servlet-name>PlainResults</servlet-name>
    <servlet-class>com.dendro.query.PlainResultsServlet</servlet-class>
</servlet>
<servlet>
    <servlet-name>HomeFilter</servlet-name>
    <servlet-class>com.dendro.query.HomeFilterServlet</servlet-class>
</servlet>

<!-- mappings -->
<servlet-mapping>
    <servlet-name>Controller</servlet-name>
    <url-pattern>/views/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>HomeFilter</servlet-name>
    <url-pattern>/views/</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>PlainResults</servlet-name>
    <url-pattern>/views/query/plain_results</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>PropagatedResults</servlet-name>
    <url-pattern>/views/query/propagated_results</url-pattern>
</servlet-mapping>
<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>

<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list> 

And my context.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path=""/>

The tomcat logs only show me successful requests (200 ok):

192.168.5.77 - - [23/Jun/2012:14:00:29 +0100] "GET /GraphQuery-1.0-SNAPSHOT/ HTTP/1.1" 200 -
192.168.5.77 - - [23/Jun/2012:14:00:29 +0100] "GET /GraphQuery-1.0-SNAPSHOT/ HTTP/1.1" 200  -
192.168.5.77 - - [23/Jun/2012:14:00:30 +0100] "GET /GraphQuery-1.0-SNAPSHOT/ HTTP/1.1" 200 -
192.168.5.77 - - [23/Jun/2012:14:00:31 +0100] "GET /GraphQuery-1.0-SNAPSHOT/ HTTP/1.1" 200  -
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:58:16+00:00Added an answer on June 6, 2026 at 8:58 am

    It turns out the problem was the filter class I had in the web.xml file. Initially i had put it in to take care of static file serving in Tomcat, but it seems like it confused Tomcat and no log showed the redirection or exceptions. It was working in Netbeans because Netbeans always deploys the app you are debugging in the ROOT folder. Unlike tomcat production servers, there are no context directories to account for, like in

    http://localhost:8084/myapp,
    

    where myapp is the context.

    After changing the web.xml file and using the default servlet for the static files, I started using relative mappings — a bit hackish sometimes, but it works.

    I had to change some urls in the project to account for the change. Since in a production server I have a context in the URLs, I had to change the URLs in CSS’s, for example, to use relative paths, like in ../static/img/myimage.jpg

    This is the new version of the Web.xml file that is now working, for further reference:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    
        <!--servlet classes-->
        <servlet>
            <servlet-name>PropagatedResults</servlet-name>
            <servlet-class>com.dendro.query.PropagatedResultsServlet</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>PlainResults</servlet-name>
            <servlet-class>com.dendro.query.PlainResultsServlet</servlet-class>
        </servlet>
    
        <servlet>
            <servlet-name>Home</servlet-name>
            <servlet-class>com.dendro.query.HomeServlet</servlet-class>
        </servlet>
    
        <!--serving static files-->
        <servlet-mapping>
            <servlet-name>default</servlet-name>
            <url-pattern>*.css</url-pattern>
        </servlet-mapping>
    
        <servlet-mapping>
            <servlet-name>default</servlet-name>
            <url-pattern>*.js</url-pattern>
        </servlet-mapping>
    
        <servlet-mapping>
            <servlet-name>default</servlet-name>
            <url-pattern>*.jpg</url-pattern>
        </servlet-mapping>
    
        <servlet-mapping>
            <servlet-name>default</servlet-name>
            <url-pattern>*.jpeg</url-pattern>
        </servlet-mapping>
    
        <servlet-mapping>
            <servlet-name>default</servlet-name>
            <url-pattern>*.png</url-pattern>
        </servlet-mapping>
    
        <!--servlets urls-->
        <servlet-mapping>
            <servlet-name>PlainResults</servlet-name>
            <url-pattern>/query/plain_results</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>PropagatedResults</servlet-name>
            <url-pattern>/query/propagated_results</url-pattern>
        </servlet-mapping>
    
        <servlet-mapping>
            <servlet-name>Home</servlet-name>
            <url-pattern>/</url-pattern>
        </servlet-mapping>
    
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
    </web-app>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The title is pretty self-explanatory: does anyone know of a (good) properties file reader
The title is pretty self explanatory, but basically I need the table row to
Title is pretty self-explanatory. I've got a DataGrid for a Windows Form Application, and
The title of this question should be pretty self explanatory. I am making an
The title is pretty self explanatory. I am currently trying to make a cocos2d
The title is pretty self explanatory. char c = std::cin.peek(); // sets c equal
The title is pretty self-explanatory. Is there any way to get the headers (except
The title is pretty self-explanatory. I'm moving from C# to Java. I have an
i think the title is pretty self explanatory. I have many divs generated from
The title is pretty much self-explanatory, I'm killing myself over this simplicity. Looked here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.