SV: Hello World Portlet
For Servlet 2.4/2.5 I have found (depending on container) that you need to add the dispatchers involved, like so: filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern dispatcherREQUEST/dispatcher dispatcherINCLUDE/dispatcher dispatcherFORWARD/dispatcher dispatcherERROR/dispatcher /filter-mapping - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Hello World Portlet
I am trying to understand portlets using wicket. I read on multiple resources, that wicket supports JSR 286 in a transparent way. However, I can not see any reference to a simple portlet application to adopt as the basis for my project and build on top of it. I have checked out the examples from the svn wicket-examples and ran the application with the embeded jetty. But I was not able to find the portlet application runing. After all I find the WicketExamplesMenuPortlet is a bit unclear to me . What I find unclear, is the way it functions. It extends a wicker portlet, but the application is ran from WebApplication instance that mounts EditPage, HeaderPage, and doesn't seem to have any direct link to the WicketPortlet. Any hint ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hello World Portlet
What I find unclear, is the way it functions. It extends a wicker portlet, but the application is ran from WebApplication instance that mounts EditPage, HeaderPage, and doesn't seem to have any direct link to the WicketPortlet. The link is via the filter mapping and page mounting. Case in point: 1) You use a WicketFilter in web.xml as normal, this is the one that knows of the Application. However, for the portlet case you need to add init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param to the filter definition so that it can detect the portlet API things like PortletRequest etc. 2) In portlet.xml you use WicketPortlet, but need at least two things : 2.1) To tell the portlet of the path. This would be the same path that the associated filter-mapping in web.xml: init-param namewicketFilterPath/name value/foo/value /init-param 2.2) Tell it the paths to use for the various modes, at least VIEW; These need to be bookmarkable, mounted Pages: init-param nameviewPage/name value/foo/view/value /init-param in this case the Application needs to have mountBookmarkablePage(/view, SomePage.class); Note that you normally either need one Application per portlet, or few ones with multiple Pages mounted for the various portlets. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hello World Portlet
Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet Examples/title keywordsWicket/keywords /portlet-info /portlet /portlet-app And my WebApplication class: import javax.servlet.ServletContext; import org.apache.wicket.Page; import org.apache.wicket.protocol.http.WebApplication; public class Application extends WebApplication { @Override public Class? extends Page getHomePage() { return ViewReport.class; } @Override protected void init() { mountBookmarkablePage(/view, ViewReport.class); mountBookmarkablePage(/edit, EditReport.class); servletContext = getWicketFilter().getFilterConfig() .getServletContext(); } private static ServletContext servletContext; } Now, when I deploy to Jetspeed I get this error in catalina.out, and I was not able to find any relevant exception in the logs. I will change the log level and dig further. but I don't know, if there's something wrong with the web.xml or portlet.xml ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hello World Portlet
Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet Examples/title keywordsWicket/keywords /portlet-info /portlet /portlet-app And my WebApplication class: import javax.servlet.ServletContext; import org.apache.wicket.Page; import org.apache.wicket.protocol.http.WebApplication; public class Application extends WebApplication { �...@override public Class? extends Page getHomePage() { return ViewReport.class; } �...@override protected void init() { mountBookmarkablePage(/view, ViewReport.class); mountBookmarkablePage(/edit, EditReport.class); servletContext = getWicketFilter().getFilterConfig() .getServletContext(); } private static ServletContext servletContext; } Now, when I deploy to Jetspeed I get this error in catalina.out, and I was not able to find any relevant exception in the logs. I will change the log level and dig further. but I don't know, if there's something wrong with the web.xml or portlet.xml ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hello World Portlet
Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet Examples/title keywordsWicket/keywords /portlet-info /portlet /portlet-app And my WebApplication class: import javax.servlet.ServletContext; import org.apache.wicket.Page; import org.apache.wicket.protocol.http.WebApplication; public class Application extends WebApplication { @Override public Class? extends Page getHomePage() { return ViewReport.class; } @Override protected void init() { mountBookmarkablePage(/view, ViewReport.class); mountBookmarkablePage(/edit, EditReport.class); servletContext = getWicketFilter().getFilterConfig() .getServletContext(); } private static ServletContext servletContext; } Now, when I deploy to Jetspeed I get this error in catalina.out, and I was not able to find any relevant exception in the logs. I will change the log level and dig further. but I don't know, if there's something wrong with the web.xml or portlet.xml ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:
Re: Hello World Portlet
I checked jetspeed.log it but no luck. I was going to change the log level to see what's going on. However, I decided to run my wicket pages as a web application, and found that I was missing the binding for slf4j. I added this to the pom and it worked: dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version1.5.8/version /dependency I am not sure if that's what fixed the issue, or something else when I was trying to run it as a web app. It's working anyway. Would it be a good idea to provide a maven archetype for wicket portlets ? On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet Examples/title keywordsWicket/keywords /portlet-info /portlet /portlet-app And my WebApplication class: import javax.servlet.ServletContext; import org.apache.wicket.Page; import org.apache.wicket.protocol.http.WebApplication; public class Application extends WebApplication { �...@override public Class? extends Page getHomePage() { return ViewReport.class; } �...@override protected void init() { mountBookmarkablePage(/view, ViewReport.class); mountBookmarkablePage(/edit, EditReport.class); servletContext = getWicketFilter().getFilterConfig() .getServletContext();
Re: Hello World Portlet
Absolutely that would be great. BTW I assume this is Jetspeed 2 since its JSR286? On 04/01/2010, at 4:48 PM, Mansour Al Akeel wrote: I checked jetspeed.log it but no luck. I was going to change the log level to see what's going on. However, I decided to run my wicket pages as a web application, and found that I was missing the binding for slf4j. I added this to the pom and it worked: dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version1.5.8/version /dependency I am not sure if that's what fixed the issue, or something else when I was trying to run it as a web app. It's working anyway. Would it be a good idea to provide a maven archetype for wicket portlets ? On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet Examples/title keywordsWicket/keywords /portlet-info /portlet /portlet-app And my WebApplication class: import javax.servlet.ServletContext; import org.apache.wicket.Page; import org.apache.wicket.protocol.http.WebApplication; public class Application extends WebApplication { @Override public Class? extends Page getHomePage() { return ViewReport.class; } @Override protected void init() { mountBookmarkablePage(/view,
Re: Hello World Portlet
Yes, this is JS2.2, but how where you able to tell it it's JSR286 ? In fact this was going to be my next step, to do interportlet communication. If you work with JS, I have to tell you that wicket with JS is amazingly col. You have all the pages you need where they sould be. I am still new to wicket, but enjoying it already :) On Mon Jan 04,2010 04:52 pm, Steve Swinsburg wrote: Absolutely that would be great. BTW I assume this is Jetspeed 2 since its JSR286? On 04/01/2010, at 4:48 PM, Mansour Al Akeel wrote: I checked jetspeed.log it but no luck. I was going to change the log level to see what's going on. However, I decided to run my wicket pages as a web application, and found that I was missing the binding for slf4j. I added this to the pom and it worked: dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version1.5.8/version /dependency I am not sure if that's what fixed the issue, or something else when I was trying to run it as a web app. It's working anyway. Would it be a good idea to provide a maven archetype for wicket portlets ? On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet
Re: Hello World Portlet
You said in your first post it was JSR286 and Jetspeed 2 implements that spec, whereas Jetspeed 1 is JSR-168. I am glad you have Wicket based portlets working in a JSR-286 container, shame the same can't be said for a JSR-168 container, ie Pluto :( cheers, Steve On 04/01/2010, at 5:17 PM, Mansour Al Akeel wrote: Yes, this is JS2.2, but how where you able to tell it it's JSR286 ? In fact this was going to be my next step, to do interportlet communication. If you work with JS, I have to tell you that wicket with JS is amazingly col. You have all the pages you need where they sould be. I am still new to wicket, but enjoying it already :) On Mon Jan 04,2010 04:52 pm, Steve Swinsburg wrote: Absolutely that would be great. BTW I assume this is Jetspeed 2 since its JSR286? On 04/01/2010, at 4:48 PM, Mansour Al Akeel wrote: I checked jetspeed.log it but no luck. I was going to change the log level to see what's going on. However, I decided to run my wicket pages as a web application, and found that I was missing the binding for slf4j. I added this to the pom and it worked: dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version1.5.8/version /dependency I am not sure if that's what fixed the issue, or something else when I was trying to run it as a web app. It's working anyway. Would it be a good idea to provide a maven archetype for wicket portlets ? On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode
Re: Hello World Portlet
I totally forgot I mentioned JSR 286. Thank you. On Mon Jan 04,2010 05:47 pm, Steve Swinsburg wrote: You said in your first post it was JSR286 and Jetspeed 2 implements that spec, whereas Jetspeed 1 is JSR-168. I am glad you have Wicket based portlets working in a JSR-286 container, shame the same can't be said for a JSR-168 container, ie Pluto :( cheers, Steve On 04/01/2010, at 5:17 PM, Mansour Al Akeel wrote: Yes, this is JS2.2, but how where you able to tell it it's JSR286 ? In fact this was going to be my next step, to do interportlet communication. If you work with JS, I have to tell you that wicket with JS is amazingly col. You have all the pages you need where they sould be. I am still new to wicket, but enjoying it already :) On Mon Jan 04,2010 04:52 pm, Steve Swinsburg wrote: Absolutely that would be great. BTW I assume this is Jetspeed 2 since its JSR286? On 04/01/2010, at 4:48 PM, Mansour Al Akeel wrote: I checked jetspeed.log it but no luck. I was going to change the log level to see what's going on. However, I decided to run my wicket pages as a web application, and found that I was missing the binding for slf4j. I added this to the pom and it worked: dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version1.5.8/version /dependency I am not sure if that's what fixed the issue, or something else when I was trying to run it as a web app. It's working anyway. Would it be a good idea to provide a maven archetype for wicket portlets ? On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param