Git Product home page Git Product logo

java-mvc-framework's Introduction

This is a simple MVC framework which can be used to build web application in a quick manner.
This has been tested with tomcat 5.5 and tomcat 6 only. 


Changes to web.xml (placed in WEB-INF)
1) Add the StartupServlet.java as servlet.
2) Add a Filter which will only intercepts form requests with the actions which ends with ".go"
     Make change in web.xml to allow or add other extensions.


control.xml
This xml holds information for every action. It will specify every InitProcessor, Service, Dispatcher.
Based on the result status, it will also provide information to the jsps where the response to be redirected to.

StartupServlet.java
This is loaded on startup. It converts all nodes in control.xml into a hashmap and stores it as a hashmap in the ServletContext for quick access.

If a request to a jsp is made, the Filter will not intercept it.
If the action is changed to ".go" the Filter will redirect it to the ControlServlet.

ControlServlet.java
This will use the action name in the request to identify a node in the control.xml from the SErvletContext.
It uses this information to invoke the init processor, service, and dispatcher.

See comments in the java files to understand the functioning better.

Call to jsps direclty are not processed by the Controller.


java-mvc-framework's People

Contributors

kensenjohn avatar

Stargazers

JS avatar  avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.