本文将介绍如何将CSS连接到WEB-INF文件夹中存储的JSP文件?Websphere/JSP的详细情况,特别是关于怎么将css文件链接到html的相关信息。我们将通过案例分析、数据研究等多种方式,帮
本文将介绍如何将CSS连接到WEB-INF文件夹中存储的JSP文件?Websphere / JSP的详细情况,特别是关于怎么将css文件链接到html的相关信息。我们将通过案例分析、数据研究等多种方式,帮助您更全面地了解这个主题,同时也将涉及一些关于asp.net – 远程连接到WebDev.WebServer.exe、Crytal reports水晶报表在Spring boot web项目中的使用, 无需web.xml文件, 无jsp文件、HTML – 如何将我的CSS连接到存储在WEB-INF文件夹中的JSP文件?的Websphere/JSP、IBM WebSphere Application Server 暴露JSP文件内容_MySQL的知识。
本文目录一览:- 如何将CSS连接到WEB-INF文件夹中存储的JSP文件?Websphere / JSP(怎么将css文件链接到html)
- asp.net – 远程连接到WebDev.WebServer.exe
- Crytal reports水晶报表在Spring boot web项目中的使用, 无需web.xml文件, 无jsp文件
- HTML – 如何将我的CSS连接到存储在WEB-INF文件夹中的JSP文件?的Websphere/JSP
- IBM WebSphere Application Server 暴露JSP文件内容_MySQL
如何将CSS连接到WEB-INF文件夹中存储的JSP文件?Websphere / JSP(怎么将css文件链接到html)
我正在使用ibm websphere并创建一个 动态Web项目 。我所有的JSP
文件都在我的WEB-
INF文件夹中,并且我在web.xml
文件中使用servlet映射
使其可访问。到目前为止,此方法运行良好。但是我的CSS有问题。和往常一样,我的CSS
文件位于WebContent
名为css的文件夹中。这是我的链接jsp
<link rel="stylesheet" href = "css/styles.css">
我没有运气让CSS显示…
我想念什么?
答案1
小编典典浏览器将生成的HTML输出中的相对URL相对于请求URL进行解释(如您在浏览器的地址栏中看到的),而不是相对于它们在服务器磁盘文件系统中的物理位置。是必须通过HTTP请求下载它们的Web浏览器,而不是必须以某种方式从磁盘包含它们的Web服务器。
一种方法是对这些资源使用相对于域的路径,即以开头/
。您可以${pageContext.request.contextPath}
用来动态内联当前Web应用程序的上下文路径。
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/styles.css">
这将最终出现在生成的HTML输出中,如下所示:
<link rel="stylesheet" href="/yourContextPath/css/styles.css">
这样,浏览器将能够正确下载它们。
asp.net – 远程连接到WebDev.WebServer.exe
>运行IE8.
>需要在IE6下测试网站.
>由IE8安装破坏的MultipleIE6安装(不能输入文本框,是的,我删除缓存,我重新注册了dll的).
>创建运行IE6的VPC.
>无法连接到主机WebDev.WebServer.exe.
有没有办法配置WebDev.WebServer.exe,以便它将接受远程连接?
解决方法
示例配置:
>配置privoxy以监听IP
可以从您的VM路由的地址
(例如192.168.1.1:8118).您可以在主机操作系统的looback上放置IP地址,并与客户端操作系统一起使用NAT.
>在虚拟机中配置您的浏览器以使用
192.168.1.1:8118代表所有连接,包括localhost.
>在webdev.webserver中启动你的应用程序
>使用您的VM浏览器访问与主机操作系统上的浏览器相同的URL(例如http:// localhost:3254)
从webdev.webserver的角度来看,请求将来自于127.0.0.1上的privoxy,并将乐意为他们提供服务.
UPDATE这几天,我正在使用fiddler2. fiddler在Tools>中有一个选项选项>连接到“允许远程计算机连接”.但也要注意,IISExpress可以配置为接受远程连接.
Crytal reports水晶报表在Spring boot web项目中的使用, 无需web.xml文件, 无jsp文件
使用jsp页面显示水晶报表还是存在这样的问题:
1. 配置麻烦。
-
水晶报表自身的网页版crytalviewer显示内容存在失真,和实际的不一致。
-
水晶报表的XML文件配置不正确导致无法加载报表文件,难以排除问题。
以下方法可以更加简单的在Spring boot 项目中使用Crytal reports.
在src\main\resources
下创建lib文件夹,并在通过build path
->Add Extern Achives
将水晶报表的依赖库加入到项目中。
此方法管理的lib发布时会出现找不到包的问题,需要使用maven的方式引用,可参考maven项目引用外部jar包的方法
总共有24个jar包, 逐个添加很麻烦, 现将它们列出来, 方便大家复制
<dependency>
<groupId>SAP</groupId>
<artifactId>AzleaUflBarcode</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/com.azalea.ufl.barcode.1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>CommonsCollections</artifactId>
<version>3.1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/commons-collections-3.1.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>CommonsConfiguration</artifactId>
<version>1.2.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/commons-configuration-1.2.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>CommonsLang</artifactId>
<version>2.1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/commons-lang-2.1.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>CommonsLogging</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/commons-logging.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>CrystalCommon2</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/CrystalCommon2.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>CrystalReportsRuntime</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/CrystalReportsRuntime.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>cvom</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/cvom.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>DatabaseConnectors</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/DatabaseConnectors.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>derby</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/derby.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>icu4j</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/icu4j.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>JaiImageio</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/jai_imageio.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>JDBInterface</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/JDBInterface.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>jrcerom</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/jrcerom.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>keycodeDecoder</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/keycodeDecoder.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>log4j</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/log4j.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>logging</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/logging.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>pfjgraphics</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/pfjgraphics.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>QueryBuilder</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/QueryBuilder.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>SapComTcSecCsi</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/sap.com~tc~sec~csi.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>WebreportingJsf</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/webreporting-jsf.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>webreporting</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/webreporting.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>xpp3</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/xpp3.jar</systemPath>
</dependency>
<dependency>
<groupId>SAP</groupId>
<artifactId>Xtreme</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/Xtreme.jar</systemPath>
</dependency>
使用CR4E (Crytal Reports for Eclipse) 提供的CRJavaHelper
灵活操作报表,例如直接用PDF文件预览,以及导出PDF,Word等操作。
使用@RestContorller
创建控制器,设置RequestMapper
, 使用绝对路径加载报表即可
@RestController
public class ReportPOController {
@GetMapping("/Report/PO/showPdf")
public void showPdf()
throws ReportSDKExceptionBase, IOException {
ReportClientDocument reportClientDocument = new ReportClientDocument();
reportClientDocument.open("reports/ReportPO.rpt", 0);
// This will be used by the viewer to display the desired report. True to
// Download this report.
CRJavaHelper.exportPDF(reportClientDocument, response, false);
}
@GetMapping("/Report/PO/exportPdf")
public void exportPdf() throws ReportSDKExceptionBase, IOException {
ReportClientDocument reportClientDocument = new ReportClientDocument();
reportClientDocument.open("reports/ReportPO.rpt", 0);
// This will be used by the viewer to display the desired report. True to
// Download this report.
CRJavaHelper.exportPDF(reportClientDocument, response, true);
}
}
注意:我的项目中, 我在src/main/resource
下创建了一个reports
文件夹,所以上面的报表绝对路径为reports/ReportPO.rpt
,
无需tld标签定义文件, 无需xml配置文件,也不需要加载jsp支持。
HTML – 如何将我的CSS连接到存储在WEB-INF文件夹中的JSP文件?的Websphere/JSP
<link rel="stylesheet" href = "css/styles.css">
我没有运气让我的CSS显示……
我错过了什么?
解决方法
其中一种方法是为这些资源使用域相对路径,即以/开头.您可以使用${pageContext.request.contextpath}动态内联当前webapp的上下文路径.
<link rel="stylesheet" href="${pageContext.request.contextpath}/css/styles.css">
这将最终生成的HTML输出如下:
<link rel="stylesheet" href="/yourcontextpath/css/styles.css">
这样浏览器就可以正确下载它们.
也可以看看:
> Browser can’t access/find relative resources like CSS,images and links when calling a Servlet which forwards to a JSP
IBM WebSphere Application Server 暴露JSP文件内容_MySQL
IBMWebSphere
涉及程序:
IBM WebSphere Application Server 3.0.2及更低版本
描述:
IBM WebSphere Application Server 暴露JSP文件内容
详细:
Java Server Pages (JSP)类型的文件是以''.jsp''扩展名在WebSphere Application Serve 上注册,WebSphere 是文件名大小写敏感的,''.jsp''和''.JSP''是不同类型的文件扩展名。如果提交有''.JSP''的链接给WebSphere,而WebSphere找不到''.JSP''就会以默认的''.text''文件类型来响应请求。因为在NT系统中大小写文件名是非敏感的,所以被请求的文件会以文本的形式送出。
如果在UNIX服务器上会出现"file not found"的错误信息。
解决方案:
点击此处下载补丁
相关站点:
http://www-4.ibm.com/software/webservers/appserv/efix.html
今天的关于如何将CSS连接到WEB-INF文件夹中存储的JSP文件?Websphere / JSP和怎么将css文件链接到html的分享已经结束,谢谢您的关注,如果想了解更多关于asp.net – 远程连接到WebDev.WebServer.exe、Crytal reports水晶报表在Spring boot web项目中的使用, 无需web.xml文件, 无jsp文件、HTML – 如何将我的CSS连接到存储在WEB-INF文件夹中的JSP文件?的Websphere/JSP、IBM WebSphere Application Server 暴露JSP文件内容_MySQL的相关知识,请在本站进行查询。
本文标签: