Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

how to get request parameters in spring

Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am completely new to Spring. So i am trying to understand spring with the knowledge which I have in Struts.

I have created a jsp page like we do in Struts.
I have given the "action" to be something. Now where do I give to which class should it forward to? In struts we have struts-config.xml to know this using our <action-mappings> tag. How do I do here?

I see that there are no action classes here. Where do I write my business logic and how do I get request parameters like i do in Struts request.getParameter(....) in execute method of Action class.

But I could not get the full flow with this.
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vysh ,
Spring is a vast framework .I guess you are specifically talking about MVC part of it .Why don't you take a look of its documents (available in the net ) .Spring MVC webpage.

Regarding to your query / doubt :

Step -1 :
Every web app require one web.xml file like :

Read the DispatcherServlet , ContextLoaderListener ,context:component-scan ,InternalResourceViewResolver ..

Step :2
Create one simple controller class like :

and finally the user.jsp

By using spring framework we can develop POJO based controller , where we do not need any doGet() / doPost() like structure .

Hope you understand ..

Thanks ,

    Bookmark Topic Watch Topic
  • New Topic