Matt,

Thanks for your reply.  I've seen the suggestion about putting jsp files
under the WEB-INF directory before but have never had a need to do it.

One thing I"m not clear on... if I place the jsps under WEB-INF directory,
what happens if someone tries to access one of them directly using a
bookmark? Do they just get a "page not found" error?

Maybe I just need to try it but here's the scenario I'm envisioning.

I create a "login.do" action that ends up bringing up the login.jsp. The
action called from the login.jsp page will then forward to ... let's say
main.jsp. Do I need to "wrap" that jsp in a "main.do" action?

If I don't what's to stop the user from bookmarking main.jsp and then
getting an ugly (or custom) "page not found" message if the jsp is not
accessible directly?

Like I said, maybe I just need to try it.

Thanks again for all the replies. I don't know what I'd do without all the
help I get from this mailing list.






                                                                           
             "Matthew J.                                                   
             Vincent"                                                      
             <[EMAIL PROTECTED]                                          To 
             jax.org>                  Struts Users Mailing List           
                                       <user@struts.apache.org>            
             04/18/2006 02:00                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: Can't figure out how to do "if  
             Please respond to         then else" with Struts logic tags   
               "Struts Users                                               
               Mailing List"                                               
             <[EMAIL PROTECTED]                                             
                  he.org>                                                  
                                                                           
                                                                           




Not sure if this is a solution for you or not, but you could also put
your JSPs under WEB-INF
directory so that they cannot be directly accessed by a user.  They
would instead have to go
through an Action first.

Filters may be your best bet (and yes, that is the URL to look at).

As far as JST syntax, you could use something like:

                <c:choose>
                    <c:when test="${numberOfResults==0}">
                        <!-- DO SOMETHING -->
                    </c:when>
                    <c:otherwise>
                        <!-- DO SOMETHING ELSE -->
                    </c:otherwise>
                </c:choose>

Hope that helps!

Matt




-----------------------------------------
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to