Re: Scripted Restlet - Demo Distribution

2009-04-14 Thread Tal Liron
Thanks for the intro, Jerome.


I just want to comment that Scripturian svn now has support for 
Velocity, so it's trivial to embed Velocity templates, and even to mix 
them with other scripting languages (especially because of the nice 
"in-flow" tag). I've also added support for JUEL, which is a more 
minimal expression language, the same used in JSP/JSF. I will do more 
testing and update the demo with examples on how to use Velocity 
in-flow. It's very powerful stuff!


My opinion is that Jerome's ambitions for a single scripting extension 
might be impossible to achieve, and perhaps there is a place for 
separating this work into different extensions. Different scripting 
languages are simply too different from each other. For example, I think 
it would be hard or even impossible to implement a nice DSL for Restlet 
in anything other than Groovy. It thus might make sense to have DSL 
support in a special Groovy extension. Another idea is that because 
Scripturian specifically offers "scriptlet" support, the current script 
extension could be renamed to org.restlet.ext.scriptlet, with other 
scripting issues being solved with other extensions. In conclusion -- 
I'm worried about our ability to integrate all past and future work 
involving scripting into one generic extension. I say this from a lot of 
experience working with JSR-223 and its languages, and doing some crazy 
things with some of them!

My opinion is that Scripturian (a tiny library that offers very little 
overhead) is the most generic solution to many scripting problems, and 
might be the good candidate for integrating any scripting issues, though 
definitely not all of them. Eagerly waiting comments! I'm especially 
eager to hear from all the people you mentioned.

-Tal


Jerome Louvel wrote:

> Hi all,
>  
> Thanks Tal for preparing this demo distribution of the 
> "org.restlet.ext.script" extension. You have put a huge amount of work 
> and energy in this effort, so we need to give you proper feed-back and 
> make sure that this effort is both well understood by the Restlet 
> community and goes in the right direction, with the right timing, not 
> leaving any important idea/effort/alternative on the side without 
> proper consideration.
>  
> I'd like to give a bit of background before: when Tal offered me to 
> contribute his work on scripted Restlet, I thought it would be a 
> perfect opportunity to develop a generic extension that be based on 
> "javax.script" (JSR-223) and help us to leverage scripts for Restlet 
> in various ways. Tal wanted a "Scripturian extension" but I proposed a 
> more ambitious "Script extension". There have been several significant 
> experiences in the past and I thought we should try to build on those 
> experiences, make the synthesis of all requirements in order to 
> refactor Tal's initial effort and build the best solution for all of us:
>
> * Qi Keke's work on a Groovy-based Restlet DSL [1]
>*
>   Avi Flax's work on Groovy and Restlet [2]
>*
>   Davide Angelocola's shell extension [3]
>*
>   Solertium's work on GoGoEgo providing server-side scripting
>   support based on JSR-223 [4]
>*
>   Kauri project and templating features based on EL and Groovy [5]
>*
>   Probably other experimentations I forgot or aren't aware of
>
> Tal's initial contribution is now looking ready for testing, is 
> documented and inline with Restlet code style. However, we are still 
> far from my initial goal/dream of a generic Script extension based on 
> JSR-233 that would address generic requirements and would try to 
> generalize our existing experience with Velocity and FreeMarker.
>  
> It seems that what we have is more of a "Scripturian extension" that 
> provides a great set of features based on Tal's initial requirements 
> and design. BTW, I would like to warmly thank Tal for carefully 
> listening to my initial feed-back and making many adjustments to the 
> initial work, for example adding a ScriptedTextFilter and a 
> ScriptedTextRepresentation similar to what we have for FreeMarker and 
> Velocity.
>  
> Still, there remains a question of whether we can really build a truly 
> generic "Script extension" out of this initial effort or whether we 
> should re-target it as a "Scripturian extension". My feeling is that 
> this has gone so far in term of detailed design, implementation, 
> optimizations, documentation that this would be difficult for Tal to 
> deeply refactor the design as required. For example, even though we 
> could leverage a library such as Scripturian for the internal 
> implementation of a generic "Script extension", I don't think that 
> it should be directly part of the public extension API as it is right now.
>  
> Now, I would be happy if you guys could give us your feed-back on this 
> effort and your general thoughts about Restlet + Scripts/Dynamic 
> Languages.
>  
> What are you expecting from Restlet on this front?
>  
> Best regards,

