• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet/JSP Model

 
Ranch Hand
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I already linked you to this article. Feel free to ask about any aspects of web app structure that you are not understanding.
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic