Interesting question, because this is what Struts is strong at. If you really need to add the code, than custom tags are a better way to go
Here is one way I have seen it done using Struts (note the forward is to a pre-defined alias of a jsp page so the path of the jsp is hidden): <%@ page language="java" %> <%@ taglib uri="/tags/struts-logic" prefix="logic" %> <logic:forward name="welcome"/> This is a better approach if the forward is necessary (usually just the main page may contain this redirect). Removing the code from the view is always a good thing to do (IMO). -Sandeep --- "Marc L. de Bruin" <[EMAIL PROTECTED]> wrote: > lo, > > I'm a new Struts user (not new on MVC tho). Before > starting my own > Struts-based webapp, I thought it would be wise to > study some tutorials > first. One of these is > http://www.jspinsider.com/tutorials/jsp/struts/strutsintro.view > . It is > the common logon.jsp/homepage.jsp example. > > However, I don't feel very comfortable with their > resulting MVC, because > they have Java-code within the homepage.jsp to avoid > 'deep linking'. It > looks like this: > > */<%@page contentType="text/html"%>/* > *<jsp:useBean **id**=*"User"* scope**=*"session"* > **class**=*"com.jspinsider.struts.User"* />* > > */<% if (User.isActive() == false){%>/* > *<jsp:forward page**=*'logon.jsp'* />* > */<%}%>/* > > *<**html**> > > *My question: > - Is this the proper way to do it? I didn't expect > Java-code to appear @ the view; > - If not, what is the proper way to accomplish such > a result? > > Tnx, > > Marc. > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

