aspose file tools*
The moose likes Struts and the fly likes problem on choosing jsp file direclty Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem on choosing jsp file direclty" Watch "problem on choosing jsp file direclty" New topic
Author

problem on choosing jsp file direclty

Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
hi friends,

in my struts 1.3 application when user type the direct path of jsp page it says "the form bean is not found".
what is the solution for this issue?

should we need to allow direct invokation of jsp in applicaion?
or make it accessible only through action class?

i am new to struts and in confusion with this issue.

hope to get a solution...
thanks in advance....
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Why is the user typing in the path to a JSP?
Struts is a Front Controller, a strategy to separate the responsibility for controlling the application, the business logic of the application and the view of the data (commonly referred to as MVC). Your user is trying to bypass two of those and rush right to the view, where there is nothing to view.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
thanks Joe Ess,

but it looks bad when it display some error message on page.
is there any way to redirect to some other page like login, or error page?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

You can specify custom error pages in web.xml and redirect from there.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem on choosing jsp file direclty