Can i run a regular tomcat servlet in app engine?

117 views
Skip to first unread message

Mats Svensson

unread,
Mar 9, 2010, 7:49:31 AM3/9/10
to Google App Engine
Is there any way to take a servlet that is currently running on
tomcat, and instead run it in app engine?

I cant seem to find any documentation or tutorials describing this.
All descriptions here seem to be very google-specific and i don't
recognize any of the usual servlet-stuff im used to.

Do i have to build a special google version of the servlet, or is
there something like the tomcat "webapps"-folder somewhere that i can
just drop it into and go?

I guess im looking for some kind of "app engine for people used to
tomcat"-tutorial.

There must be others that has taken this step before me, (if it can be
done).

Ikai L (Google)

unread,
Mar 9, 2010, 2:36:49 PM3/9/10
to google-a...@googlegroups.com
App Engine uses the servlets API, so it should be fine. However, you
should be aware of certain nuances of moving to a cloud based
solution:

- App Engine can and will tear down and bring up instances of your
application as capacity demands it, so storing data in local state
will be less useful than you think. We won't call servlet teardown
hooks, either, so you will have to rely on building stateless servers
- Not all classes will work out of the box because there is a class whitelist
- Your persistence layer will have to be retrofitted for a distributed
datastore if you are working with an RDBMS

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>
>

--
Ikai Lan
Developer Programs Engineer, Google App Engine
http://googleappengine.blogspot.com | http://twitter.com/app_engine

Mats Svensson

unread,
Mar 10, 2010, 10:16:53 AM3/10/10
to Google App Engine
OK, thanks.

My servlet are all stateless, so it shouldn't be a problem.

But do i get my servlet into app engine?
In tomcat i just put it in the webapps -folder, what is the is the
corresponding action to take here?

On Mar 9, 8:36 pm, "Ikai L (Google)" <ika...@google.com> wrote:
> App Engine uses the servlets API, so it should be fine. However, you
> should be aware of certain nuances of moving to a cloud based
> solution:
>
> - App Engine can and will tear down and bring up instances of your
> application as capacity demands it, so storing data in local state
> will be less useful than you think. We won't call servlet teardown
> hooks, either, so you will have to rely on building stateless servers
> - Not all classes will work out of the box because there is a class whitelist
> - Your persistence layer will have to be retrofitted for a distributed
> datastore if you are working with an RDBMS
>

> On Tue, Mar 9, 2010 at 4:49 AM, Mats Svensson <matsxsvens...@gmail.com> wrote:
> > Is there any way to take a servlet that is currently running on
> > tomcat, and instead run it in app engine?
>
> > I cant seem to find any documentation or tutorials describing this.
> > All descriptions here seem to be very google-specific and i don't
> > recognize any of the usual servlet-stuff im used to.
>
> > Do i have to build a special google version of the servlet, or is
> > there something like the tomcat "webapps"-folder somewhere that i can
> > just drop it into and go?
>
> > I guess im looking for some kind of "app engine for people used to
> > tomcat"-tutorial.
>
> > There must be others that has taken this step before me, (if it can be
> > done).
>
> > --
> > You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> > To post to this group, send email to google-a...@googlegroups.com.
> > To unsubscribe from this group, send email to google-appengi...@googlegroups.com.

> > For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en.

Ikai L (Google)

unread,
Mar 11, 2010, 5:28:31 PM3/11/10
to google-a...@googlegroups.com
You could probably just put the code into a package, JAR it up and
import it as needed into a new Eclipse Google App Engine project.

> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>
>

--
Ikai Lan

Reply all
Reply to author
Forward
0 new messages