type in your browser: ..../webAppPrefix/test or ...../webAppPrefix/test?cmd=get&id=1 Clients should not be able access the jsp pages directly,to implement this (security)click here

Its a very simple application but we can add different functionalities to improve it. (update,add,delete) SETTING TOMCAT (WINDOWS 2000) my jdk1.3 is installation directory d:\jdk1.3 tomcat installation directory is ---tomcat d:\tomcat >controlpanel>system>Advanced>Environment Variables>system variables>New---type CLASSPATH in the upper textfield and the value in the lower textfield .;d:\tomcat\common\lib\servlet.jar HERE tomcat is the name of tomcat installation directory. ok next set the path: PATH ----upper textfield d:\jdk1.3\bin ----value in lower tf. next set catalina_home: CATALINA_HOME ----upper tf d:\tomcat ---value lower tf. HERE tomcat is the name of tomcat installation directory.

<i>Dare to dream - everything that exists today,was once a figment of someone's imagination, nobody says tomorrow can't be a figment of your today.</i>

Amer Khan

Ranch Hand

Posts: 163

posted 13 years ago

Hi Sophia,

Did u add these line at the begining of the web.xml. <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> Instead of cluttering your Tomcat installation directory a better approach is to keep your webapplication under your working directory.Consider D:\myDir as your working directory. create the following structure in your working directory (myDir). 1)webapplicationPrefix(this is your application name)FOLDER, in this folder create 'arch' Folder and 'WEB-INF' FOLDER in the WEB-INF FOLDER create 'classes' FOLDER. 1,put your web.xml in the WEB-INF folder 2,put your jsp pages in arch folder. 3,your bean and servlet go in classes folder. 4.keep your images in webapplicationPrefix folder Open the %TOMCAT_HOME%\conf\server.xml if your tomcats server.xml has a<ContextManager>--</ContextManager> block.Add the the following entry just before the closing </ContextManager> tag OR some where here<!-- Tomcat Root Context --> in server.xml. <Context path="/webapplicationPrefix docBase="D:\muDir\webapplicationPrefix" debug="0" /> Tomcat inspects content of this directory at server startup. Rember webapplicationPrefix is the name of your application. Here the first attribute is the path pointing to your webapplicationPrefix.This is the same as the path in the URL.The second attribute is a docBase attribute pointing to where your application is located.So like this u can have your application located anywhere on the system.(out-side tomcat installation dir).

<i>Dare to dream - everything that exists today,was once a figment of someone's imagination, nobody says tomorrow can't be a figment of your today.</i>

Sophia Choi

Ranch Hand

Posts: 106

posted 13 years ago

Thanks Amer, it is working right now.

Engin Okucu

Ranch Hand

Posts: 174

posted 13 years ago

Hi Amer, Thanks for you apllication. It's easy to read, the most important thing that i appreciated. I tried it,it works well.

Verity smith

Greenhorn

Posts: 18

posted 13 years ago

Hi,

Amer thanks for the application ,can anyone add some more functionality.It will be a great help.