Guru Nanak Dev Engineering College Practical File Web Technologies Laboratory (PGCA - 2219)
Guru Nanak Dev Engineering College Practical File Web Technologies Laboratory (PGCA - 2219)
PRACTICAL FILE
Apache Tomcat is an open-source web server and servlet container for Java code.
Tomcat executes programs written in the Java programming language.
1. Browse to the official Apache Tomcat website. Locate the Download section and
click the latest Tomcat version available. At the time of writing this article, the latest
Tomcat version was version 10.
2. On the Download page, scroll down and locate the Binary Distributions area.In
the Core list, depending on the installation type you prefer, click the download link
for the Windows Service Installer or the 32bit/64bit Windows zip file.
1
Step 2: Install Tomcat
Install Tomcat via the Windows Service Installer for an automated and wizard-guided
experience. The service installer installs the Tomcat service and runs it automatically
when the system boots.
1. Open the downloaded Windows Service Installer file to start the installation
process.
2. In the Tomcat Setup welcome screen, click Next to proceed.
2
3. Read the License Agreement and if you agree to the terms, click I Agree to proceed
to the next step.
4.In the Tomcat component selection screen, choose Full in the dropdown menu to
ensure the wizard installs the Tomcat Host Manager and Servlet and JSP examples
web applications. Alternatively, keep the default Normal installation type and
click Next.
3
5. The next step configures the Tomcat server. For instance, enter the Administrator
login credentials or choose a different connection port. When finished, click Next to
proceed to the next step.
6. The next step requires you to enter the full path to the JRE directory on your
system. The wizard auto-completes this if you have previously set up the Java
environment variables. Click Next to proceed to the next step
4
7. Choose the Tomcat server install location or keep the default one and click Install..
8. Check the Run Apache Tomcat box to start the service after the installation finishes.
Optionally, check the Show Readme box to see the Readme file. To complete the
installation, click Finish.
5
9. A popup window appears that starts the Tomcat service. After the process
completes, the window closes automatically. The Apache Tomcat web server is now
successfully installed .
6
PROGRAM -2
Design an XML document to store information about a
student in an engineering college. The information must
include URN, Name, Branch, Year of Joining, and e-mail id.
Make up sample data for 3 students. Create a CSS style
sheet and use it to display the document.
SOURCE CODE:-
STEP1:-Create an XML file named as file 1.xml
<college>COLLEGE : GNDEC</college>
<branch>BRANCH : Electronics and Communication Engineering
</branch>
<year>YEAR : 2007</year>
<e-mail>E-Mail : [email protected]</e-mail>
</student>
</students>
</html>
7
STEP 2: Create a CSS file named as 5.css
student{
display:block; margin-top:10px; color:Navy;
}
USN{
display:block; margin-left:10px;font-size:14pt; color:Red;
}
name{
display:block; margin-left:20px;font-size:14pt; color:Blue;
}
college{
display:block; margin-left:20px;font-size:12pt; color:Maroon;
}
branch{
display:block; margin-left:20px;font-size:12pt; color:Purple;
}
year{
display:block; margin-left:20px;font-size:14pt; color:Green;
}
e-mail{
display:block; margin-left:20px;font-size:12pt; color:Blue;
OUTPUT:-
8
PROGRAM -3
Write an XML file which will display the Book information.
It includes the following:
SOURCE CODE:-
XML Code:-
<book><title>web programming</title>
<author>chrisbates</author>
<ISBN>123-456-789</ISBN>
<publisher>wiley</publisher>
<edition>3</edition>
<price>350</price>
</book><book>
<title>internet worldwideweb</title>
<author>ditel&ditel</author>
<ISBN>123-456-781</ISBN><publisher>person</publisher>
<edition>3</edition><price>450</price></book></bookstore>
9
DTD CODE:-
<xs:element name="bookstore">
<xs:complexType>
<xs:sequence>
<xs:complexType>
<xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
10
OUTPUT:-
11