Hello
I am new to Struts. And I got a question.
As my understanding. With Struts the two parts "Action" first then "View". and the forward joint them. It is that loose.
But what happen if the browser request the view directly, then "Action" has been skipped. So without action beans can not been access.
As I try the struts-example. put "http://localhost:8080/struts-example/registration.jsp"
then got
"javax.servlet.ServletException: No bean found under attribute key registrationForm"
For me there are two questions.
First how to access a page jsp can show some action information but not breake the MVC model.
Second How to prevent others to access the "view" Jsp page directly or I need do the somethings like <app:checkLogon/> every page.
Thanks for any help .
Tix
-
Skip Action in Struts (2 messages)
- Posted by: Tix Ze
- Posted on: December 20 2002 09:57 EST
Threaded Messages (2)
- Skip Action in Struts by Web Master on December 20 2002 14:38 EST
- Skip Action in Struts by Da Ros S?bastien on January 06 2003 03:43 EST
-
Skip Action in Struts[ Go to top ]
- Posted by: Web Master
- Posted on: December 20 2002 14:38 EST
- in response to Tix Ze
I dont quite understand the first question.
One option for the second question is to put your JSP's in a floder under your WEB-INF folder. They are not directly accessible there. -
Skip Action in Struts[ Go to top ]
- Posted by: Da Ros S?bastien
- Posted on: January 06 2003 03:43 EST
- in response to Web Master
Hello,
i think you must call:
http://localhost:8080/struts-example/registration.do
and you will execute the perform(or execute) méthod of
the action class.
@+
Seb