Yes, it’s somekind of homework. Geez I’m only interested in game project ;D So without considering my future skill on J2EE development, what is the easiest and fastest way to make/learn servlet for noob?
Thanks.
Yes, it’s somekind of homework. Geez I’m only interested in game project ;D So without considering my future skill on J2EE development, what is the easiest and fastest way to make/learn servlet for noob?
Thanks.
I want to have some random chit chat or joke here but it’s urgent although it’s not real homework, so shortcut is allowed.
Spring didn’t really help because I messed up with bean. There’re other frameworks but many said to just use Spring cause it’s powerful. I ended up with Jython, which look simple and become my choice now. However java’s syntax is replaced by python’s, result to more time for learn.
EDIT: this thread is google’s first hit when I searched “fastest make servlet”, I’m lose lol.
Read this to learn how to develop using servlet technology:
That book is quite old, but the only thing that changed since then that is actually worth your time is that since JEE6 / servlet spec 3.0 you can configure servlets through a @WebServlet annotation in stead having to declare them in the web.xml file, which saves greatly on the annoyance factor.
http://www.servletworld.com/servlet-tutorials/servlet3/webservlet-annotation-example.html
As the server to test it on I would use either Tomcat 7 or JBoss 7; both are remarkably easy to setup and wicked fast.
Yes, core servlets is the way to go. This page in particular is what I’ve been learning from over the past few weeks:
http://www.courses.coreservlets.com/Course-Materials/csajsp2.html
I recommend using the Java EE edition of NetBeans with GlassFish. It comes as a nice easy to use package. Note that Window -> Services shows ‘Servers’ including the GlassFish server and you can right click it to close it if you want.
I think netbeans for java EE might also come with tomcat too which is lighter weight and more straight forward. For some reason my netbeans didn’t come with it so i installed it with xammp…
Let us know if you’re having trouble
The fastest way for a noob to make a servlet is to write a JSP. Those are servlets. That’s probably not what an assignment has in mind, so the second fastest is to subclass javax.servlet.http.HttpServlet.
If your assignment is to create your very first servlet, I doubt you’re expected to learn a framework. Those will help you crank out complex web apps in a hurry if you already know the framework. Forget about frameworks.
Core Servlets is a great book, as is most of the Core series.
Really thanks for all replies!
this assignment is to just create a web interface by extending HttpServlet to modify MySQL DB. Not hard actually, but it’s so booooooring and seems repetitive. Also they always make senseless correction and ask for useless feature.
I’ll take Core Servlets, and pay a visit to Play FM. Once again, thanks all!
That’s real life programming assignments in a nutshell. :
Play! framework looks easy, I’ll try that.
Hehe yeah and it’s not taste good. Indie better
Really thanks for all replies!
this assignment is to just create a web interface by extending HttpServlet to modify MySQL DB. Not hard actually, but it’s so booooooring and seems repetitive. Also they always make senseless correction and ask for useless feature.
I’ll take Core Servlets, and pay a visit to Play FM. Once again, thanks all!
Play is awesome and I would recommend you to learn it when you need to get into Java web programming, but it stays far away from servlets so it doesn’t really help you in this assignment
Thanks! don’t worry, they just said about java in web. Play! meets fully