I am new to JSP and Servlets .I am using the book by Basham,Sierra and Bates. Since I do not work for any company, I am not getting ample of practice with the topics. So, it will be kind of you all really talented people to guide on how to practice and what to practice. Please help me find some topics or questions on Servlets and JSP through which I can improve my on going topics.
Any kind of help or suggestions are welcome.
[ September 20, 2008: Message edited by: Bear Bibeault ]
Download the latest version of Tomcat server from http://tomcat.apache.org/ and install it. Search for some good tutorials online and start writing some JSPs and Servlets. Deploy them to Tomcat. Also try the examples on Basham,Sierra and Bates and learn the fundamentals from the same.
Yes. You should be able to run Tomcat inside Netbeans. JSPs and Servlets need to be deployed to a Web Container. They do not run stand alone like other java applications. Tomcat is a Web Container. There are other free ones too. Search on google.
Thank you very much. I know to run Tomcat and deploy the project correctly. I know, if not using Netbeans,where the class file goes and what to write in the deployment discriptor. But here when I use Netbeans all the work is done by the SDK itself. Is learning deployment is as important as development?
Any links for sample questions would greatly help.
You should learn both. Development is as important as deployment. In most of the times, after you finish develop JSP files you will need to deploy them on your own. I think the best way to learn something is you should keep learning by doing. You can create some simple web applications like Guestbook, Forum by using JSP. If you want to learn in more advanced, perhaps you can consider to take SCWCD certification.
Java Server Pages are converted to Java servlets by a JSP Engine which is part of a Java-based web server. After this conversion, the generated Java servlet is executed. By created Java Server Pages, non-programmers can easily create Java servlets without having to learn Java.
When a Java-based web server is part of a Java application server, it is referenced as a web container.
Though I'd be quick to add that using JSP as a substitute for writing code, as opposed to their use as view templates, is a poor stand-in for the real thing. Besides, adding Java code to the pages in the form of scriptlets (not recommended!) is really needed in order to make JSP's stand-in for servlets that do anything with data or other processing. Which renders that whole approach rather nonsensical.
In addition, programmers can create custom JSP tags based on presentation requirements and share the tag libraries with non-programming staff. Non-programmers can then use combinations of custom tags and HTML to implement requirements.
As mentioned, raw Java code directly in the JSP page file is a poor practice and should be avoided, as it typically results in a very non-object-oriented design.
It's interesting that that premise has long been held regarding JSPs, but I've yet to see it actually put in action. Rather than derail this topic, I think I'll start a new one... I'm interested. [ September 20, 2008: Message edited by: Bear Bibeault ]
Web application development in general is a hot spot. If that's an area that interests you, that's one reason that it's really really important to understand Servlets and JSP thoroughly.
After that, you might want to explore other layers in the web app stack. For example, JDBC for database access. Then perhaps tools like Hibernate that are popular. I personally avoid large frameworks like Struts and Spring as unwieldily and more trouble than help, but knowing these technologies will not hurt your resume. JSF is an abomination in my opinion, and it's unclear if it's going to go anywhere, so I'd steer clear of it for the time being.
And then, of course, there's lots and lots of areas outside of web apps.
Additionally, I would suggest learning how to create JAX-RPC web services, including SAAJ and how to program SOAP handlers and create SOAP header extensions with WS-Security, WS-Addressing, XML Encryption, etc.
Good luck! [ September 22, 2008: Message edited by: James Clark ]