Struts 2 + SmartURLs Plugin- Root Redirect no Longer Working
Hi there, I've recently started using the SmartURLs plugin with Struts 2, particularly for the extensionless URLs feature, which I've enabled by setting the struts2 filter to be "org.texturemedia.smarturls.SmartURLsFilter" in my "web.xml" and setting "struts.action.extension=" in my "struts.properties". This appears to be working, however it's left me with one undesired side affect. I used to have an "index.jsp" in the root of my web app that would redirect to the web app's home page via a "Home.action". "index.jsp" is of course in my welcome files list in my "web.xml". Without the SmartURLs plugin, "http://localhost"; would redirect to "http://localhost/Home.action"; . This is the behaviour I want. With the SmartURLS plugin, this no longer works. Instead I get an error and SmartURLs has tried to redirect me "http://localhost//index.jsp"; (note double slash before index.jsp) I've got a rather crude way of working around this. Basically I just created an empty "Home" file in the web app root and then added "Home" to my welcome files list. This works and I am correctly redirected from "http://localhost"; to "http://localhost/Home"; , however it seems like a bit of a hack job. Is there a better way to do this? -- View this message in context: http://www.nabble.com/Struts-2-%2B-SmartURLs-Plugin--Root-Redirect-no-Longer-Working-tp17422264p17422264.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
After Visiting URL with Queyr String, Query String Appears on Every Link
Hi everyone, I'm using Struts 2.0.11.1 with FreeMarker 2.3.8. I've created a hyperlink in a .FTL as follows: <@s.url id="todayDashboardUrl" action="encounters"> <@s.param name="minDaysAway" value="0"/> <@s.param name="maxDaysAway" value="1"/> <@s.a href="%{todayDashboardUrl}">Today The link is rendered without a problem. I can click it and arrive at the correct page. After clicking through this link, however, Struts 2 appears to append the query string (i.e. "?minDaysAway=0&maxDaysAway=7") to every other URL in my site! Including URLs that are not supposed to have it. Why is this? How do I avoid this scenario? Thanks for any help. -- View this message in context: http://www.nabble.com/After-Visiting-URL-with-Queyr-String%2C-Query-String-Appears-on-Every-Link-tp17706571p17706571.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: After Visiting URL with Query String, Query String Appears on Every Link
Thanks Lukasz, all sorted now. Cheers. Lukasz Lenart wrote: > > Hi > > 2008/6/7 Pandolf <[EMAIL PROTECTED]>: > >><@s.url id="todayDashboardUrl" action="encounters"> >> > > > Add includeParams="none" to this tag or globally set > struts.url.includeParams=none in struts.xml or struts.properties > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > -- View this message in context: http://www.nabble.com/After-Visiting-URL-with-Query-String%2C-Query-String-Appears-on-Every-Link-tp17706571p17708529.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Changing the way Context Root and Namespaces are rendered in URLS.
Hi everyone, I'm using Struts 2 to author Facebook applications and I have a bit of a problem. When using the struts "form" or "URL" tags, struts 2 of course wants to render URLs as follows: /// Because I'm running applications through Facebook, the urls must be in the following format: // Is there any way, perhaps in struts.xml, to change the way URLs are rendered by struts? Really what I need is to drop the context root and include my facebook app name. The only solution I've come up with is to set the context root of my web app to be "/" and then put all actions for my facebook app in a namespace called "". Unfortunately this clutters my namespace hierarchy and so I'm hoping there may be a better solution? Any thoughts? -- View this message in context: http://www.nabble.com/Changing-the-way-Context-Root-and-Namespaces-are-rendered-in-URLS.-tp18948987p18948987.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]