There's 3 places it's configured:

web.xml: MenuListener
menu-config.xml
menu.jsp

I'd check to see if something looks out of whack in those files after
you change everything.

Matt

On 5/3/07, Haotian Sun <[EMAIL PROTECTED]> wrote:
right, I'll try that later. But for my question about why the struts
menu disappears in the case that I described previously, do you have any
idea?

Thanks

Haotian

Matt Raible wrote:
> You might be able to look at the "new" target and change it's logic so
> it doesn't apply it to **/*.java files.
>
> Matt
>
> On 5/3/07, Haotian Sun <[EMAIL PROTECTED]> wrote:
>> Hi Matt,
>>
>> Regarding to "it changes my current source code package structure", I
>> mean it change the package name in my source code, for example if my old
>> project is called AAA and new one is named BBB, it changes from
>> something like "org.AAA.dao" to "org.BBB.dao". What I want is to keep
>> the old package name but just change the webapp name.
>>
>> Hope that's clear for you.
>>
>> Thanks
>>
>> Haotian
>>
>> Matt Raible wrote:
>> > 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]
>> >>
>> >>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> 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