【发布时间】:2023-03-06 01:27:01
【问题描述】:
在配置我的服务器以使用 jndi 后,每次我部署我都会得到 405,当访问我的项目的 jsp 时,所有包含和资源都标记为 405、css、javascript,我不知道会发生什么添加 server.xml
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
<Resource auth="Container"
driverClassName="oracle.jdbc.OracleDriver"
maxActive="120"
maxIdle="10"
maxWait="5000"
name="jdbc/abc"
password=""
poolPreparedStatements="true"
type="javax.sql.DataSource"
url=""
username=""/>
</GlobalNamingResources>
<Context docBase="abc" path="/abc" reloadable="true" source="org.eclipse.jst.jee.server:abc"/></Host>
</Engine>
</Service>
</Server>
我的配置有什么错误吗?我能想到的另一件事是,我在默认包中有一个 java 类来测试与我的服务器的连接性,尽管我已经删除了它。
【问题讨论】: