Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Web Development
>
Web Framework
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
54
Star
506
Fork
45
smartboot开源组织
/
smart-servlet
Code
Issues
2
Pull Requests
0
Wiki
Insights
Pipelines
Service
JavaDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
初步验证可以支持Jsp的方案
Top
Backlog
#IA436C
Task
小xu中年
Opened this issue
2024-06-10 21:43
1.依旧是往pom.xml引入 ```<jsp.version>9.0.83.1</jsp.version> <dependency> <groupId>org.mortbay.jasper</groupId> <artifactId>apache-jsp</artifactId> <version>${jsp.version}</version> </dependency> ``` 2.在resources/META-INF/services添加 javax.el.ExpressionFactory 文件内容:org.apache.el.ExpressionFactoryImpl javax.servlet.ServletContainerInitializer 文件内容:org.apache.jasper.servlet.JasperInitializer web-fragment.xml 文件内容: ``` <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <web-fragment xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-fragment_4_0.xsd" version="4.0" metadata-complete="true"> <name>org_apache_jasper_el</name> <distributable/> </web-fragment> <web-fragment xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-fragment_6_1.xsd" version="6.1" metadata-complete="true"> <name>org_apache_jasper</name> <distributable/> </web-fragment> ``` 3.在smart_web.xml文件中添加 ``` <servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>fork</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>xpoweredBy</param-name> <param-value>false</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jsp</url-pattern> <url-pattern>*.jspx</url-pattern> </servlet-mapping> ```
1.依旧是往pom.xml引入 ```<jsp.version>9.0.83.1</jsp.version> <dependency> <groupId>org.mortbay.jasper</groupId> <artifactId>apache-jsp</artifactId> <version>${jsp.version}</version> </dependency> ``` 2.在resources/META-INF/services添加 javax.el.ExpressionFactory 文件内容:org.apache.el.ExpressionFactoryImpl javax.servlet.ServletContainerInitializer 文件内容:org.apache.jasper.servlet.JasperInitializer web-fragment.xml 文件内容: ``` <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <web-fragment xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-fragment_4_0.xsd" version="4.0" metadata-complete="true"> <name>org_apache_jasper_el</name> <distributable/> </web-fragment> <web-fragment xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-fragment_6_1.xsd" version="6.1" metadata-complete="true"> <name>org_apache_jasper</name> <distributable/> </web-fragment> ``` 3.在smart_web.xml文件中添加 ``` <servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>fork</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>xpoweredBy</param-name> <param-value>false</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jsp</url-pattern> <url-pattern>*.jspx</url-pattern> </servlet-mapping> ```
Comments (
2
)
Sign in
to comment
Status
Backlog
Backlog
Doing
Done
Canceled
Assignees
Not set
Labels
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (1)
Tags (2)
master
v3.0
v.0.1.0
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(1)
Java
1
https://gitee.com/smartboot-x/smart-servlet.git
git@gitee.com:smartboot-x/smart-servlet.git
smartboot-x
smart-servlet
smart-servlet
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register