RE: Scripted Restlet - Demo Distribution

2009-04-14 Thread Jerome Louvel
Hi all,
 
Thanks Tal for preparing this demo distribution of the
"org.restlet.ext.script" extension. You have put a huge amount of work and
energy in this effort, so we need to give you proper feed-back and make sure
that this effort is both well understood by the Restlet community and goes
in the right direction, with the right timing, not leaving any important
idea/effort/alternative on the side without proper consideration.
 
I'd like to give a bit of background before: when Tal offered me to
contribute his work on scripted Restlet, I thought it would be a perfect
opportunity to develop a generic extension that be based on "javax.script"
(JSR-223) and help us to leverage scripts for Restlet in various ways. Tal
wanted a "Scripturian extension" but I proposed a more ambitious "Script
extension". There have been several significant experiences in the past and
I thought we should try to build on those experiences, make the synthesis of
all requirements in order to refactor Tal's initial effort and build the
best solution for all of us:

*   Qi Keke's work on a Groovy-based Restlet DSL [1]
*   


Avi Flax's work on Groovy and Restlet [2]
*   


Davide Angelocola's shell extension [3]
*   

Solertium's work on GoGoEgo providing server-side scripting support
based on JSR-223 [4]
*   

Kauri project and templating features based on EL and Groovy [5]
*   

Probably other experimentations I forgot or aren't aware of

Tal's initial contribution is now looking ready for testing, is documented
and inline with Restlet code style. However, we are still far from my
initial goal/dream of a generic Script extension based on JSR-233 that would
address generic requirements and would try to generalize our existing
experience with Velocity and FreeMarker.
 
It seems that what we have is more of a "Scripturian extension" that
provides a great set of features based on Tal's initial requirements and
design. BTW, I would like to warmly thank Tal for carefully listening to my
initial feed-back and making many adjustments to the initial work, for
example adding a ScriptedTextFilter and a ScriptedTextRepresentation similar
to what we have for FreeMarker and Velocity. 
 
Still, there remains a question of whether we can really build a truly
generic "Script extension" out of this initial effort or whether we should
re-target it as a "Scripturian extension". My feeling is that this has gone
so far in term of detailed design, implementation, optimizations,
documentation that this would be difficult for Tal to deeply refactor the
design as required. For example, even though we could leverage a library
such as Scripturian for the internal implementation of a generic "Script
extension", I don't think that it should be directly part of the public
extension API as it is right now.
 
Now, I would be happy if you guys could give us your feed-back on this
effort and your general thoughts about Restlet + Scripts/Dynamic Languages. 
 
What are you expecting from Restlet on this front?
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  
http://www.noelios.com
 
 
[1] http://docs.codehaus.org/display/GROOVY/GroovyRestlet
[2]
http://blog.arc90.com/2008/06/building_restful_web_apps_groovy_restlet_part_
2.php
[3] http://restlet.tigris.org/issues/show_bug.cgi?id=410
[4] http://code.google.com/p/gogoego/
[5] http://www.kauriproject.org/docs/195-kauri.html
[6] http://scripturian.tigris.org/
 


  _  

De : Tal Liron [mailto:tal.li...@threecrickets.com] 
Envoyé : lundi 13 avril 2009 20:56
À : discuss@restlet.tigris.org
Objet : Scripted Restlet - Demo Distribution



Hello Restleteers,




The scripted edition of Restlet is ready for demoing and testing. I'm
including a link to download a distribution that should run immediately on
any Java 5 compatible machine. I hope you'd give it a spin!




Scripted Restlet is development platform that lets you use JavaScript, PHP,
Python, Ruby and/or Groovy to write REST resources and serve textual
representations (HTML, XML, etc.) without writing a single line of Java
code. Behind the scenes, you get the advantages of Restlet, the Java
platform, and scalable network servers (Jetty, Grizzly), while still staying
in the dynamic language you are invested in, including the wealth of 3rd
party libraries for that language. Compilation (for scripting languages that
support it) happens on the fly (within controllable limits), allowing for a
rapid development/testing cycle.




