I'm a .NET web developer who has just been asked to produce a small demo website using NetBeans IDE 5.5. I have no experience with Java up to this point.
I've followed a couple of quick tutorials, one which just uses a JSP file and another which uses a servlet. My concern at this early stage is that it looks difficult to keep my application code away from my markup.
Using JSP files looks quite similar to the old days of classic ASP. On the other hand, servlets look useful but seem to involve a lot of writing out markup to the output stream, which I'm not happy with either.
Is there an equivalent to the ASP .NET code-behind model, or any other strategies for separating out markup and code? Is it possible to keep markup in the JSP and then use the servlet from the JSP?