Address: http://www.cnblogs.com/cjsh/articles/36271.html
I have been learning JSP for a long time, and I will never configure it. Today, the configuration is successful, so I will write this articleArticle,
Hope to help beginners. If you have any mistakes, I hope you can correct them.
1. Beginners: JSP environment Configuration
Refer to this article: http://www.cnjsp.org/view.jsp? Column = 2 & id = 747
After the installation is complete, you can also start the graphic configuration interface, as shown in:
2. helloworld. JSP Source Code :
JSP test page --- helloworld!
<%
out. println ("
Hello world!
Hello, world!
");
%>
3. Web. xml configuration file content:
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi: schemalocation = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
Version = "2.4">
<Description>
JSPs 2.0 examples.
</Description>
<Display-Name> JSP 2.0 examples </display-Name>
</Web-app>
4. Set helloworld. put the JSP file .. \ Tomcat 5.0 \ webapps \ directory under the examples sub-directory (you can also put it in another directory), put the web. the XML file is placed in the WEB-INF subdirectory under the same directory.
5. Stop and restart tomcat, as shown in:
6. After the program configuration is completed, the result is shown as follows:
Copyright 2004 cjsh All Rights Reserved. Welcome to reprint, please indicate the source: http://www.cnblogs.com/cjsh
Category: Original Articles
End
I have been learning JSP for a long time and will never configure it. Today, the configuration is successful, so I wrote this article,
Hope to help beginners. If you have any mistakes, I hope you can correct them.
1. Beginners: JSP environment Configuration
Refer to this article: http://www.cnjsp.org/view.jsp? Column = 2 & id = 747
After the installation is complete, you can also start the graphic configuration interface, as shown in:
2. helloworld. JSP source Code :
JSP test page --- helloworld!
<%
out. println ("
Hello world!
Hello, world!
");
%>
3. Web. xml configuration file content:
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi: schemalocation = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
Version = "2.4">
<Description>
JSPs 2.0 examples.
</Description>
<Display-Name> JSP 2.0 examples </display-Name>
</Web-app>
4. Set helloworld. put the JSP file .. \ Tomcat 5.0 \ webapps \ directory under the examples sub-directory (you can also put it in another directory), put the web. the XML file is placed in the WEB-INF subdirectory under the same directory.
5. Stop and restart tomcat, as shown in:
6. After the program configuration is completed, the result is shown as follows:
Copyright 2004 cjsh All Rights Reserved. Welcome to reprint, please indicate the source: http://www.cnblogs.com/cjsh