Using and Writing Java Servlets

With the power of the Java API set, servlets can provide complex, dynamic web pages and form processing.
More and More

Of course, these examples show servlets completing simple tasks. Servlets can be expanded easily to handle cookies and keep a session for a person's range of activities, such as logging in to access certain data and then logging out.

Conclusion

The configuration of the web server to support servlets can be troublesome. However, servlets, with the power of the Java API set, can provide complex dynamic webs pages and form processing.

Resources

Petr Sorfa is a member of Santa Cruz Operation's Development Systems Group, where he is the maintainer of the cscope and Sar3D open-source projects.

email: petr@sco.com

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

code to display charts

raghu's picture

i want to display more than one cahrts in a web page by using java by passing x-axis nad y-axis. and the data should fetch from oracle database. the query should execute in the backend.

Can u pls sort this out

rimi's picture

hi.thanks for the wonderful stuff.
i have a problem, however.
I developed a login form in html,got it validated for user authentication through java servlets,and if user is valid the servlet is redirected to another html page, but now i wish to edit certain tags of the html page before redirection, kindly find some time to answer this soon.

Posting from Http DoPost without html form

Anonymous's picture

Hi,

How can I call DoPost directly from the code, without html post method?

Thanks,

Re: Using and Writing Java Servlets

Anonymous's picture

Good review. Right on target on the configuration being troublesome. The beating of old drums such as 'recompiling for new API's' or 'Java is slow' is unfortunately pure bantor. Everybody in every language recompiles code from time to time. And saying 'java is slow' is akin to the windoz jokers preaching that 'linux has no desktop interface'. How very yesterday....

running servlet

alankar's picture

Hi,

I tried your example of form response servlet. Can you tell me where should I put the html form file and the class file of the sevlet? so that I can try it on Abyss Server/Tomcat/Servletrunner

Thanks,

Alankar

Re: Using and Writing Java Servlets

Anonymous's picture

I like the tutorial, it will help me learn. I wish some of the value judgements could have been left out. I am, however, sick of Java people bashing "scripting" langs that they clearly have no knowledge of.

Eric

Re: Using and Writing Java Servlets

Anonymous's picture

I really like this Tutorial too! I just start using Servlet yesterday and I have already create a WebApp information Table from what I have learned from this session. Thank you!

==Sandy

Re: Using and Writing Java Servlets

Anonymous's picture

No credit is given to mod_perl, which only loads one instance of the Perl interpreter. Within mod_perl, pages are compiled once and run many times during the life of the server process. Many major web sites use the power of mod_perl to leverage the speed of Apache and the power and flexibility of Perl to generate rich, dynamic, and lightning-fast Web sites.

Re: Using and Writing Java Servlets

Anonymous's picture

The article is not about mod_perl. However I do agree the article is a bit misleading as nobody in their right mind uses perl/php via CGI with Apache.

I like this article but can u

Amit's picture

I like this article but can u plz tell me the full way to run Servlet on tomcat.And how to modified or create web.xml for the servlet.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState