Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / November 2006

Tip: Looking for answers? Try searching our database.

how to run servlet using tomcat 5.5

Thread view: 
rebi - 09 Nov 2006 13:06 GMT
Hai

I am studying J2EE. I read Your articles . It is very useful to me.
I didn't study in any institution. Only read your articles.
I have a doubt on servlet.

I have got a apache tomcat 5.5. How to run servlet on apache5.5?.
If we use html file to give action to the servlet, where we store the
html file and the java file.?.
How to give action to java file?.
How to set Environment Variable?.(I have set JAVA_HOME ,
c:\jdk1.5.0_05)
I have to set the set path=c:\jdk1.5.0_05\bin and set
classpath=c:\apache\tomcat5.5\common\lib\servlet-api.jar
I can't run the servlet programe?.

Please guide me.

Thanking You.

rebi
Tor Iver Wilhelmsen - 09 Nov 2006 14:52 GMT
> I have got a apache tomcat 5.5. How to run servlet on apache5.5?.

You make a "web archive" (e.g. YourApp.war) containing at least

- your servlet class placed relatively like this:
 /WEB-INF/classes/your/package/YourServlet.class

- A file called /WEB-INF/web.xml that looks like this:
<web-app>
   <servlet>
       <servlet-name>YourServletName</servlet>
       <servlet-class>your.package.YourServlet</servlet-class>
   </servlet>
   <servlet-mapping>
       <servlet-name>YourServletName</servlet-name>
       <url-pattern>/YourServlet</url-pattern>
   </servlet-mapping>
</web-app>

Place the war file in the webapps directory in Tomcat.

Then you will invoke it using /YourApp/YourServlet
www.pulpjava.com - 10 Nov 2006 00:56 GMT
If you're new to J2EE, please check out my Servlet and EJB tutorials. I
think you'll find them helpful:

www.mcnz.com

Cheers!

-Cameron McKenzie

Free Java Certification Mock Exams: www.scja.com
Free Java and J2EE Tutorials: www.mcnz.com

www.pulpjava.com www.technicalfacilitation.com

> Hai
>
[quoted text clipped - 17 lines]
>
> rebi


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.