Re: Dojo Plugin, serving static files from a non-root location.
Have you tried define "baseRelativePath" in ? https://struts.apache.org/docs/dojo-head.html or maybe you can try to override template, it should be possible at least with version 2.3.20. Copy [1] into "template/ajax/head.ftl" locally in your project and adjust ${base} [1] https://github.com/apache/struts/blob/support-2-3/plugins/dojo/src/main/resources/template/ajax/head.ftl https://struts.apache.org/docs/extending-themes.html https://struts.apache.org/docs/template-loading.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2016-11-30 5:18 GMT+01:00: > Hi! > > I have a Struts application set to a non-root url (i.e. url-pattern is set > to "/strutsportal/*" instead of "/*"). > > How can I make the Dojo plugin understand that the built-in resources are at > ""/strutsportal/struts/..." and not "/struts/dojo/struts_dojo.js"? > > > I was looking if there was a way to configure DefaultStaticContentLoader, > but it doesn't look like there is any relevant option in the > "struts.properties" file > > > This is using the 2.3.x branch. > I know Dojo is deprecated but I'm stuck with it for now :) > > Thank you > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Portlet Issue From Struts version 2.5 to 2.5.5?
It's related to this change https://issues.apache.org/jira/browse/WW-4686 let me think how to resolve that and feel free to register a bug linking to this issue Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2016-11-30 23:30 GMT+01:00 tkofford: > We've been trying to upgrade from struts 2.5 to struts 2.5.5, and most of our > webapps are portlets. However, with struts 2.5.5 portlets throws the > following exception: > > "java.lang.IllegalStateException: Not allowed in a portlet" > > Below is the method in the classs > org.apache.struts2.portlet.servlet.PortletServletRequest where this always > happens: > > public Cookie[] getCookies() { > if (portletRequest instanceof HttpServletRequest) { > return ((HttpServletRequest) > portletRequest).getCookies(); > } > throw new IllegalStateException("Not allowed in a portlet"); > } > > Apparently, the "portletRequest" variable is not an instance of > "HttpServletRequest". > > That class is invoked by the class > org.apache.struts2.interceptor.I18nInterceptor, which I noticed was changed > from version 2.5 which used the old xwork package version of that class. I > also noticed that cookie handling was added in version 2.5.5. > > Finally, below is a partial stack trace. Any help would be greatly > appreciated! > > Thanks in advance! > > Todd Kofford > University of Kansas - IT > tkoff...@ku.edu > > SEVERE: Servlet.service() for servlet struts2portlet threw exception > java.lang.IllegalStateException: Not allowed in a portlet > at > org.apache.struts2.portlet.servlet.PortletServletRequest.getCookies(PortletServletRequest.java:101) > at > org.apache.struts2.interceptor.I18nInterceptor.readStoredLocale(I18nInterceptor.java:215) > at > org.apache.struts2.interceptor.I18nInterceptor.storeLocale(I18nInterceptor.java:189) > at > org.apache.struts2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:144) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) > at > org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) > at > com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:195) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) > at > com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:193) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) > at > org.apache.struts2.portlet.interceptor.PortletAwareInterceptor.intercept(PortletAwareInterceptor.java:81) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) > at > org.apache.struts2.portlet.interceptor.PortletStateInterceptor.intercept(PortletStateInterceptor.java:51) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) > at > org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) > at > org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(Jsr168Dispatcher.java:481) > at > org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.render(Jsr168Dispatcher.java:341) > at > org.jasig.portal.portlet.container.FilterChainImpl.doFilter(FilterChainImpl.java:183) > at > org.jasig.portal.portlet.container.FilterChainImpl.processFilter(FilterChainImpl.java:99) > at > org.jasig.portal.portlet.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:110) > at > org.apache.pluto.container.driver.PortletServlet.dispatch(PortletServlet.java:340) > at > org.apache.pluto.container.driver.PortletServlet.doGet(PortletServlet.java:261) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) > > > > > -- > View this message in context: > http://struts.1045723.n5.nabble.com/Portlet-Issue-From-Struts-version-2-5-to-2-5-5-tp5720470.html > Sent from the Struts - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Portlet Issue From Struts version 2.5 to 2.5.5?
We've been trying to upgrade from struts 2.5 to struts 2.5.5, and most of our webapps are portlets. However, with struts 2.5.5 portlets throws the following exception: "java.lang.IllegalStateException: Not allowed in a portlet" Below is the method in the classs org.apache.struts2.portlet.servlet.PortletServletRequest where this always happens: public Cookie[] getCookies() { if (portletRequest instanceof HttpServletRequest) { return ((HttpServletRequest) portletRequest).getCookies(); } throw new IllegalStateException("Not allowed in a portlet"); } Apparently, the "portletRequest" variable is not an instance of "HttpServletRequest". That class is invoked by the class org.apache.struts2.interceptor.I18nInterceptor, which I noticed was changed from version 2.5 which used the old xwork package version of that class. I also noticed that cookie handling was added in version 2.5.5. Finally, below is a partial stack trace. Any help would be greatly appreciated! Thanks in advance! Todd Kofford University of Kansas - IT tkoff...@ku.edu SEVERE: Servlet.service() for servlet struts2portlet threw exception java.lang.IllegalStateException: Not allowed in a portlet at org.apache.struts2.portlet.servlet.PortletServletRequest.getCookies(PortletServletRequest.java:101) at org.apache.struts2.interceptor.I18nInterceptor.readStoredLocale(I18nInterceptor.java:215) at org.apache.struts2.interceptor.I18nInterceptor.storeLocale(I18nInterceptor.java:189) at org.apache.struts2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:144) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:195) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:193) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at org.apache.struts2.portlet.interceptor.PortletAwareInterceptor.intercept(PortletAwareInterceptor.java:81) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at org.apache.struts2.portlet.interceptor.PortletStateInterceptor.intercept(PortletStateInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(Jsr168Dispatcher.java:481) at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.render(Jsr168Dispatcher.java:341) at org.jasig.portal.portlet.container.FilterChainImpl.doFilter(FilterChainImpl.java:183) at org.jasig.portal.portlet.container.FilterChainImpl.processFilter(FilterChainImpl.java:99) at org.jasig.portal.portlet.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:110) at org.apache.pluto.container.driver.PortletServlet.dispatch(PortletServlet.java:340) at org.apache.pluto.container.driver.PortletServlet.doGet(PortletServlet.java:261) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) -- View this message in context: http://struts.1045723.n5.nabble.com/Portlet-Issue-From-Struts-version-2-5-to-2-5-5-tp5720470.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Save the date: ApacheCon Miami, May 15-19, 2017
Dear Apache enthusiast, ApacheCon and Apache Big Data will be held at the Intercontinental in Miami, Florida, May 16-18, 2017. Submit your talks, and register, at http://apachecon.com/ Talks aimed at the Big Data section of the event should go to http://events.linuxfoundation.org/events/apache-big-data-north-america/program/cfp while other talks should go to http://events.linuxfoundation.org/events/apachecon-north-america/program/cfp ApacheCon is the best place to meet the people that develop the software that you use and rely on. It’s also a great opportunity to deepen your involvement in the project, and perhaps make the leap to contributing. And we find that user case studies, showcasing how you use Apache projects to solve real world problems, are very popular at this event. So, do consider whether you have a use case that might make a good presentation. ApacheCon will have many different ways that you can participate: Technical Content: We’ll have three days of technical sessions covering many of the projects at the ASF. We’ll be publishing a schedule of talks on March 9th, so that you can plan what you’ll be attending BarCamp: The Apache BarCamp is a standard feature of ApacheCon - an un-conference style event, where the schedule is determined on-site by the attendees, and anything is fair game. Lightning Talks: Even if you don’t give a full-length talk, the Lightning Talks are five minute presentations on any topic related to the ASF, and can be given by any attendee. If there’s something you’re passionate about, consider giving a Lightning Talk. Sponsor: It costs money to put on a conference, and this is a great opportunity for companies involved in Apache projects, or who benefit from Apache code - your employers - to get their name and products in front of the community. Sponsors can start any any monetary level, and can sponsor everything from the conference badge lanyard, through larger items such as video recordings and evening events. For more information on sponsoring ApacheCon, see http://apachecon.com/sponsor/ So, get your tickets today at http://apachecon.com/ and submit your talks. ApacheCon Miami is going to be our best ApacheCon yet, and you, and your project, can’t afford to miss it. -- Rich Bowen - rbo...@apache.org VP, Conferences http://apachecon.com @apachecon - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Dojo Plugin, serving static files from a non-root location.
Hi! I have a Struts application set to a non-root url (i.e. url-pattern is set to "/strutsportal/*" instead of "/*"). How can I make the Dojo plugin understand that the built-in resources are at ""/strutsportal/struts/..." and not "/struts/dojo/struts_dojo.js"? I was looking if there was a way to configure DefaultStaticContentLoader, but it doesn't look like there is any relevant option in the "struts.properties" file This is using the 2.3.x branch. I know Dojo is deprecated but I'm stuck with it for now :) Thank you - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org