What do you mean by "it changes my current source code package
structure"?  What does it change it from/to?

Matt

On 5/3/07, James Sun <[EMAIL PROTECTED]> wrote:
Well, if I do ant new , it will satisfy my goal but changes my current
source package structure, which I'm not willing to see. So still needs
suggestions...

Cheers

Haotian

Haotian Sun wrote:
> Hello guys,
>
> I've developed a webapp using Appfuse 1.9.4 with Struts for sometime,
> now I just want to change the name of my webapp rather than touching
> anything in my src package structure so far. What I think the easitest
> way to test is to copy everything that is working in the current
> webapp named A to an empty folder called B in my tomcat.home/webapp.
> However the Struts menu disappers after I restart tomcat and load the
> application. I've looked into the problem and found out that it is
> caused by my customized Struts menu which is actually loaded
> dynamically based on a role authorization(each url in the webapp has
> been entitled for certain roles).  The following is the method from my
> customized menu adapter:
>
> public boolean isAllowed(MenuComponent menu) {
>      if(menu.getUrl()==null){
>        return true;
>      }else{
>        String url=menu.getUrl();
>        log.debug("$$$$$$$$$$$$$$ Menu.getUrl is "+url+"  %%%%%%%%");
>        url=url.substring(10)+"*";
>        List allowedRoles = roleManager.getRolesWithResource(url);
>        log.debug("The size of allowedRoles is "+allowedRoles.size());
>        for(int i=0;i<allowedRoles.size();i++){
>          Role allowedRole = (Role)allowedRoles.get(i);
>          if(request.isUserInRole(allowedRole.getName())){
>            return true;
>          }
>        }
>      }
>      return false;
>      //return menuNames.contains(menu.getName());
>  }
>
> After investigation on the debug info, I found that the URLs that are
> used to represent the link of each menu item have the following format
> in my original webapp A, for instance, "A/mainMenu.html". But it
> changes to "B/mainMenu.html" once I just change the name of webapp. I
> guess the problem is caused by Acegi security somewhere, but have no
> idea so far. So I hope someone here can help me figure it out!
>
> Thanks in advance.
>
> Haotian Sun
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

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




--
http://raibledesigns.com

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

Reply via email to