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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:43:40+00:00 2026-06-13T19:43:40+00:00

For an existing GUI webapp built upon a SpringMVC (3.0.1) stack, I want to

  • 0

For an existing GUI webapp built upon a SpringMVC (3.0.1) stack, I want to expose a RESTful API. What would you consider a reasonable option?

  1. Integrate with another framework like Jersey (seems like restarting from scratch)?
  2. Use the built in SpringMVC integration of JAXB / Jackson?
  3. Should I just add another servlet-mapping /api/* to the same DispatchServlet?
  4. All the views are coded in jsp. Should I use jsp templates for my XML API?
  5. Build a separate new webapp with common dependencies?
  6. Anything else?

Hereafter is my web.xml:

<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">

    <welcome-file-list>
        <welcome-file>home.html</welcome-file>
    </welcome-file-list>

    <servlet>
        <servlet-name>spring-mvc</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring/spring-mvc.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>spring-mvc</servlet-name>
        <url-pattern>/web/*</url-pattern>
    </servlet-mapping>

</web-app>

And my spring context descriptor:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context" xmlns:security="http://www.springframework.org/schema/security" xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="
            http://www.springframework.org/schema/beans 
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/security 
            http://www.springframework.org/schema/security/spring-security-3.0.xsd
            http://www.springframework.org/schema/mvc 
            http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"
>

    <context:component-scan base-package="net.mycrub.poc.controllers" />

    <bean id="viewResolver" 
        class="org.springframework.web.servlet.view.InternalResourceViewResolver" 
        p:prefix="/WEB-INF/jsp/views/" 
        p:suffix=".jsp"
        p:viewClass="org.springframework.web.servlet.view.JstlView" />

</beans>

Thanks in advance ; mapping examples are welcome 🙂

  • 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-13T19:43:45+00:00Added an answer on June 13, 2026 at 7:43 pm

    I will take a stab at a few of your questions…

    Integration/Separate: I would recommend you build your REST application separate from your WEB GUI. A big reason why people build API’s is to expose it to multiple applications so I wouldn’t tie the WEB GUI so closely with the API. This thought is in line with the whole separation of concerns concept. For example if later on you build a Mobile app to access the same API it won’t be impacted if you need to take down your WEB GUI for a deployment.

    Jackson/ JAXB: I would highly recommend Jackson. In my opinion is it has the best mix of performance and functionality.

    Spring MVC/Jersey: I would recommend sticking with Spring for a couple reasons:

    1.) Less of a learning curve, if you’re familiar with Spring already there is nothing wrong with sticking with it.

    2.) Dependency injection in Jersey today is more or less broken (http://java.net/jira/browse/JERSEY-517). So if you’re used to how well this works in Spring like I was, switching to Jersey will be painful. This is supposed to be addressed in the 2.0 release but that’s not finalized yet.

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

Sidebar

Related Questions

I have: existing object oriented native code API (non GUI) GUI application that works
I want to develop a new powerful GUI for an existing C++ application. I
I am attempting add some tests to an existing QT GUI application using QTest.
I have a small wrapping application to give a GUI to an existing console
I write custom worker component and want it to fire it's events on GUI
I have an existing app with a command-line interface that I'm adding a GUI
I want to start using guice in an existing application that has legacy code.
I'm looking for writing a GUI client for a existing application in my job,
I have an existing python script and I want to wrap it in a
Existing XML webservice Processes XML-RPC style requests in which an operation element which identifies

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.