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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:28:37+00:00 2026-06-10T05:28:37+00:00

Here is my index.jsp code: <html> <head> <meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1> <title>Index JSP File</title>

  • 0

Here is my index.jsp code:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Index JSP File</title>
</head>
<body>
<form action="/IndexController" method="get">
<table>
<tr><td>Enter Your Name :</td> <td><input type="text" name="name"/></td></tr>
<tr><td><input type="submit" value="Submit" /></td></tr>
</table>
</form>
</body>
</html>   

Here is my IndexController Servlet code:

public class IndexController extends HttpServlet {

    protected void doProcess(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String uname = request.getParameter("name");
        response.sendRedirect("welcome.jsp?name="+uname);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doProcess(request, response);
    }


    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doProcess(request, response);
    }

}

Here is my welcome.jsp page code

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<% String fname = request.getParameter("uname");%>
<h1>Welcome to JSP World,  <%=fname%></h1>
</body>
</html>

When I run this through the Java EE runtime, I got an index.jsp page, but after I entered a name and click submit I got the following error:

Error 404 - Not Found No context on this server matched or handled this request. Contexts known to this server are:  JSPExample(/JSPExample)
  • 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-10T05:28:38+00:00Added an answer on June 10, 2026 at 5:28 am

    Also change the line in welcome.jsp <% String fname = request.getParameter("**uname**");%> to <% String fname = request.getParameter("**name**");%>, since your parameter name is name response.sendRedirect("**welcome.jsp?name="+uname);** 🙂

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

Sidebar

Related Questions

Here is my try: @header(Content-type: text/html; charset=utf-8); @header(Location:/index.php); @header(Cache-Control: no-cache, must-revalidate); // HTTP/1.1 @header(Expires:
I stumbled upon Jtalk here http://nicolaspetton.github.com/jtalk/index.html#download but when clicking on download I have 404
I have a problem in my Java webapp. Here is the code in index.jsp:
I'm looking to use jScrollPane's scrollToElement API function here: http://dextersgospel.com/index-test.html Instructions on it's usage
I want to invoke my jsp page from my index.html.This is html code. <html>
Here's what I'm trying to achieve: Before: www.example.com/index.php?page=about&pg=5 After: www.example.com/about.html?pg=5 The URL must specifically
Here in this code: $('#doneItem').click(function(){ $(this).each(function(index){ var item = 'personal' + index; alert(item); localStorage.removeItem('personal'
Here's the code in AlertTableView: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ NSInteger index = 12345; NSLog(@AlertTableView:
You can see my project here - http://www.inluxphoto.com/custom/jsgallery/index.php I am attempting to make the
I'm trying to add a custom catalog index based on the recommendation here: http://collective-docs.readthedocs.org/en/latest/searching_and_indexing/indexing.html#custom-index-methods

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.