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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:10:13+00:00 2026-05-26T06:10:13+00:00

I have a Java servlet website, but does not use any frameworks like Spring

  • 0

I have a Java servlet website, but does not use any frameworks like Spring or even Struts! It does have hibernate in it which it uses along side regular sql. It also has no unit tests. It uses cvs and ant. The server can only run Java 1.4 in the JSP’s.

Aside from that, the code is fairly well structured.

Are there good ways to add more modern features to the code while minimizing the risk? It seems like we could add some spring features onto new code. And maybe replace the the cvs and Ant with Subversion and Maven, or perhaps something else.

Would it be possible to have new parts of the site running in something like Spring MVC or even JRuby on Rails?

  • 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-26T06:10:13+00:00Added an answer on May 26, 2026 at 6:10 am
    • the code is fairly well structured

    If that is the case, I would start by writing several tests that ensure that current behavior/business stays the same, while you go ahead and introduce Spring in the mix.

    • Would it be possible to have new parts of the site running in something like Spring MVC or even JRuby on Rails

    Everything is possible, but since the code is already Java, and as you pointed out “well structured”, I would go with Spring.

    The easiest place to start is to figure out what depends on what in order to start the “website”. Once you have that, you would already have different components (on paper + in the code) that you can draft with a Spring “starter” application context, that you can load with web.xml as:

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:META-INF/spring/starter-application-context.xml /WEB-INF/spring/transportes-webflow.xml ... </param-value>
    </context-param>
    
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    

    That is before you use any Spring MVC features. Once you have that, see if you can define a domain model for this project. Then you can start converting Servlets to Spring MVC Controllers and Models ( those domains ).

    As you move one step at a time, run those tests, to make sure the behavior is still solid. These can be simple JUnit tests, as well as Selenium tests that would ensure that the “website” flow is still intact.

    • It uses cvs and ant

    I would recommend to switch your build architecture to Gradle, it does take a bit or a learning curve to wrap your head around accessing everything in a build script (which is a good thing), but it really pays off.

    As to CVS, I prefer git, but if you feel strong about SVN, you can switch to that as well. git, in my opinion, became as standard to Version Control System, as Spring to Java development.

    • It does have hibernate in it which it uses along side regular sql

    Understand the reasons regular SQL is used. If these are performance reasons, you can use store procedures instead (that you can work with from within Spring). Also see the reason Hibernate is used, as it may bring additional complexity, that you may not need, and would be better off with a simple Spring JdbcTemplate.

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

Sidebar

Related Questions

I have many years of experience in Java including Swing, Servlet and JDBC, but
I have a Java servlet which generates XML, translates it with an XSLT stylesheet,
Does Java have a built-in way to escape arbitrary text so that it can
Does Java have a data type that represents a period of time eg 34
Does Java have buffer overflows? If yes can you give me scenarios?
I have written a RIA using flex for the front-end and Java servlet for
I have a YUI dialog that submits a form to a Java servlet. The
I have written a servlet java program. During the execution of one particular loop
I'm currently trying to learn HTML and Java EE Servlet programming. I have an
I have servlet that does the following: public class LoginServlet extends HttpServlet { protected

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.