Not quite. I think I already have it set up for direct jsp access disabled. Aka, when I type in the path to something.jsp, I can't access it. HOWEVER, when I type in "/something", I can access it. Sometimes, this is good. For example, if I have a form I want the user to fill out, I don't want to make an empty class just so I can access a form. I provide a link to "/something" and it automatically gets me to that form. What I'm referring to is, I want to take advantage of the ability for an action, say Register.java, to automatically direct me to register-success.jsp with no annotations needed, which it can, but I don't want register-success.jsp to be accessible via /register-success. Register.java can ALSO automatically direct me to register.jsp with no annotations needed with the added benefit that I can't access register.jsp directly by going to /register because of the presence of a Register.java action. Does that make sense?

Paweł Wielgus wrote:
Hi,
if i get You right search for disabling direct jsp access on this group.

Best greetings,
Paweł Wielgus.


2010/7/11 JP Cafaro <jcafar...@gmail.com>:
I'm using struts2 with the convention plugin.  I'm really new to all of it
and haven't really used Struts 2 WITHOUT the plugin before.  Seeing as it's
called "convention", I imagine that there are a lot of things that it can do
automatically by convention.  One of the things I was curious about was how
struts2 resolves jsp pages vs actions.

For example, suppose I have a jsp page called register.jsp, if I navigate to
/register, I get to that jsp page.  register.jsp might be the result of a
registration so I may have an action called Register.  Now if I navigate to
/register, it goes to the action, and if I don't do anything else, the
result page is automatically register.jsp.  This is good because I can't
directly access register.jsp now and I don't want the users to be able to do
that.

One thing I also like is that I don't have to call my result page
register.jsp, I can call it register-success.jsp and it will still work the
same way EXCEPT that a user can now directly type /register-success into
their address bar and will be taken to that page.  Conventionally, how do
people solve this problem?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to