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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:38:17+00:00 2026-05-25T01:38:17+00:00

Background: I’m relatively new to Java/Spring and inherited a project built on them. We’re

  • 0

Background: I’m relatively new to Java/Spring and inherited a project built on them. We’re moving to AWS Elastic Beanstalk which changed the location of the main page for JSON requests from:

www.mywebsite.com/myApp/myAppJsonService

to:

www.mywebsite.com/myAppJsonService

That worked fine- all the functions that come out the JSON requests (most of them) are working perfectly. I have another page that takes a teacher’s uploaded quiz via HTML form submit and parses the data. The form used to point to:

www.mywebsite.com/myApp/controllers/importQuiz

so I changed it to:

www.mywebsite.com/controllers/importQuiz

The web.xml file has:

<servlet>
    <servlet-name>SpringDispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:context/Controllers.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>SpringDispatcher</servlet-name>
    <url-pattern>/controllers/*</url-pattern>
</servlet-mapping>

And the corresponding Controllers.xml code:

<bean id="importExamController" class="com.myapp.controllers.ImportExamController">
    <property name="commandClass" value="com.myapp.objects.spring.FileUploadBean"/>
    <property name="myappManager" ref="myappManager"/>
</bean>

<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="mappings">
        <props>
            <prop key="/importExam">importExamController</prop>
            <prop key="/heartbeat">heartBeatController</prop>
        </props>
    </property>
</bean>

The way I read it, regardless of the preceding “myapp” in the URL, it should find “/controllers/” in the URL, look to the Controllers.xml file and find the “/importExam” and direct it to the “importExamController”. That’s not happening. Clearly, there is a fault in my logic, and I can’t seem to find it. Any help would be very much appreciated.

EDIT:

Doing some digging through the logs, I found:

INFO: WSSERVLET14: JAX-WS servlet initializing
Aug 27, 2011 7:21:06 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate doGet
SEVERE: caught throwable
ClientAbortException:  java.net.SocketException: Broken pipe
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:373)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:327)
    at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:396)
    at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:385)

and it goes on for a while. To me it looks like that is confirming the idea that the data is trying to be sent to something that is incorrectly mapped. Let me know if this might mean something else or if it’s just irrelevant.

  • 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-25T01:38:17+00:00Added an answer on May 25, 2026 at 1:38 am

    First off, why in the world would you want controllers in your URL? Secondly, you have the right idea of how it should work, and you’re probably correct about something not being configured correctly.

    You should really read up on the enhanced MVC functionality in Spring 3.0+. With annotations and the mvc namespace, your code would look like (e.g.):

    @Controller
    @RequestMapping("importExam")
    public class ExamController {
    
        private final examService;
    
        @Autowired
        public ExamController(ExamService examService) {
            this.examService = examService;
        }
    
        @RequestMapping(method=RequestMethod.GET)
        public String getExams(ModelMap model) {
            model.addAttribute("exams", examService.getExams());
            return "exams";
        }
    
    }
    

    And your controller is just:

    <mvc:annotation-config/>
    

    to load the controller and bind the request mappings to urls. This allows for wildcards too. The above controller would wire all URL request for /importExam to this controller, and process the default GET method at the base context. You could add nested methods with additional request mappings which would reside beneath the /importExam context.

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

Sidebar

Related Questions

Background Currently, if I want to create a new object in C# or Java,
Background: Some time ago, I built a system for recording and categorizing application crashes
Background I work for a large organization which has thousands of MS Access applications
Background I have a ror application which is continuously recording and showing on a
Background I am developing a social web app for poets and writers, allowing them
Background This is only my second PyQt4 project. Developing a Windows app that has
Background My project is urgent and requires that I iterate a large XML file
Background: I'm new to CakePHP. I have a small test site (mostly composted of
Background I've recently been a part of a project where twisted was used. We
Background: My coworker and I are maintaining a million-line legacy application we inherited. Its

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.