You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by otsuka <t-...@ijk.com> on 2003/06/07 16:55:33 UTC

Direct access problem

When a user directly access to a JSP page which belongs to
a Struts module, module switching is not processed and Struts
links (<html:link>) in that page do not work correctly because
action path specified in an action or forward attribute of
<html:link> tag is module relative.

How do you deal with this problem?


--
otsuka



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


Re: Direct access problem

Posted by Xu Cheng <xu...@yahoo.com.sg>.
Create a Filter that is mapped to all JSP requests, and in its doFilter 
method, redirect to a page that says something like direct access to JSP 
pages are not allowed. For details of Filter, see SVR.6 of Servlet Spec 2.3.

I can show you some code on Monday, if you would like. I don't have it with me 
now.

On Sunday 08 June 2003 18:10, otsuka wrote:
> > Prevent the user from directly accessing the JSP page by
> > putting all JSP pages under WEB-INF directory,
> > or use a Filter.
>
> I understand the "under WEB-INF" solution, but I don't
> know the filter strategy.
>
> Could you tell me about a filter which solves the direct
> access problem?  What should the filter do for preventing
> direct access?
>
>
> --
> otsuka
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


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


Re: Direct access problem

Posted by otsuka <t-...@ijk.com>.
> Prevent the user from directly accessing the JSP page by
> putting all JSP pages under WEB-INF directory,
> or use a Filter.

I understand the "under WEB-INF" solution, but I don't
know the filter strategy.

Could you tell me about a filter which solves the direct
access problem?  What should the filter do for preventing
direct access?


--
otsuka


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


Re: Direct access problem

Posted by Xu Cheng <xu...@yahoo.com.sg>.
Prevent the user from directly accessing the JSP page by putting all JSP pages 
under WEB-INF directory, or use a Filter.

On Saturday 07 June 2003 22:55, otsuka wrote:
> When a user directly access to a JSP page which belongs to
> a Struts module, module switching is not processed and Struts
> links (<html:link>) in that page do not work correctly because
> action path specified in an action or forward attribute of
> <html:link> tag is module relative.
>
> How do you deal with this problem?
>
>
> --
> otsuka
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


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