| Author |
Servlet/JSP Model
|
Tom Hilliard
Ranch Hand
Joined: Feb 03, 2012
Posts: 39
|
|
Hi all,
I posted here the other day with a servlet/jsp problem.
Some guys helped me find the problem and fix it! Great!
Now, by posting some of my code, the repliers (Satya Maheshwari & Bear Bibeault cheers) made me aware of my bad code (java scriptlets in jsp) and that I was using a model that was outdated (cheers uni for teaching me old tech!).
At first I was adamant that I wouldn't change my code and that it was fit for purpose. I now realise this is a poor attitude to take and that I should learn the "best" model.
So my question is, could you point me to some material (easy to digest) that can help me learn this model? And if I found myself struggling, could I post some of my code and get some help translating it to the new model? I do usually find it much easier to understand if I can see some working code
Regards
TH
PS. If this post is in the wrong section please move it to where it belongs
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3563
|
|
You can find some basic details in the ServletFAQ section.
And if I found myself struggling, could I post some of my code and get some help translating it to the new model?
Of course, folks here are always very much helpful
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50691
|
|
|
I already linked you to this article. Feel free to ask about any aspects of web app structure that you are not understanding.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Jk Robbins
Ranch Hand
Joined: Dec 16, 2010
Posts: 159
|
|
|
Pick up a copy of "Head First Servlets & JSP". I think you'll find that it's exactly what you are looking for.
|
 |
Tom Hilliard
Ranch Hand
Joined: Feb 03, 2012
Posts: 39
|
|
Thanks for the replies guys, I'm now reading the materials you have provided.
I will have a go at implementing something and get back to you guys for some feedback
Regards
TH
|
 |
Tom Hilliard
Ranch Hand
Joined: Feb 03, 2012
Posts: 39
|
|
Jk Robbins wrote:Pick up a copy of "Head First Servlets & JSP". I think you'll find that it's exactly what you are looking for.
Ive got this book now and am now implementing the first simple exercise (beer-V1) and I'm struggling with the deployment directory (page 72/73)!
Now what I'd like to know is are those things described "folders" or "packages" because I've followed the guidance and implemented the beerselection.html, web.xml and BeerSelect.java and my project won't deploy or run!
Mentions this in the console - FAIL - Deployed application at context path /FinalProject but context failed to start. C:\Users\Tomo\Documents\NetBeansProjects\FinalProject\nbproject\build-impl.xml:683: The module has not been deployed.
And points to this in build-impl.xml <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
So I'm thinking my deployment directory isn't right!?
Regards
TH
|
 |
Tom Hilliard
Ranch Hand
Joined: Feb 03, 2012
Posts: 39
|
|
Sorted it, seems my deployment environment wasn't right!
This model seems much more complicated to actually get on and write code but even from this simple example I can see how maintenance and testing becomes much easier. I suppose I can always get better at coding/understanding the model, but no matter how good I am at maintaining/testing, if the code is in the mess I originally intended it will always be difficult.
Will keep you guys posted on Model 2 progress
Regards
TH
|
 |
 |
|
|
subject: Servlet/JSP Model
|
|
|