The textual environment is designed to be very familiar to people who have
used PHP, JSP or ASP, by letting you embed "scriptlets" of code into your
HTML or other text. It includes powerful facilities beyond what you'd find
in those environments, leveraging features of Restlet and Scripturian:
script-controlled caching and streaming, cont

Re: SpringBeanRouter

2009-04-14 Thread Dustin N. Jenkins
Further to this, I have a couple of resources that are mapped to a 
Guard, or another Router.

router.attach("/webappcontext/auth", new Guard(getContext(), nextRestlet));

I'm having trouble mapping that too.  Is the rule of thumb usually to 
override something that is not quite working yet, like the default Route?

Thanks,
Dustin


Rhett Sutphin wrote:
> Hi Jim,
>
> On Apr 14, 2009, at 1:57 AM, Jim Alateras wrote:
>
>   
>> Rhett,
>>
>> Thanks for the quick turnaround and suggestions
>>
>>
>> On 14/04/2009, at 2:19 PM, Rhett Sutphin wrote:
>>
>> 
>>> Hi Jim,
>>>
>>> On Apr 13, 2009, at 7:56 PM, Jim Alateras wrote:
>>>
>>>   
 I am currently using s custom class to attach routes to  a router  
 but
 am now looking at using the SpringBeanRouter but have a couple of
 questions.

 1.  In the example below if i also want to support the a query  
 string
 would i change the bean name to  "/studies?{query}"
 
>>> You should set the bean name to whatever you were formerly passing to
>>> Router#attach.
>>>   
>> At the moment my custom class does something like this
>>
>> router.attach("/resource?{query}", this.resourceMap.get(uri))
>>  
>> .getTemplate().getVariables().put("query", new Variable(
>>  
>> Variable.TYPE_URI_QUERY, "", false, false));
>>
>> will this still work?
>> 
>
> Ah, I'm not familiar with that sort of construction.  I'm not sure if  
> it would work, though my guess is "no."  Can you try it and see?  If  
> it doesn't work, could you open an issue?
>
> Thanks,
> Rhett
>
>   
>>>   
 2. How do i specify a default route for the router.
 
>>> This isn't directly supported at the moment.  The easiest thing to do
>>> right now is to subclass SpringBeanRouter and override
>>> postProcessBeanFactory something like this:
>>>
>>> @Override
>>> public void postProcessBeanFactory(ConfigurableListableBeanFactory
>>> factory) {
>>>  super.postProcessBeanFactory(factory);
>>>  this.attachDefault(createFinder("theDefaultResourceBeanName"))
>>> }
>>>
>>>   
>> excellent
>> 
>>> Rhett
>>>
>>>   
 
 
 >>> scope="prototype" class="edu.northwestern.myapp.StudiesResource" >
 

 cheers
 

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1699583
 
>>> --
>>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1702638
>>>   
>> cheers
>> 
>>
>> --
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1704873
>> 
>
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1710897
>   

-- 


Dustin N. Jenkins | Tel/Tél: 250.363.3101 | dustin.jenk...@nrc-cnrc.gc.ca

facsimile/télécopieur: (250) 363-0045

National Research Council Canada | 5071 West Saanich Rd, Victoria BC. 
V9E 2E7

Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria 
(C.-B) V9E 2E7

Government of Canada | Gouvernement du Canada

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1712807


Re: SpringBeanRouter

2009-04-14 Thread Rhett Sutphin
Hi Jim,

On Apr 14, 2009, at 1:57 AM, Jim Alateras wrote:

