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

  • SEARCH
  • Home
  • 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 6879079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:48:08+00:00 2026-05-27T04:48:08+00:00

i’m trying to implement a basic mvc pattern for a java web app project

  • 0

i’m trying to implement a basic mvc pattern for a java web app project in netbeans. i have the deployment descriptor (web.xml) correct but i can’t seem to redirect to the correct jsp from the java servlet itself. here’s the directory of my project folder:

/project
  /src
    /conf
      MANIFEST.MF
    /java
      /ph
        /com
          /client
            /esurvey
              /objects
                /* other .java files */
              /servlets
                ManageSurveysServlet.java
                /* other .java files */
  /build
    /empty
    /web
     index.jsp
     manage_surveys.jsp
     script.js
     style.css
     /META-INF
       context.xml
       MANIFEST.MF
     /WEB-INF
       web.xml
       /classes
         .netbeans_update_resources
         .netbeans_automatic_build
         /ph
           /com
             /client
               /esurvey
                 /objects
                   /* .class files found here */
                 /servlets
                   ManageSurveysServlet.class
                   /* other .class files found here */

a link from index.jsp calls the ManageSurveysServlet which in turn forwards a request object and redirects to manage_surveys.jsp, but given the above directories, i don’t know what path/filename to use to reference manage_surveys.jsp with from the servlet. here’s the code in the servlet that forwards the request object:

request.setAttribute("surveys", surveys); // surveys is an arraylist
RequestDispatcher dispatcher = request.getRequestDispatcher("manage_surveys.jsp"); // i'm guessing it can't find the jsp
dispatcher.forward(request, response);

UPDATE: web.xml

<?xml version="1.0" encoding="utf-8"?>
<web-app version="2.5" 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_2_5.xsd">
  <servlet>
    <servlet-name>ManageSurveysServlet</servlet-name>
    <servlet-class>ph.com.client.esurvey.servlets.ManageSurveysServlet</servlet-class>
  </servlet>
  <servlet-mapping>
     <servlet-name>ManageSurveysServlet</servlet-name>
     <url-pattern>/ManageSurveys</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>
</web-app>
  • 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-27T04:48:09+00:00Added an answer on May 27, 2026 at 4:48 am

    Move manage_surveys.jsp into WEB-INF folder.I think that will be solution.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,

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.