RE: How to create a custom profiling rule?
Sorry to bother you all with this again... Ok, after I've done all these changes, I found a new problem as well: no links (*.link files) are displayed on either of the pages, for neither of the users. I tried placing them in the / and /dce-portal directory, but still nothing is displayed. Is this a problem with my new profiling rule? What determines whether links are displayed or not? Thanks! Marina --- Marina [EMAIL PROTECTED] wrote: Randy, thanks for your help. You are probably right and I made it more complicated than what it should be. Basically, what I would like to have in my portal is: 1. all application-specific portal pages/ docsets/ links should be in a separate directory, say, .../pages/dce-portal/ 2. users ('dce-user', 'dce-admin') with the 'dce-user-role' should be able to see one main page, dce-main-page.psml, and one additional page as a tab, dce-users-page.psml. Both .psml pages are in the .../pages/dce-portal/ directory 3. a generic (non-logged in, 'guest') user should see the ../pages/dce-portal/dce-main-page.psml, and nothing else So, to accomplish this, I have created this custom profiling rule: insert into PROFILING_RULE values ('dce-generic', 'org.apache.jetspeed.profiler.rules.impl.StandardProfilingRule', 'rule for non-logged in DCE portal users') insert into RULE_CRITERION values ('100', 'dce-generic', 0, 'path', 'path', '/dce-portal', 0) and assigned it to the 'guest', 'dce-user' and 'dce-admin' users. This made all pages visible to these three users. To restrict access to the user-specific page to the users with the 'dce-user-role' role, I've added the following security constraints to the dce-users-page.psml: security-constraint rolesdce-user-role/roles permissionsview/permissions /security-constraint Well, that did work. With the exception of those problems I mentioned in my previous post (one of them was fixed by using #if($site.rootLinks.isEmpty()) as David suggested) So, the only problem that is still left is inclusion of the .ds sets from the '/' directory. I would rather like to use the ../pages/dce-portal/ as the root directory, but my profiling rule does not seem to accomplish this. I hope I'm being clear :) And thanks a lot for looking into this! Marina --- Randy Watler [EMAIL PROTECTED] wrote: Marina, Using the Profiler effectively is more in my court, so let's see if I can help here. I think there are three subjects here that need individual attention: 1. you probably do not need to define a new profiling rule... there are some predefined rules that you can use to achieve role-based profiling, 2. the demo site is just that and you should start with a clean WEB-INF/pages directory only adding in what you need from the demo site, and 3. the tigris sample decorator is a good starting place, but most everyone ends up customizing and deploying their own flavor. So, rather than trying to figure out what you have now, I would like to know what your objective is. I'll then tell you how I'd solve it using the M1 release version. We can then compare notes and take it from there... ok? Randy -Original Message- From: Marina To: Jetspeed Users List Sent: 12/30/04 1:26 PM Subject: Re: How to create a custom profiling rule? David, Thanks for the clarification. I did find a way to do role-based profiling, basically, by restricting access to specific PSML pages by roles. I still have a few problems I was not able to solve so far. The main one is that I still get some elements from the '/' directory included into my pages, even though I explicitly specified in my profiling rule that only elements from a specific directory should be used. I think I made some stupid mistakes while creating custom profiling rules... Here is how I setup my portal's content and created a new profiling rule using direct SQL (I don't think it is possible to that through the Admin portlets yet): 1. create new directory for my Portal content: pages/dce-portal place into this directory: dce-main-page.psml dce-user-page.psml folder.metadata 2. define new role, 'dce-user-role', and assign it to the 'dce-user' user 3. define security constraints in the folder.metadata: 'guest' users can view all pages; users with 'dce-user-role' role can view all pages security-constraints security-constraint usersguest/users permissionsview/permissions /security-constraint security-constraint rolesdce-user-role/roles permissionsview/permissions /security-constraint /security-constraints 4. define security constraints in the dce-main-page.psml: !-- allow all users to view -- security-constraints security-constraint users*/users
Re: I've wrote a Layout Controller which support complex html layout
Hello James James Wang wrote: I've wrote a Layout Controller which support complex html layout,even you can upload a html file with tabletr/tr/table,within every td tag which doesnt nested any table more,you can insert a portlet. I think this is a useful program ,how do i contribute my work? Sounds interesting. Can you explain a little bit deeper how the controller works and what can be done with it? I don't belong to the developer community but if your piece of code is some kind of GridController I'd be interested to know more about it. Cheers, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to create a custom profiling rule?
Marina, *.link files are only displayed if addressable in the / request directory as rootLinks, or as elements of a document set. This explains why they are not visible if located in the /dce-portal directory. Security limitations apply to link visibility, so perhaps that might explain why you do not see them when placed in the / directory? We still need to discuss use of the /dce-portal directory with your custom profiling rule, but I do not think it is messing up the display of rootLinks... of course, I might be missing something that should be obvious. Randy Marina wrote: Sorry to bother you all with this again... Ok, after I've done all these changes, I found a new problem as well: no links (*.link files) are displayed on either of the pages, for neither of the users. I tried placing them in the / and /dce-portal directory, but still nothing is displayed. Is this a problem with my new profiling rule? What determines whether links are displayed or not? Thanks! Marina --- Marina [EMAIL PROTECTED] wrote: Randy, thanks for your help. You are probably right and I made it more complicated than what it should be. Basically, what I would like to have in my portal is: 1. all application-specific portal pages/ docsets/ links should be in a separate directory, say, .../pages/dce-portal/ 2. users ('dce-user', 'dce-admin') with the 'dce-user-role' should be able to see one main page, dce-main-page.psml, and one additional page as a tab, dce-users-page.psml. Both .psml pages are in the .../pages/dce-portal/ directory 3. a generic (non-logged in, 'guest') user should see the ../pages/dce-portal/dce-main-page.psml, and nothing else So, to accomplish this, I have created this custom profiling rule: insert into PROFILING_RULE values ('dce-generic', 'org.apache.jetspeed.profiler.rules.impl.StandardProfilingRule', 'rule for non-logged in DCE portal users') insert into RULE_CRITERION values ('100', 'dce-generic', 0, 'path', 'path', '/dce-portal', 0) and assigned it to the 'guest', 'dce-user' and 'dce-admin' users. This made all pages visible to these three users. To restrict access to the user-specific page to the users with the 'dce-user-role' role, I've added the following security constraints to the dce-users-page.psml: security-constraint rolesdce-user-role/roles permissionsview/permissions /security-constraint Well, that did work. With the exception of those problems I mentioned in my previous post (one of them was fixed by using #if($site.rootLinks.isEmpty()) as David suggested) So, the only problem that is still left is inclusion of the .ds sets from the '/' directory. I would rather like to use the ../pages/dce-portal/ as the root directory, but my profiling rule does not seem to accomplish this. I hope I'm being clear :) And thanks a lot for looking into this! Marina --- Randy Watler [EMAIL PROTECTED] wrote: Marina, Using the Profiler effectively is more in my court, so let's see if I can help here. I think there are three subjects here that need individual attention: 1. you probably do not need to define a new profiling rule... there are some predefined rules that you can use to achieve role-based profiling, 2. the demo site is just that and you should start with a clean WEB-INF/pages directory only adding in what you need from the demo site, and 3. the tigris sample decorator is a good starting place, but most everyone ends up customizing and deploying their own flavor. So, rather than trying to figure out what you have now, I would like to know what your objective is. I'll then tell you how I'd solve it using the M1 release version. We can then compare notes and take it from there... ok? Randy -Original Message- From: Marina To: Jetspeed Users List Sent: 12/30/04 1:26 PM Subject: Re: How to create a custom profiling rule? David, Thanks for the clarification. I did find a way to do role-based profiling, basically, by restricting access to specific PSML pages by roles. I still have a few problems I was not able to solve so far. The main one is that I still get some elements from the '/' directory included into my pages, even though I explicitly specified in my profiling rule that only elements from a specific directory should be used. I think I made some stupid mistakes while creating custom profiling rules... Here is how I setup my portal's content and created a new profiling rule using direct SQL (I don't think it is possible to that through the Admin portlets yet): 1. create new directory for my Portal content: pages/dce-portal place into this directory: dce-main-page.psml dce-user-page.psml folder.metadata 2. define new role, 'dce-user-role', and assign it to the 'dce-user' user 3. define security constraints in the folder.metadata: 'guest' users can view all pages; users with 'dce-user-role' role can
j2 in tomcat 5.5
Hi all, i'm trying to start jetspeed2 in tomcat 5.5. I successfully built jetspeed2 on java 1.5 compiler with -source 1.4 and deployed it with maven. When i start tomcat, jetspeed initialize succesfully, - in tomcat manager i see that pam is not started, the others are started according to the manager - , but after that i get the following error in tomcat's std.out (jetspeed.log seems ok, velocity.log contains one error: 2005-01-07 17:20:43,187 [Thread-1] ERROR velocity - ResourceManager : unable to find resource '/WEB-INF/VM_global_library.vm' in any resource loader. ) So i have this in tomcat's stdout.log: INFO: Loading portlet application from web archive C:\zsolt\JXTA_WS\Tomcat5.5\webapps\jetspeed\WEB-INF\deploy\pam.war INFO: Portlet application pam already been registered. Skipping initial deployment. INFO: Adding file:/C:/zsolt/JXTA_WS/Tomcat5.5/webapps/jetspeed/../pam/WEB-INF/classes/ to class path. ... INFO: Adding file:/C:/zsolt/JXTA_WS/Tomcat5.5/webapps/jetspeed/../pam/WEB-INF/lib/velocity-tools-1.1.jar to class path. log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase). log4j:WARN Please initialize the log4j system properly. Jan 7, 2005 5:21:07 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Jan 7, 2005 5:21:07 PM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors And after that i got an other error at rss INFO: Loading portlet application from web archive C:\zsolt\JXTA_WS\Tomcat5.5\webapps\jetspeed\WEB-INF\deploy\rss.war INFO: Portlet application rss already been registered. Skipping initial deployment. ... INFO: Adding file:/C:/zsolt/JXTA_WS/Tomcat5.5/webapps/jetspeed/../rss/WEB-INF/lib/xml-apis-2.0.2.jar to class path. Jan 7, 2005 5:21:14 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from resource for InputStream Jan 7, 2005 5:21:14 PM org.apache.catalina.core.ApplicationContext log INFO: Marking servlet velocity as unavailable Jan 7, 2005 5:21:14 PM org.apache.catalina.core.ApplicationContext log SEVERE: Servlet /rss threw load() exception javax.servlet.ServletException: Error instantiating servlet class org.apache.portals.bridges.velocity.BridgesVelocityViewServlet at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1020) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:886) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3817) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4079) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:886) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:849) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1079) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2010) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Has anyone an idea about this problem? Thanks Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]