> Rhett,
>
> Thanks for the quick turnaround and suggestions
>
>
> On 14/04/2009, at 2:19 PM, Rhett Sutphin wrote:
>
>> Hi Jim,
>>
>> On Apr 13, 2009, at 7:56 PM, Jim Alateras wrote:
>>
>>> I am currently using s custom class to attach routes to  a router  
>>> but
>>> am now looking at using the SpringBeanRouter but have a couple of
>>> questions.
>>>
>>> 1.  In the example below if i also want to support the a query  
>>> string
>>> would i change the bean name to  "/studies?{query}"
>>
>> You should set the bean name to whatever you were formerly passing to
>> Router#attach.
> At the moment my custom class does something like this
>
> router.attach("/resource?{query}", this.resourceMap.get(uri))
>   
> .getTemplate().getVariables().put("query", new Variable(
>   
> Variable.TYPE_URI_QUERY, "", false, false));
>
> will this still work?

Ah, I'm not familiar with that sort of construction.  I'm not sure if  
it would work, though my guess is "no."  Can you try it and see?  If  
it doesn't work, could you open an issue?

Thanks,
Rhett

>
>>
>>
>>> 2. How do i specify a default route for the router.
>>
>> This isn't directly supported at the moment.  The easiest thing to do
>> right now is to subclass SpringBeanRouter and override
>> postProcessBeanFactory something like this:
>>
>> @Override
>> public void postProcessBeanFactory(ConfigurableListableBeanFactory
>> factory) {
>>  super.postProcessBeanFactory(factory);
>>  this.attachDefault(createFinder("theDefaultResourceBeanName"))
>> }
>>
> excellent
>> Rhett
>>
>>> 
>>> 
>>> >> scope="prototype" class="edu.northwestern.myapp.StudiesResource" >
>>> 
>>>
>>> cheers
>>> 
>>>
>>> --
>>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1699583
>>
>> --
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1702638
>
>
> cheers
> 
>
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1704873

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1710897


Re: Spring restlet configuration

2009-04-14 Thread Rhett Sutphin
Hi,

On Apr 13, 2009, at 5:06 PM, webp...@tigris.org wrote:

> Forgot to attach the app log, the line "INFO: Routes: /sample/ 
> locations" it's added by me and actually checks that the router used  
> by the application contains a route for "/sample/locations", the  
> request is for "/sample/locaions" but still getting a 404
>
>
> [INFO] Started Jetty Server
> 13-abr-2009 23:52:41  
> com.yoolab.geolocalization.restlet.GeolocalizationApplication
> createRoot
> INFO: Routes: 2
> 13-abr-2009 23:52:41  
> com.yoolab.geolocalization.restlet.GeolocalizationApplication
> createRoot
> INFO: Routes: /sample/locations
> 2009-04-13 23:52:41.957:/sample:INFO:  SpringServerServlet: [Noelios
> Restlet Engine] - Attaching application:  
> com.yoolab.geolocalization.restlet.Geoloca
> lizationapplicat...@17f5b38e to URI: /sample
> 13-abr-2009 23:52:41 com.noelios.restlet.LogFilter afterHandle
> INFO: 2009-04-1323:52:41127.0.0.1   -
> 127.0.0.1   8080
> GET /sample/locations   -   404 330 -   0
> http://localhost:8080   Mozilla/5.0 (Windows; U; Windows NT 6.0; es- 
> ES; rv:1.9.0.8) G
> ecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)  -

A guess: from the log it appears that your Application is mounted at / 
sample.  If you have a route within that application that is attached  
to /sample/location, I think that the effective URI for that resource  
would be /sample/sample/location.

Rhett

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1710877


RE: Try to get Redirector working in GAE

2009-04-14 Thread Jerome Louvel
Hi Ken,

Sorry, this is a regression due to packages refactoring, I've uploaded a new
JAR on the wiki page:
http://wiki.restlet.org/docs_1.2/13-restlet/252-restlet.html
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com
 

-Message d'origine-
De : Ken Huang [mailto:ken_...@hotmail.com] 
Envoyé : mardi 14 avril 2009 06:06
À : discuss@restlet.tigris.org
Objet : Try to get Redirector working in GAE

I try to redirect my request from my GAE application to another server, I
found it might work with Redirector.MODE_DISPACTHER, Here is the example
code I used:

GWT client code:
final Client client = new Client(Protocol.HTTP);
Form form = new Form();
form.add("name", "test");
form.add("description", "test");
Representation rep = form.getWebRepresentation();
Reference itemsUri = new Reference(
GWT.getHostPageBaseURL()+"rest/items");

