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 4059400
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:12:14+00:00 2026-05-20T15:12:14+00:00

I discovered Guice last week… I’m trying some easy tricks with it. However, I’m

  • 0

I discovered Guice last week… I’m trying some easy tricks with it. However, I’m currently blocked…

I’m trying to forward a request to a JSP in a Servlet served by an url-pattern which contains a ” * “. But I receive “Error 404” all the time 🙁

Step by Step :


ServletModule :
serve("/test/*").with(TestServlet.class);

TestServlet :
public void doGet(HttpServletRequest req, HttpServletResponse resp)  
{

    System.err.println("Start");
    try 
    {
        req.getRequestDispatcher("/WEB-INF/layout/test.jsp").forward(req, resp);
    } 
    catch (Exception e) 
    {
        e.printStackTrace();
    }

}

I get this error :

HTTP ERROR 404
Problem accessing /WEB-INF/layout/test.jsp. Reason:
/WEB-INF/layout/test.jsp

I tested with “serve(“/test”).with(TestServlet.class);” and it worked
I tested without Guice (by defining servlet in the web.xml) and it worked…

  • What did I do wrong?

Thank for reading!

  • 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-05-20T15:12:15+00:00Added an answer on May 20, 2026 at 3:12 pm

    Client can’t access resources from Web-INF directly (by url). So forwarding doesn’t work in this case. But your servlets can. So just use include instead of forward.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I discovered to have some problem to fully understand callbacks scoping when trying to
I just discovered that the caps lock and shift key (and probably some more
I discovered template metaprogramming more than 5 years ago and got a huge kick
I discovered that one of the tables of a legacy db I'm working on
We recently discovered that the Google Maps API does not play nicely with SSL.
Today I discovered that my fresh installation of Apache HTTP Server is able to
I recently discovered the genshi.builder module. It reminds me of Divmod Nevow's Stan module.
I've discovered that any time I do the following: echo '<a href=http:// title=bla>huzzah</a>'; I
I only just recently discovered that Visual C++ 2008 (and perhaps earlier versions as
I've discovered that cElementTree is about 30 times faster than xml.dom.minidom and I'm rewriting

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.