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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:21:27+00:00 2026-06-11T12:21:27+00:00

I try to send some data but it seems like the Controller could not

  • 0

I try to send some data but it seems like the Controller could not be clear found or could not handle the request.

test.jsp

<%@ page errorPage="exception.jsp"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page session="true" import="java.io.*,java.util.*"%>
<%@ page import="eng.ku.sku.exceed_vote.knt.*"%>


  <form name="AddForm" action="addtext" method="POST">
     <input type="hidden" name="todo" value="add">

Add text:<input type="text" name="text" />

    <input type="submit" value="Add">
  </form>

web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app 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" version="2.5">
<servlet>
<servlet-name>exceed</servlet-name>
<servlet-class>eng.ku.sku.exceed_vote.knt.Controller</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>exceed</servlet-name>
<url-pattern>/addtext</url-pattern>

Controller.java

package eng.ku.sku.exceed_vote.knt;

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;

@WebServlet("/addtext")
public class Controller extends HttpServlet {
    private static final long serialVersionUID = 1L;

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
      doPost(request, response);  // Same as doPost()
    }

    @Override
    protected void doPost(HttpServletRequest request,
         HttpServletResponse response) throws ServletException, IOException {

      // Retrieve the current session, or create a new session if no session exists.
      HttpSession session = request.getSession(true);
      System.out.println("HIIEER");
      // Retrieve the shopping cart of the current session.


      // For dispatching the next Page
      String nextPage = "";
      String todo = request.getParameter("todo");

     // Dispatch to checkout.jsp
     nextPage = "/checkout.jsp";

     response.sendRedirect(nextPage);
     return;
   }
}

I read a lot of other topics but didnt find a solution. I hope u can help me 🙂

  • 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-11T12:21:28+00:00Added an answer on June 11, 2026 at 12:21 pm

    Okay it was a wrong config of Tomcat.

    It didn’t sync the project changes.

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

Sidebar

Related Questions

i try to send some data to my php file from ajax , but
Im getting a connection refused when I try to send some data to my
I try to send an email, but I have a problem, however, I found
I try to send a request to my server via GET, but qooxdoo sends
i try to send data to my php scripts but i think i miss
I try to send POST data to a server using urlfetch in AppEngine. Some
i try to send my datas to php with ajax but there's strange mistake.
I try to send a sms using next code, but recipient gets my message
I need to send some of my data into another server. Actually to post
the XMLHttpRequest object causes two TCP SYN Packets when I try to send some

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.