struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc L. de Bruin" <m...@debruin.org>
Subject Check session/BO @ the view without using Java
Date Thu, 01 Nov 2001 20:48:12 GMT
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:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message