aspose file tools*
The moose likes Servlets and the fly likes running servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "running servlet" Watch "running servlet" New topic
Author

running servlet

akalanka de silva
Greenhorn

Joined: Sep 14, 2004
Posts: 18
hey iam new for servlet.and i write a programme in servlet it work fine in jbuilderx.but i also want to know running that programme in command line.
pls send me a step by step.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Servlet programs don't run at the command line.
If you mean that you want to learn to run a Java program at the command line, I would ask in the Java Beginner Forum.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
akalanka de silva
Greenhorn

Joined: Sep 14, 2004
Posts: 18
hey i mean running it manually not in java tool
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61787
    
  67

Repeat: Servlet programs don't run at the command line.

Servlets run under the control of a servlet container. One such popular container is Jakarta Tomcat.
[ April 18, 2005: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
vjy chin
Ranch Hand

Joined: Feb 17, 2005
Posts: 279
Hi,
For running a servlet you need a servlet container. You can use Apache Tomcat as Bear Bibeault specified.

You need to put the servlet file in a folder WEB-INF. Then you have to create web.xml and configure the servlet.
Then you can type http://localhost:8080/servletName in the browser.

Hope it helps
akalanka de silva
Greenhorn

Joined: Sep 14, 2004
Posts: 18
hey how can i configure it.and how can i put in to tomcat server
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I would start by looking for some tutorials and/or books.
http://www.google.com/search?hl=en&q=SERVLET+TUTORIAL&btnG=Google+Search

A forum is a great place to go if you get stuck on something but it's better to start by reading and working on your own.
vjy chin
Ranch Hand

Joined: Feb 17, 2005
Posts: 279
for tomcat tutorials you can start with

apache site, then look into

http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html

You can also look into google for this. There are many tutorials floating around.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: running servlet