Вы находитесь на странице: 1из 2

IP prog 6a) -- Fruit.html 1)store Fruit.html and Fruit.java in java/bin 2)compile Fruit.

java 3)create a folder "Classes" in tomcat\webapps\ROOT\WEB-INF 4)store Fruit.class file in Classes folder 5)there will be web.xml in WEB-INF folder.. open it in note pad and edit the mapping it as follows

<servlet> <servlet-name>Fruit</servlet-name> <servlet-class>Fruit</servlet-class> </servlet> <servlet-mapping> <servlet-name>Fruit</servlet-name> <url-pattern>/Fruit</url-pattern> </servlet-mapping> </web-apps>


then open Fruit.html.. Procedure for 6b:applet servlet communication: 1.do mapping in web.xml web.xml mapping is done as follows

<servlet> <servlet-name>echo</servlet-name> <servlet-class>EchoServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>echo</servlet-name> <url-pattern>/echo</url-pattern> </servlet-mapping> </web-apps>


2.open tomcat/conf/server.xml and type <context path="/echo" docBase="echo" reloadable="true"/> 3.compile echoapplet.java and echoservlet.java 4.create a folder "echo" and put echoapplet.java,echoapplet.class,echoapplet$1.class(both class files wil be created once u compile echoapplet.java) and echoapplet.html in it 5.put that "echo" folder in tomcat/webapps

6.create a folder "WEB-INF" inside "echo" folder and copy the web.xml document into it 7.create a folder "classes" and put echoservlet.java and echoservlet.class in it 8.put that "classes" folder inside "WEB-INF" folder 9.start the server localhost:8080/echo/echoapplet.html IP prog 7-- JSP 1)create Student database in MS-Access n create a table "Student" with all required fields. 2)Give connection as follows-- control panel->administrative tools->Data Sources ODBC->System DSN-> add-> select Microsoft Access Driver(*.mdb)or (*.mdb,*accdb) > click finish -> select-> choose the db frm location its saved -> click ok-> enter DataSource Name (Student) -> click ok 3)Create a folder "Student" in tomcat\webapps\examples\jsp 4)Store online.jsp,online.html n Student Db in the folder "Student". 5)open Online.html n enter the details.. thn check whether data is added in the Student Db.. IP lab..procedure fr 8th prog-- JDBC 1)create Mark database in MS-Access n create a table "Mark" with all required fields. 2)Give connection as follows-- control panel->administrative tools->Data Sources ODBC->System DSN-> add-> select Microsoft Access Driver(*.mdb)or (*.mdb,*accdb) > click finish -> select-> choose the db frm location its saved -> click ok-> enter DataSource Name (Mark) -> click ok 3)Store Mark.java, Mark.class, Mark.mdb (DB) in Tomcat\webapps\ROOT\WEBINF\Classes 4)open tomcat server n type "http://localhost:8080/Mark" 9th:xml: type SimpleXML.xml as one file type SimpleXML.xsl as another file simply open SimpleXML.xml and d output table wil be displayed

10th: ajax: type loadXMLDoc.html as one file type Ajax_info.txt as another file store both in d location tomcat/webapps/root folder open browser page localhost:8080/loadXMLDoc.html and click on change content button, the content wil get changed as given in Ajax_info.txt

Вам также может понравиться