<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'Jsp1.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
This is my JSP page. <br>
<%
out.println("Hello World");
%>
</body>
</html>这个代码没错吧
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'Jsp1.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
This is my JSP page. <br>
<%
out.println("Hello World");
%>
</body>
</html>这个代码没错吧
解决方案 »
- jdbc连接mysql的方式
- 一个企业平台与其他企业服务的连接?
- spring中的一个配置问题
- xml换行问题+ dom4j 写 xml
- 关于Tomcat
- jsp的bean用dom写xml javax.xml.transform.TransformerException:
- Java天下诚征版主
- 请教j2eesdk1.4_beta2中deploytool的使用问题
- 现在JAVAWEB项目一点击增加或者修改 就会弹出来一个新的页面 就像悬浮在原来的页面上面的 这个怎么做出来的啊
- java.net.BindException: Cannot assign requested address: JVM_Bind这是什么问题啊?求解决
- JUnit 4 抛出异常后怎样继续执行下面的代码
- 谁有Apache Cxf的参考资料,共享一下
具体操作:
打开控制面板-->管理工具-->服务, 找到Apache Tomcat,将自动改为手动
再看看好了没