• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to do database progrmanning with Struts2

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, i m starting a new project and was wondering how to do database connectivity and access, i had a sample progrm from struts1+spring+hibernate it works fine. do i need to use spring with struts2 also. how to go ahead.

i migrated to struts 2 my strut1 app and it is not working, when i use

public static ApplicationContext getContext(HttpServletRequest httpRequest) {
return WebApplicationContextUtils.getRequiredWebApplicationContext(
httpRequest.getSession().getServletContext());
}

i m getting null value, something is wrong and i have no clue at all what to do.
 
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

do i need to use spring with struts2 also. how to go ahead.


No, you need not use Spring with Struts 2.

i migrated to struts 2 my strut1 app and it is not working


Take a look at the migration guides. If you're talking about a sample application, I would actually suggest you starting fresh with Struts 2 rather than migrating. Of course all the business logics that you'd coded should be re-usable in Struts 2 as well.
 
sunil gupta
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok then please guide me how to do database stuff with out the use of spring. please post some sample code.

Tahnks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic