在使用JSP代码中的嵌入变量展开HTML页面时,我的代码产生了令人费解的结果。变量"String completename“首先扩展为
http://www.formatika.de/cococo.de/products/Sources/Isabelle/Doc/Tutorial/document/Isa-logics.pdf
和2行之后的
http://localhost:8080/cococo.de/products/Sources/Isabelle/Doc/Tutorial/document/Isa-logics.pdf
在下面的代码片段中:
<div>
<table border="0" align="center" cellspacing="2" cellpadding="2">
<tr align="center"><td align="center">
<div>
<a href="<%=completename %>" title="<%=showname%>" target="_blank"><%=filename%><br><br>
<iframe src='<%=completename %>' width='<%=width%>' height='<%=height%>' type='application/pdf'>
</iframe>
</a>
</div>
</td></tr>
</table>
</div>可以在此URL中观察到它
http://formatika.de/print.jsp?content=source&file=products/Sources/Isabelle/Doc/Tutorial/document/Isa-logics.pdf
有没有人知道该去哪里找?我使用Apache Tomcat 8.0.27和JAVA EE 6Web。
发布于 2021-11-27 18:31:33
找到了答案/bug;这是因为Tomcat仍然隐藏在IIS后面,因此名称在这里解析为"localhost:8080“,而不是IIS的主机名。
https://stackoverflow.com/questions/70056375
复制相似问题