Server restlet:
String realServerUrl = "http://example.com/rest/items";;
Redirector newRedirector = new Redirector(getContext(),
realServerUrl,
Redirector.MODE_DISPATCHER);
Route newRoute = router.attach("/rest/items", newRedirector);

web.xml:

http://java.sun.com/dtd/web-app_2_3.dtd";>



org.restlet.application

com.example.FirstResourceApplication



RestletServlet

org.restlet.util.ServerServlet

org.restlet.clients
http
   



RestletServlet
/*



I use the latest org.restlet.gae.jarI and I got ClassNotFoundException from
the server :
java.lang.ClassNotFoundException:
org.restlet.gae.engine.http.HttpServerConverter
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(Isol
atedAppClassLoader.java:142)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.restlet.engine.Engine.loadClass(Engine.java:225)
at
org.restlet.engine.http.HttpServerHelper.getConverter(HttpServerHelper.java:
107)

Can anyone tell me, Is possible redirect my HTTP request to another server
using restlet running on GAE? Am I miss something?

--
View this message in context:
http://n2.nabble.com/Try-to-get-Redirector-working-in-GAE-tp2631103p2631103.
html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=17024
13

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1710139


RE: Spring restlet configuration

2009-04-14 Thread webpost
Forgot to attach the app log, the line "INFO: Routes: /sample/locations" it's 
added by me and actually checks that the router used by the application 
contains a route for "/sample/locations", the request is for "/sample/locaions" 
but still getting a 404


[INFO] Started Jetty Server
13-abr-2009 23:52:41 
com.yoolab.geolocalization.restlet.GeolocalizationApplication
createRoot
INFO: Routes: 2
13-abr-2009 23:52:41 
com.yoolab.geolocalization.restlet.GeolocalizationApplication
createRoot
INFO: Routes: /sample/locations
2009-04-13 23:52:41.957:/sample:INFO:  SpringServerServlet: [Noelios
Restlet Engine] - Attaching application: 
com.yoolab.geolocalization.restlet.Geoloca
lizationapplicat...@17f5b38e to URI: /sample
13-abr-2009 23:52:41 com.noelios.restlet.LogFilter afterHandle
INFO: 2009-04-1323:52:41127.0.0.1   -   127.0.0.1   
8080
GET /sample/locations   -   404 330 -   0
http://localhost:8080   Mozilla/5.0 (Windows; U; Windows NT 6.0; es-ES; 
rv:1.9.0.8) G
ecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)  -

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1696971


Try to get Redirector working in GAE

2009-04-14 Thread Ken Huang
I try to redirect my request from my GAE application to another server, I found 
it might work with Redirector.MODE_DISPACTHER, Here is the example code I used:

GWT client code:
final Client client = new Client(Protocol.HTTP);
Form form = new Form();
form.add("name", "test");
form.add("description", "test");
Representation rep = form.getWebRepresentation();
Reference itemsUri = new Reference(
GWT.getHostPageBaseURL()+"rest/items");

Server restlet:
String realServerUrl = "http://example.com/rest/items";;
Redirector newRedirector = new Redirector(getContext(), realServerUrl,
Redirector.MODE_DISPATCHER);
Route newRoute = router.attach("/rest/items", newRedirector);

web.xml:

http://java.sun.com/dtd/web-app_2_3.dtd";>



org.restlet.application
com.example.FirstResourceApplication



RestletServlet
org.restlet.util.ServerServlet

org.restlet.clients
http
   



RestletServlet
/*



I use the latest org.restlet.gae.jarI and I got ClassNotFoundException from the 
server :
java.lang.ClassNotFoundException: 
org.restlet.gae.engine.http.HttpServerConverter
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at 
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:142)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.restlet.engine.Engine.loadClass(Engine.java:225)
at 
org.restlet.engine.http.HttpServerHelper.getConverter(HttpServerHelper.java:107)

Can anyone tell me, Is possible redirect my HTTP request to another server 
using restlet running on GAE? Am I miss something?

-- 
View this message in context: 
http://n2.nabble.com/Try-to-get-Redirector-working-in-GAE-tp2631103p2631103.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1702413


RE: Redirector: HTTP request to HTTPS request

2009-04-14 Thread webpost
Hi Jerome

Yes, I was able to solve this. It was entirely my fault :( I forgot to add 
libraries for the HTTPS client. RESTlet even printed an error message which my 
eyes refused to see ;)

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1709514


Try get Redirector working in GAE

2009-04-14 Thread Ken Huang
I try to redirect my request from my GAE application to another server, I found 
it might work with Redirector.MODE_DISPACTHER, Here is the example code I used: 

GWT client code: 
final Client client = new Client(Protocol.HTTP); 
Form form = new Form(); 
form.add("name", "test"); 
form.add("description", "test"); 
Representation rep = form.getWebRepresentation(); 
Reference itemsUri = new Reference( 
GWT.getHostPageBaseURL()+"rest/items"); 

Server restlet: 
String realServerUrl = "http://example.com/rest/items";; 
Redirector newRedirector = new Redirector(getContext(), realServerUrl, 
Redirector.MODE_DISPATCHER); 
Route newRoute = router.attach("/rest/items", newRedirector); 

web.xml: 
 
http://java.sun.com/dtd/web-app_2_3.dtd";> 
 
 
 
org.restlet.application 
com.example.FirstResourceApplication 
 
 
 
RestletServlet 
org.restlet.util.ServerServlet 
 
org.restlet.clients 
http 
   
 
 
 
RestletServlet 
/* 
 
 

I use the latest org.restlet.gae.jarI and I got ClassNotFoundException from the 
server : 
java.lang.ClassNotFoundException: 
org.restlet.gae.engine.http.HttpServerConverter 
at java.net.URLClassLoader$1.run(URLClassLoader.java:200) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.net.URLClassLoader.findClass(URLClassLoader.java:188) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) 
at 
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:142)
 
at java.lang.ClassLoader.loadClass(ClassLoader.java:251) 
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) 
at java.lang.Class.forName0(Native Method) 
at java.lang.Class.forName(Class.java:164) 
at org.restlet.engine.Engine.loadClass(Engine.java:225) 
at 
org.restlet.engine.http.HttpServerHelper.getConverter(HttpServerHelper.java:107)
 

Can anyone tell me, Is possible redirect my HTTP request to another server 
using restlet running on GAE? Am I miss something? 
-- 
View this message in context: 
http://n2.nabble.com/Try-get-Redirector-working-in-GAE-tp2631757p2631757.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1706065


Re: firstResource example problem

2009-04-14 Thread Thierry Boileau
Hello hudarsono and hnilsen,

as said by hnilsen (and the firstSteps tutorial), the 3 mentionned jars 
must be added the the directory of librairies. We can be more precise 
and refer to "/WEB-INF/lib".
Docs are updated.

Best regards,
Thierry Boileau

> Dear all,
>
> I just starting to learn restlet, and found this problem. I'm following 
> firstResource tutorial with eclipse and glassfish integrated to eclipse.
> After write all the code,and importing :
> - org.restlet.jar
> - com.noelios.restlet.jar
> - com.noelios.restlet.ext.servlet_2.5.jar
>
> and run the servlet, I got the following error :
>
> javax.servlet.ServletException: PWC1397: Wrapper cannot find servlet class 
> com.noelios.restlet.ext.servlet.ServerServlet or a class it depends on
> root cause
>
> java.lang.ClassNotFoundException: 
> com.noelios.restlet.ext.servlet.ServerServlet
> note The full stack traces of the exception and its root causes are available 
> in the Sun GlassFish Enterprise Server v2.1 logs.
>
> But when I was deploying .war example downloaded from the site, it was 
> deployed successfully. Does anybody know what cause this problem?
>
> THanks
>
> Dear hudarsono,
>
> You'll need to copy the three jar files into /WEB-INF/lib inside your 
> deployment (I use Tomcat + IntelliJ) - I struggled with this as well, and the 
> error message provided didn't exactly point me in the right direction, but I 
> did this and it worked.
>
> Surely, the tutorial you're reading could contain this information more 
> explicitly. Hope this helps.
>
>
> Best regards,
> hnilsen
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1705334