473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

how to run a servlet in Eclipse

12
Hello Friends

How can i run my servlets in Eclipse 3.2,i am able 2 run servlets without using Eclipse ie simply cerating the hirerarchy and using tomcat5 and internet explorer.

In Eclipse how can i place web.xml and what type of url do i need to use in browser.

Thanking you
Rahana
Nov 24 '07 #1
2 2525
ajos
283 100+
Hello Friends

How can i run my servlets in Eclipse 3.2,i am able 2 run servlets without using Eclipse ie simply cerating the hirerarchy and using tomcat5 and internet explorer.

In Eclipse how can i place web.xml and what type of url do i need to use in browser.

Thanking you
Rahana
Do something like this--->
Expand|Select|Wrap|Line Numbers
  1. <servlet>
  2.         <description>
  3.         </description>
  4.         <display-name>
  5.         Hello</display-name>
  6.         <servlet-name>Hello</servlet-name>
  7.         <servlet-class>
  8.         testing.Hello</servlet-class>
  9.     </servlet>
  10. <servlet-mapping>
  11.         <servlet-name>Hello</servlet-name>
  12.         <url-pattern>/Hello</url-pattern>
  13.     </servlet-mapping>
  14.  
Hello is the name of the servlet class


Ideally the web.xml should reside in the WEB-INF folder.
If you are using eclipse, you dont have to type the path in the browser yourself, therz an option in web.xml
Expand|Select|Wrap|Line Numbers
  1. <welcome-file-list>
  2.         <welcome-file>index.html</welcome-file>
  3.         <welcome-file>index.htm</welcome-file>
where say index.html is your view that you have created.
Nov 26 '07 #2
JosAH
11,448 Expert 8TB
Install WTP (the Web Tool Platform). It's an extension for Eclipse and
does a whole lot of administrative and other stuff for you.

kind regards,

Jos
Nov 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Alfonso | last post by:
Hi, I'm start to program in Java and I need to debug a servlet. I would like to do it with netbeans 3.5.1 or eclipse with a server tomcat, but I've not find a documentation about it. Where I can...
1
by: Hai Tran | last post by:
Any help is appreciated. Installed Tomcat 4.1 and Mysql on a WinXP. I've manage to get Tomcat up and was able to view my first application ( myhome ) simple home page. Tomcat was installed under...
3
by: Christofer Dutz | last post by:
Hi, I am thinking about migrating an application of mine to .Net and have run into this small "problem" At the moment I would generally compare ASP.Net to JSPs in the Java world. I know that...
2
by: Mayur1234 | last post by:
Hi, I have installed Tomcat and it is running properly. Now I am trying to run a servlet application like HelloWorld Can anybody please tell me what to do to run it using ECLIPSE if i try to run...
5
by: ajos | last post by:
hi frnds, im new to this forum,and i have a problem...here is the situation---- i have a project which has servlets, wat the servlet does is connect to a database and display the result...
5
rsrinivasan
by: rsrinivasan | last post by:
Hi all, I am using Apache-topcat as my web server. And i am using Eclipse IDE. When i run the tomcat from Eclipse IDE, i have the following message in my console. WebappClassLoader:...
3
oll3i
by: oll3i | last post by:
I want to write a simple servlet.I use jboss, Eclipse europa.I need to create ear for deploying.Should i then create an enterpise application project or a dynamic web project and then pack it into...
6
oll3i
by: oll3i | last post by:
i can not add a servlet to my ejb project in eclipse? i wanted the servlet to display the returned map of <coulmn name, value> from component class
9
by: mjahabarsadiq | last post by:
Hi I have created a servlet that is to be started at the server startup. And I got it. In that I have created a object of another class and set it as a session attribute. What I am trying is...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.