I start javaEE with tomcat and linux ubuntu.
i installed tomcat on linux successfully and see its first page in 127.0.0.1:8080
that was : "it works..."
By the first example in my book, i create a directory called jspbook
in webapps
and a sub directory WEB-INF
in jspbook
that contains this web.xml
:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4">
And another xml file called jspbook.xml
in webapps directory:
<Context path="/jspbook" docBase="jspbook" debug="0"/>
Now after restarting tomcat, it doesn't display a blank directory in browser by 127.0.0.1:8080/jspbook/
in linux
But i try it in windows and it displayed a blank directory correctly!
Which browser, what exactly did you really try? The URL 127.0.0.1:8080:jspbook/
is invalid, it should be 127.0.0.1:8080/jspbook/
instead. And, of course, if the Windows machine is not the same as the Linux machine, then 127.0.0.1
(aka. localhost
) will not take you from your Windows to your Linux.
I must tell you, 1st create a simple html file and check your browser can acces that directory or not
In jspbook create a html file called test.html
<html>
<head><title> Its Test<title></head>
<body> Its Working Fine</body>
</html>
Now open: http://127.0.0.1:8080/jspbook/test.html
If that works then there is some problem in your java code, if it dosen't work check you have given read permission for groups and other or not
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.