aspose file tools*
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
Author

In case there is no need for Struts...

Ningfeng Xu
Greenhorn

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.


SCJP2
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.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: In case there is no need for Struts...