Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 11th, 2007, 01:12 AM
Authorized User
Join Date: Jun 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to compile a servlet program?????

I have installed j2sdk1.4.1_03 & tomcat sever 5.0.28.

i wanna know how to execute a servlet program???
plse anyone help me????
wtng fo reply???

Old August 22nd, 2007, 09:16 AM
Registered User
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Servlet is like any other Java class and should be compiled like any other java class. Once compiled, place the class file into the WEB-INF/classes directory, add the servlet and servlet mapping entry into the web.xml, start the Tomcat and through the browser call the server using the URL-pattern specified in the web.xml.

Old September 15th, 2007, 12:26 AM
Registered User
Join Date: Sep 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Ant_Yan

Compiling servlet source file you need the servlet-api.jar to be included in the classpath.
So if you use IDE tool it will help you do it, like Eclipse.
if you code, compile and deploy just by hand, you must set classpath by hand too.

Old December 4th, 2007, 11:04 PM
Posts: n/a

first you need the lib,then you can use javac to compile
go to this website www.codeuu.com

Old December 24th, 2007, 06:42 AM
Friend of Wrox
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post

Find basics about webapplications at the following links


- Rakesh

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to compile servlet? Monali Servlets 4 December 26th, 2006 04:44 PM
Compile program shrikeng Pro VB 6 2 September 6th, 2006 08:51 PM
how to compile servlet..... Random Servlets 1 January 16th, 2006 12:28 AM
compile a program boksi General .NET 0 March 1st, 2005 11:32 AM
How to compile a servlet? wujie J2EE 1 May 13th, 2004 12:12 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.