Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running servlet

 
akalanka de silva
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
akalanka de silva
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey i mean running it manually not in java tool
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
vjy chin
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey how can i configure it.and how can i put in to tomcat server
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic