struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <hus...@apache.org>
Subject Re: SmartURLs (fork of s2: problem with codebehind plugin)
Date Mon, 10 Sep 2007 13:38:20 GMT
So, I've been having great fun with the SmartURLs plugin, and, well, I
have some notes :)

I'd be happy to open issues for each of these on the Google Code site,
but I thought it might be fun to bunch them together for the group.

 * Is SEO "Search Engine Optimization"? What makes hello-action more
compliant than HelloAction?

 * Would it be possible to support ReST-style parameters (which I
believe are also SEO-preferred), so that
"hello-world/save?message=Howdy" could be expressed
"hello-world/save/message/Howdy".
   ** Something like "hello-world/save/+/message/Howdy" might work as
well, if including a parameter-start flag would simplify the code. (It
might simplify things for the developer too!)

 * Should we look for .html after .jsp, .ftl, .vm? Is the extension
list configurable?

 * Should we also look a page named for the result type in the current
namespace and the default namespace (/foo/hello-error.jsp,
/foo/error.jsp, /error.jsp, and then fall back to /foo/hello.jsp)?
   ** A key use for "global" result-code pages might be login.
   ** A side-effect would be that a page should probably NOT be named
"success.jsp" :) But, in my experience, when it comes to result pages,
success is local and failure is global.

 * If we branch to another ${result} page, should we look for a
${result} action, and automatically chain the actions?

 * Could there be a smarturls.base.action.package that automatically
incorporated "sub" packages. Right now, it seems that we need to list
each and every package.
   ** smarturls.action.base.packages = "content"
   *** automatically includes content, content.foo, content.bar, ...

 * Using "" for a the base.result.location exposes an exception.

SEVERE: Exception starting filter struts2
java.lang.IllegalArgumentException: Unable to make a URL
    at net.java.lang.URLClassLoaderResolver.prepare(URLClassLoaderResolver.java:96)
    at net.java.lang.URLClassLoaderResolver.prepare(URLClassLoaderResolver.java:39)
    at net.java.lang.AbstractClassLoaderResolver.addIfMatching(AbstractClassLoaderResolver.java:261)
    at net.java.lang.AbstractClassLoaderResolver.loadResourcesInDirectory(AbstractClassLoaderResolver.java:199)
    at net.java.lang.AbstractClassLoaderResolver.findInDirectory(AbstractClassLoaderResolver.java:162)
    at net.java.lang.AbstractClassLoaderResolver.find(AbstractClassLoaderResolver.java:103)
    at org.texturemedia.smarturls.DefaultResultMapBuilder.createFromResources(DefaultResultMapBuilder.java:229)
    at org.texturemedia.smarturls.DefaultResultMapBuilder.build(DefaultResultMapBuilder.java:183)
    at org.texturemedia.smarturls.PackageBasedActionConfigBuilder.createActionConfig(PackageBasedActionConfigBuilder.java:307)
    at org.texturemedia.smarturls.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:203)
    at org.texturemedia.smarturls.SmartURLsConfigurationProvider.loadPackages(SmartURLsConfigurationProvider.java:92)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3634)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
    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:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.net.MalformedURLException: no protocol: /struts.xml
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at net.java.lang.URLClassLoaderResolver.prepare(URLClassLoaderResolver.java:94)
    ... 33 more

-----

-Ted.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message