• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to get started with Java web app/service programming?

slugg

Diamond Member
Hello there. I pretty much have zero useful experience with server side programming. I've done a couple trivial things in PHP, and that's about it. But at least with PHP, I found a starting point: download MAMP, poke around with PHP, have fun.

As for Java, I used to know core Java decently well a few years ago. I picked up the Android SDK pretty easily, too. Now it's just a matter or learning some new API.

Now my question is... how the heck do I get started with writing web apps and services? I just really don't know where to start. Is there a MAMP equivalent package that can give me a quick start?

I enjoy Eclipse IDE, but I'm not married to it. I'm on a Mac, if that matters.

Thanks!
 
Last edited:
I suggest you get netbeans, it probably doesn't really matter that much but netbeans comes with an application server (= Apache Tomcat) bundled and configured for usage. If you develop your application it's a matter of a 1 click to be able to view current page. I think that is pretty helpful while you are learning new stuff.

There are a lot of frameworks out there and the base on the technology of JSP - Java server pages. Basically works similar to php but with java instead of php between the html.

Quick Start Tutorial on webapps in netbeans:
http://netbeans.org/kb/docs/web/quickstart-webapps.html
(as you can see it should work on Mac 😉 )

This thread mentiones a few jsp-frameworks:
http://stackoverflow.com/questions/375395/spring-mvc-and-jsp-framework

But no need for a framework, you could also just use pure jsp.
 
JBoss is not required. They're a vendor that provides an app stack sorta like MAMP. There are multiple vendors that supply the same application services bundled together. You CAN use JBoss, but for starting out with basic webapps it's probably overkill, since some example tuturals will probably just use Tomcat.

If you're just getting started out with basic Java web apps, Tomcat will suffice. Eclipse will allow you to debug running server code if you get a version bundled with the Web Tools Platform.

Web -services- are a bit of a different animal and require some libraries bundled in the application. Look around at a few tutorials and if you need webservices, perhaps pick a framework (and/or vendor, like JBoss) that has good support for both.

My suggestion is to do a few basic Servlet / JSP tutorial walkthroughs without frameworks and get an idea how how that all works before you choose. You'll want to use one but the basics are pretty important too if you're new - the reason being is Java has A LOT of frameworks, and everyone's usually partial to a specific one. It really depends on what you're looking to do. You can explore the framework suggestions above after you get a handle on it.
 
Oh... I forgot to mention that I did do some JSP with Tomcat back in 2005. I understand that my experience is outdated and mostly forgotten, but the concepts are still there. I wrote a super tiny CMS that stored all its info in XML.

I'd say I'm looking for the "next baby step" after Tomcat. I honestly don't really even know much about how web services work versus web apps.

Ultimately, what I need to do is implement web services. I'd really rather just jump straight into that. Straight JSP is, like beginner99 said, pretty much Java intertwined with HTML, like basic PHP. I get that part, already. Sure, I need to constantly refer to API docs, but I'm fine with that. The trivial things, like learning method names and what-not, will come with time. I'm not worried about that.

Could someone make an analogy to the PHP development workflow? For example, with a *AMP workflow (Apache, MySQL, PHP), first I download MAMP for Mac. Then I set up my database in MySQL. Then I write my PHP code (which can be debugged inside of Eclipse with some minor tweaks) and run it in a browser. When I'm satisfied, I find a web host that supports PHP and MySQL, upload the site, and migrate the database. Then *poof*, we have a web app.

I probably sound like an idiot, but this stuff just seems a little foreign to me. It just hasn't clicked yet. I guess what I'm asking for is to recommend a development environment/stack/workflow for developing web services in Java.

Thanks in advance!

edit: if it matters, I plan on using PostgreSQL as a DBMS eventually. I don't mind using MySQL to get started, but I want to be able to switch without too much of a hassle.
 
EDIT: re: *AMP -> Java

There really isn't a good comparison to a full LAMP/MAMP stack and a Java web server like Tomcat or one supplied by a vendor, like JBoss. Since the vendors have these servers do so much and bundle in things like support for servlets/portlets/JMS/blahblah, these servers tend to be highly configurable and they dont bundle things like a default database or a front end Apache. They allow you to configure your own, or plug in a bunch of different implementations.

I guess what I'm asking for is to recommend a development environment/stack/workflow for developing web services in Java.

Eclipse+JBoss Tools/JBoss/JBossWS.
 
Last edited:
Back
Top