Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling Struts Action outside the web application context

 
Brian Nguyen
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We are currently having a system that using Struts and we would like have another interface (command line etc...) which is not web. So I am wondering if we have any way to call the Struts actions in the existing system but not in web context?
Thanks for your help in advance.
Brian
 
Junilu Lacar
Marshal
Posts: 10377
123
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like feature envy to me. You should probably refactor the code currently in the Action and extract it to a plain old Java object. The Action can collaborate with the new class to perform whatever it was doing before and you can also use the new class in a non-web context.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!