You can't feed the servlet to appengine-magic, and you can't serve
that servlet with appengine-magic.core/serve, you can only serve an
appengine-magic app (created from a ring handler).  I was talking
about deployment to app engine.  If you have a Java servlet, why not
just run it in a Tomcat instance running on some other port, while
developing your appengine-magic app.

It seems like maybe you are wanting to create an app with an existing
Java servlet, then somehow sprinkle on some functionality to that.
This is not something that you can do with appengine-magic, and it
wouldn't really make sense.  If you want to reuse the servlet in this
way, pull out the code you want to use into reusable library code, jar
that up, add it as a dependecy to your project, and do interop as
normal, but replace the actual servlet front with a ring handler in
clojure.

On Mon, Nov 7, 2011 at 5:07 AM, Razvan Rotaru <razvan.rot...@gmail.com> wrote:
> Yes, I tried that but did not work. appengine-magic/serve expects an
> "appengine-application", which is a map that among others contains the
> ring handler. The serve function turns this handler into a servlet and
> maps it to the root path "/" (or "/*", I haven't figured that out
> yet). Whatever i write in web.xml is apparently overwritten by
> appengine-magic/serve, or web.xml does not matter at all when starting
> the server with appengine-magic/serve.
>
> I have only one servlet, which is in the external jar. I don't have a
> ring handler or a second servlet. I just want to feed this servlet to
> appengine-magic.
>
> Thanks,
> Razvan
>
> On Nov 6, 10:43 pm, Mark Rathwell <mark.rathw...@gmail.com> wrote:
>> I'm still having trouble figuring out what it is you are wanting to
>> do, but if you have an existing Java servlet that will handle some url
>> pattern, and you want to write an appengine-magic app that will create
>> a servlet to handle some other url pattern, and use both servlets in
>> one app engine app, then you should be able to add the jar as a
>> dependency to your project such that the jar ends up in
>> war/WEB-INF/lib, and setup that servlet and url pattern in web.xml
>> just as you normally would, and setup the appengine-magic servlet to
>> handle some other desired url pattern.
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Nov 6, 2011 at 3:24 PM,RazvanRotaru <razvan.rot...@gmail.com> wrote:
>> > The servlet is coming from an external jar, which is written in Java.
>> > I need appengine-magic for the other services, like datastore.
>>
>> >Razvan
>>
>> > On Nov 6, 7:45 pm, Mark Rathwell <mark.rathw...@gmail.com> wrote:
>> >> I'm still not quite following.  What appengine-magic does is provides
>> >> Clojure wrappers for many of the App Engine for Java service APIs, and
>> >> from a ring handler creates a servlet suitable for deployment to App
>> >> Engine.  If you already have the servlet, I'm not sure why you need
>> >> appengine-magic.  Where is this servlet coming from?  And what are you
>> >> wanting to do with it once you have integrated it with
>> >> appengine-magic?
>>
>> >>  - Mark
>>
>> >> On Sun, Nov 6, 2011 at 11:41 AM,RazvanRotaru <razvan.rot...@gmail.com> 
>> >> wrote:
>> >> > I want integration of servlet in appengine-magic.
>>
>> >> > Documentation describes that you use a ring handler to call def-
>> >> > appengine-app:
>>
>> >> > (appengine-magic.core/def-appengine-app my-app #'my-ring-handler)
>>
>> >> > I have a servlet and want to build an application, something like:
>>
>> >> > (appengine-magic.core/def-appengine-servlet-app my-app #'my-servlet)
>>
>> >> >Razvan
>>
>> >> > On Nov 6, 4:32 pm, Mark Rathwell <mark.rathw...@gmail.com> wrote:
>> >> >> > I'm not using
>> >> >> > ring, I have a servlet which I need to feed to appengine-magic.
>>
>> >> >> Not sure what you mean by this, could you expand on it a little more?
>> >> >> You have an existing Java servlet that you want to handle some url
>> >> >> pattern, and you want to integrate that into your appengine-magic app?
>>
>> >> >> On Sun, Nov 6, 2011 at 5:08 AM,RazvanRotaru <razvan.rot...@gmail.com> 
>> >> >> wrote:
>> >> >> > Hi,
>>
>> >> >> > appengine-magic (https://github.com/gcv/appengine-magic) uses ring-
>> >> >> > handlers to turn into servlets that are accepted by GAE. Does anybody
>> >> >> > know how to use servlets directly with appengine-magic? I'm not using
>> >> >> > ring, I have a servlet which I need to feed to appengine-magic.
>>
>> >> >> > Thanks,
>> >> >> >Razvan
>>
>> >> >> > --
>> >> >> > You received this message because you are subscribed to the Google
>> >> >> > Groups "Clojure" group.
>> >> >> > To post to this group, send email to clojure@googlegroups.com
>> >> >> > Note that posts from new members are moderated - please be patient 
>> >> >> > with your first post.
>> >> >> > To unsubscribe from this group, send email to
>> >> >> > clojure+unsubscr...@googlegroups.com
>> >> >> > For more options, visit this group at
>> >> >> >http://groups.google.com/group/clojure?hl=en
>>
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups "Clojure" group.
>> >> > To post to this group, send email to clojure@googlegroups.com
>> >> > Note that posts from new members are moderated - please be patient with 
>> >> > your first post.
>> >> > To unsubscribe from this group, send email to
>> >> > clojure+unsubscr...@googlegroups.com
>> >> > For more options, visit this group at
>> >> >http://groups.google.com/group/clojure?hl=en
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clojure@googlegroups.com
>> > Note that posts from new members are moderated - please be patient with 
>> > your first post.
>> > To unsubscribe from this group, send email to
>> > clojure+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/clojure?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to