Hi,
I've spent a few hours reading the documentation and playing with a
sample app.
I have some questions and remarks :
1. I've found that Induction is not compatible with GAE.
At application startup, it raises the following exception :
Caused by: java.lang.SecurityException: Google Apphosting only
supports custom ClassLoaders that derive from ClassLoader or
URLClassLoader, not SecureClassLoader.
at com.google.appengine.runtime.Request.process-8c1ecd7c458b31b7
(Request.java)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at com.acciente.induction.dispatcher.HttpDispatcher.init
(HttpDispatcher.java:124)
at org.mortbay.jetty.servlet.ServletHolder.initServlet
(ServletHolder.java:433)
Is the classloader configurable ?
2. I've wrote the following interceptor :
public class AuthentInterceptor implements RequestInterceptor {
public Redirect postResolution(ControllerResolver.Resolution
resolution) {
System.out.println("AuthentInterceptor.postResolution()");
System.out.println("ClassName = " + resolution.getClassName());
System.out.println("MethodName = " + resolution.getMethodName());
return null;
}
}
When I call an URL that is matched by a Controller, it runs ok.
But I call an URL (or redirect to) an URL that is matched by a View, I
get the following error :
22 nov. 2009 21:45:36 com.acciente.induction.dispatcher.HttpDispatcher
logAndRespond
GRAVE: dispatch-error: interceptor-exec-request-interceptor-parameter-
provider: error resolving value for type: class
com.acciente.induction.resolver.ControllerResolver$Resolution
com.acciente.commons.reflect.ParameterProviderException: request-
interceptor-parameter-provider: error resolving value for type: class
com.acciente.induction.resolver.ControllerResolver$Resolution
at
com.acciente.induction.dispatcher.interceptor.RequestInterceptorParameterProviderFactory
$RequestInterceptorParameterProvider.getParameter
(RequestInterceptorParameterProviderFactory.java:147)
Did I make something wrong ?
Is there a way to make an interceptor match a URL pattern ?
3. To make the demoapp sample to work, I had to modify the induction-
demoapp.xml file and add "/demoapp" in the url-format patterns of the
redirect mapping :
<redirect-mapping>
<class-to-url-map>
<class-packages>demoapp</class-packages>
<class-pattern>(?:.*\.)?(\w+)Controller</class-pattern>
<url-format>/demoapp/$Name.action</url-format>
<url-format-alt>/demoapp/$Name.$Method.action</url-format-
alt>
</class-to-url-map>
<class-to-url-map>
<class-packages>demoapp</class-packages>
<class-pattern>(?:.*\.)?(\w+)View</class-pattern>
<url-format>/demoapp/$Name</url-format>
</class-to-url-map>
</redirect-mapping>
Without that, redirect where not hitting the app.
Why this behaviour ?
If I want to change my web app context, I'll have
to update the conf (ok, that's only 2 lines).
4. Why no writing a XSD for the induction-xxx.xml file and get IDE
auto-completion ?
Thank you for the job done!
--
You received this message because you are subscribed to the Google Groups "Induction Framework" group.
To post to this group, send email to induction...@googlegroups.com.
To unsubscribe from this group, send email to induction-frame...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/induction-framework?hl=.
Thank you for the update, I'll give it a try.
About the redirect mapping, I've found that I just had the remove the "/" :<url-format>$Name.action</url-format>
<redirect-mapping>
<class-to-url-map>
<class-packages>demoapp</class-packages>
<class-pattern>(?:.*\.)?(\w+)Controller</class-pattern>
<url-format-alt>$Name.$Method.action</url-format-alt>...
--
The 1.3.1 version fixed the Interceptor issue, thank you.
Another (last ?) question :
Say a view have to display a list of :
<A href="myView?id=X>link X</A>
How do I generate the URL that points to the class MyView in Java ?
--
You received this message because you are subscribed to the Google Groups "Induction Framework" group.
To post to this group, send email to induction...@googlegroups.com.
To unsubscribe from this group, send email to induction-frame...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/induction-framework?hl=en.
Adi,
Sure it's really missing since your framework tends to avoid the use of strings.
Maybe a URL Resoler could be included in the params available from a View, Controller or Interceptor ?