File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes In case there is no need for Struts... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "In case there is no need for Struts..." Watch "In case there is no need for Struts..." New topic

In case there is no need for Struts...

Ningfeng Xu

Joined: Jan 22, 2002
Posts: 18
Sometimes there is no need for struts, like, when processing a request with no forms(so no user input data), what would be the best choice for handling such requests? At lease, I sopouse using sevlet to prepare the java beans and then pass the request to corresponding jsp is the bottom line. But, any other idea? Thanks a lot.

Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I still think is makes sense to use Struts and Action classes instead of writing servlets. You can configure your action to not use an ActionForm and if no real processing logic needs to be performed then you can use one of the build in Action classes (such as ForwardAction).

- Brent
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I agree with Brent. I frequently create JSPs in my applications that don't have any Struts tags in them. However, I still havigate to these pages via a Struts Action. My feeling is that if you're going to write a Struts application, it's best to use Struts for all navigation in the site.

Consultant, Sima Solutions
I agree. Here's the link:
subject: In case there is no need for Struts...
It's not a secret anymore!