Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

strtus2 and spring: configuration issue

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to integrate my application with spring (I'm a complete newbie to spring) and every tutorial I read, states that this should be done in the struts.properties file.

struts.objectFactory = spring
struts.devMode = true
struts.enable.DynamicMethodInvocation = false


Questions:
1. Where is this file located? (I don't have it -where should I place it?)
2. Is there more than one way to integrate? I simply wish to use Acegi security and realized that it depends heavily on spring.

thanks for any pointers
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have those lines in my struts.xml:



I actually don't have the third one you list, and it seems to work for me. I'm using Spring rather heavily for dependency injection, but not for Acegi.

alternatively you can create a struts.properties file at the same directly level as your struts.xml, I beleive and use the syntax you show. I just like keeping the number of files to a minimum so I decided to use the constant approach.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup you can create it in the same level as the struts.xml

here is what my struts.properties looks like

struts.objectFactory = spring
struts.devMode = true
struts.enable.DynamicMethodInvocation = false
struts.custom.i18n.resources=messages
struts.mapper.class=com.springstruts2.web.struts.action.Mapper
struts.multipart.parser=org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest
struts.multipart.maxSize=102400000
struts.multipart.saveDir=c:/export
 
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic