[Logo] Mentawai Forum - Mentawai Web Framework
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 

Forum Read-Only! Check the new site and forum here!

Authentication/Authorization with JSP Includes  XML
Forum Index -> General Comments
Author Message

Joined: 19/02/2008 06:00:26
Messages: 5

Hey all... First time Mentawai user, and first time poster. I'm having an issue when trying to tweak the authentication/authorization example applications.

I have the following:

header.jsp, index.jsp and footer.jsp

index.jsp uses a jsp include at the top and bottom to include the header and footer. There will be functionality that sits in the header and the footer that may require authorization, so I need to check the users rights/access for each of those files. So, I'm trying to add the check in the header.jsp, which is where I have all the taglibs, etc. being imported. So, if I add the following in the header:

 <mtw:requiresAuthentication redir="true" />
 <mtw:requiresAuthorization groups="users" />

The result is that the header.jsp is not "included", but the index.jsp and footer.jsp still load, albeit with no header information, thus screwing the whole thing up. Am I missing something, or is what I want to do not possile?


Joined: 01/07/2005 09:59:17
Messages: 2846
Location: Rio de Janeiro, RJ

You are probably using a dynamic include instead of a static one.

Use @include instead of jsp:include.

Sergio Oliveira


Joined: 19/02/2008 06:00:26
Messages: 5

Woops! Thanks much...that did it. I'm sure I'll be posting more questions later.

Forum Index -> General Comments
Go to:   
Powered by JForum 2.1.6 © JForum Team