James Mitchell wrote:

>Did you try building the webapps?
>
>JM 
>
>>-----Original Message-----
>>From: jfc100 [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, May 13, 2002 11:12 AM
>>To: Struts-User
>>Subject: I need help building tiles from src - please
>>
>>
>>Hi,
>>
>>I've been trying to build tiles and am struggling a bit.
>>
>>I downloaded and ran a build of 'jakarta-struts-1.1-b1-src' only to find 
>>that it doesn't automatically build tiles. When I finish building 
>>struts, I can see a contrib directory which contains a tiles 
>>subdirectory with the tiles source in it.
>>
>>When I read the build.xml notes, it says make sure this file is in the 
>>root of the struts-src directory.
>>
>>This is going to override the existing struts build.xml - which is 
>>surely not what we want.
>>
>>What is the best way to arrange things?
>>
>>Thanks
>>Joe
>>
>>
>>--
>>To unsubscribe, e-mail:   
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: 
>><mailto:[EMAIL PROTECTED]>
>>
>>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
Well, no I didn't. I simply ran 'ant' in the jakart-struts-src-dir.

I noticed something in the struts build.xml file:

<snip> ...
This script will delegate some of it's tasks to the other build*.xml
        scripts (build-webapps.xml, build-tests.xml, ...)
 ... <snip>

I sounds like this path is not so well trodden i.e. building tiles from 
src.

The reason I'm trying to build Tiles myself from the src is due to an 
anomaly somewhere between jboss and tomcat when it comes to  determining 
a user's login status. (see 
http://main.jboss.org/forums/thread.jsp?forum=49&thread=13002 )

I'm trying to create something like this in the Tiles 
template-definition selection code:

public boolean myPsuedoCheckRoleWrapper(HttpServletRequest request, 
String tilesDefnRoleAttribute){

    if(tilesDefnRoleAttribute.equalsIgnoreCase("anonymous"){
        // return true if the user is not logged-in.
        // i.e. Jaas login doesn't update the request with 
authentication info - like tomcat does as part of form-based auth -
        // so do my own checking - whatever it takes.
        // Doing a login is desireable otherwise tiles needs two forward 
tiles-definitions in struts.config 1=anonymous 2=custom(role-based) 
        //   - and tiles-defn-conf.xml needs a lot more setup -  not 
very elegent!
        return true;
    }

    boolean tilesResult = request.isUserInRole(role)?true:false;
    return tilesResult;
}

Any suggestions and advice are most welcome!
Cheers
Joe


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

Reply via email to