0
的app.yamlapp.yaml的URL映射問題
application: cloudymovie
version: 1
runtime: java
welcome_files:
- test.jsp
handlers:
- url: /test/*
- servlet: com.test.TestLexerServlet
- name: testlexer
test.jsp的
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test</title>
</head>
<body>
<form action="/test/" method="get">
<input type="submit" value="Go">
</form>
</body>
</html>
,然後當我按下按鈕
HTTP ERROR 404
Problem accessing /test/. Reason:
NOT_FOUND
Powered by Jetty://
和我走在汽車一起來看看 - 生成的web.xml 我發現
<servlet-mapping>
<servlet-name>com.test.TestLexerServlet</servlet-name>
<url-pattern>null</url-pattern>
</servlet-mapping>
url-pattern不能爲空
我是GAE中的新成員。 感謝您的任何建議。