我可以在iframe中使用不同于托管页面的文档类型,或者iframe是否必须从托管页面继承doctype?
<!DOCTYPE 1>
<html>
<body>
<iframe>
<!DOCTYPE 2>
</iframe>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) 我有一个Error404Servlet,在web.xml中配置为404的错误页面:
<servlet>
<servlet-name>Error404</servlet-name>
<servlet-class>com.foo.bar.Error404Servlet</servlet-class>
</servlet>
<error-page>
<error-code>404</error-code>
<location>/error404</location>
</error-page>
Run Code Online (Sandbox Code Playgroud)
在这个servlet中,我必须记录导致404的原始URL,但是request.getRequestURI()总是返回"/ error404"
我怎样才能获得原始网址?我知道的非常难看的方法是创建过滤器,将原始URL放入请求属性.