Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

how to get request parameters in spring  RSS feed

Posts: 7
  • Mark post as helpful
  • send pies
  • 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
  • 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 ,

Why fit in when you were born to stand out? - Seuss. Tiny ad:
how do I do my own kindle-like thing - without amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!