2.0m4 - Variant.equals and ClassCastException
In 2.0m4 on line 329 of Variant.java there is a ClassCastException if other is not an instanceof Variant. That line should only be executed if the variable result of the previous line is true. If false then equals should just return false. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398684
problem with Variant.equals in 2.0m4
The implementation of equals in Variant.java of 2.0m4 seems to incorrectly cast the other object as a Variant... The problem is on line 329 where it defines otherVariant. In the case where result is false, the equals method should just return false... @Override public boolean equals(Object other) { boolean result = (other instanceof Variant); Variant otherVariant = (Variant) other; // Compare the character set if (result) { -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398682
RE: Re: how to Router.attach() a resource object
ah, thank you very much. indeed, template names are directly inferred from the request path. So, I just modified DirectToTemplateResource. Thank you again for prompt response. It could have taken me a long time. Thanks. sam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398639
2.0m4/snap GWT cannot be used at all
Hi, several posts have raised the issue that the current GWT edition cannot be used anymore. Calling a Client.get works only in hosted but not in compiled mode. Using Reference.getTargetRef fails in hosted mode with a IllegalAccessError exception due to a call to StringBuilder.append(StringBuilder) in Reference.normalize. This method is not implemented in the GWT enum class. Maybe the GWT compilation process silently removes code that cannot be emulated correctly - I don't know. Has anybody succeeded in using the current GWT edition and saw the Uniform callback being actually called in a non-local/non-hosted environment? As the previous posts are quite old and idle I wonder if this can be fixed or if it is recommended to create own wrapper classes using GWT.RequestBuilder to at least get the data from the RESTlet server resources. This would be a pity regarding the power and elegance of the RESTlet framework. Thanks, Guido. -- View this message in context: http://n2.nabble.com/2-0m4-snap-GWT-cannot-be-used-at-all-tp3698316p3698316.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398768
RE: Re: Integrating Apache and Restlet server like Apache and Tomcat
Bruno, Can you post a simple code sample for reference. As I am a newbie. Thanks in advance!! Ashish -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398769
Re: Integrating Apache and Restlet server like Apache and Tomcat
Hi Ashish, As Rémi said, mod_proxy might be better for what you need. In addition, mod_jk seems to have been deprecated in favour of mod_proxy_ajp (both use AJP). There is more about this on the Jetty wiki: http://docs.codehaus.org/display/JETTY/Configuring+AJP13+Using+mod_jk The only case where I've needed mod_jk (rather than mod_proxy/mod_proxy_ajp) was because it's the only one that can relay the full chain of client certificates (for SSL/TLS client authentication) obtained by Apache Httpd. If you really want to use AJP, you have to use something like this (based on http://www.restlet.org/documentation/1.1/firstSteps): public static void main(String[] args) { try { // Create a new Component. Component component = new Component(); // Add a new AJP server listening on port 8182. component.getServers().add(Protocol.AJP, 8182); // Attach the sample application. component.getDefaultHost().attach(new FirstStepsApplication()); // Start the component. component.start(); } catch (Exception e) { // Something is wrong. e.printStackTrace(); } } Best wishes, Bruno. Ashish Sharma wrote: Bruno, Can you post a simple code sample for reference. As I am a newbie. Thanks in advance!! Ashish -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398769 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398809
Re: Re: Netty extension
This looks really exciting, Gabriel! I haven't had a chance to try it yet ... just got back from a long and busy trip and am trying to clear my desk. Quick question -- does the Netty connector only handle HTTP or does it also handle HTTPS? On Wed, Sep 23, 2009 at 2:48 AM, Gabriel Ciuloaica gciuloa...@gmail.comwrote: Hi John, I have used Apache MINA in one of the project that I'm working for about 5 months. I'm talking here about a file server. The server is providing a REST API for other services to use for storing/retrieving files. Moved the implementation in first phase to Netty, give us performance improvements. Adding Restlet on top of Netty give us a simple way to provide same REST API with plugable authentication. We are in a alpha phase with new implementation but till now we did not encounter issues with Netty. There are some numbers regarding performance on Netty site: http://jboss.org/netty/performance.html Br, Gabi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398738 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398837
RE: Re: Integrating Apache and Restlet server like Apache and Tomcat
Bruno, I am able to run restlet over jetty as advised by you, but I am not clear how can it fulfill my original requirement. Please explain!!! thanks in advance Ashish Hi Ashish, Ashish Sharma wrote: Hello, I have my Apache http server running on localhost:80 and restlet server on localhost:8182, but I want to configure above combination just like Apache http server and Apache tomcat servlet container can be configured with mod_jk library. Is it possible? Yes, it's possible. You need to use the AJP protocol (Protocol.AJP instead of Protocol.HTTP in your server configuration). This is supported by the Jetty connectors (so you'd need the corresponding jars on the classpath too). Best wishes, Bruno. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398801
RE: Re: Re: Netty extension
Hi Rob, It handle both HTTP and HTTPS. In case of HTTPS, there are some configs that need to be done that are, same as for Restlet. Br, Gabi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398842
getText() still returns null with Tomcat
Hi, We are using Restlet 2.0-SNAPSHOT from the Maven repo (which doesn't seem to have been updated since June btw) along with Tomcat, and we seem to be running into the getText() returns null bug alot. I read the bug threads on Restlet (id: 843) and Tomcat (id: 42996) issue trackers, and from what I could understand the last conclusion was that it was a Restlet problem, and that it was fixed. But, we are still seeing it. In our case we are not using annotations at all (which was indicated as a culprit), just a plain ServerResource that does getEntityAsText(), which returns null every now and then, and especially when there are many users (10) using the server (which still is VERY low load comparatively speaking). Is there another bug involved, and which has to do with Tomcat? Or, is the 2.0-SNAPSHOT not updated with the fixes? Any ideas? /Rickard -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2399121