<jsp:forward page="portal" /> 这句重定向指哪里啊
tomcat root下 有个index.jsp 里边就一句 <jsp:forward page="portal" />
问下 portal是个servlet-mapping么。对应哪里的?
我在ROOT\WEB-INF的web.xml里看到了这个 但不知道是不是。另外问下为什么要把好几个url-pattern对应的name都叫jetspeed? /portal/* 这么写又代表什么啊
<servlet-mapping>
<servlet-name>
jetspeed
</servlet-name>
<url-pattern>
/portal/*
</url-pattern>
</servlet-mapping>
web.xml内容如下:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed 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.
-->
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Jetspeed-2 Enterprise Portal</display-name>
<!-- Log4JConfigurator context-listener parameters -->
<context-param>
<param-name>log4j.config.file</param-name>
<param-value>/WEB-INF/conf/Log4j.properties</param-value>
</context-param>
<context-param>
<param-name>log4j.config.webApplicationRoot.key</param-name>
<param-value>applicationRoot</param-value>
</context-param>
<listener>
<listener-class>org.apache.jetspeed.webapp.logging.Log4JConfigurator</listener-class>
</listener>
<servlet>
<servlet-name>jetspeed</servlet-name>
<servlet-class>org.apache.jetspeed.engine.JetspeedServlet</servlet-class>
<init-param>
<param-name>properties</param-name>
<param-value>/WEB-INF/conf/jetspeed.properties</param-value>
</init-param>
<init-param>
<param-name>applicationRoot</param-name>
<param-value>webContext</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Define Velocity template compiler -->
<servlet>
<servlet-name>velocity</servlet-name>
<servlet-class>org.apache.jetspeed.velocity.JetspeedVelocityViewServlet</servlet-class>
<init-param>
<param-name>org.apache.velocity.toolbox</param-name>
<param-value>/WEB-INF/toolbox.xml</param-value>
</init-param>
<init-param>
<param-name>org.apache.velocity.properties</param-name>
<param-value>/WEB-INF/velocity.properties</param-value>
</init-param>
<init-param>
<param-name>org.apache.jetspeed.cache.size</param-name>
<param-value>50</param-value>
</init-param>
<init-param>
<param-name>org.apache.jetspeed.cache.validation.interval</param-name>
<param-value>10000</param-value>
</init-param>
<load-on-startup>10</load-on-startup>
</servlet>
<servlet>
<servlet-name>LogoutServlet</servlet-name>
<servlet-class>org.apache.jetspeed.login.LogoutServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>ManagerServlet</servlet-name>
<servlet-class>org.apache.jetspeed.manager.ManagerServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>LightweightLoginServlet</servlet-name>
<servlet-class>com.seeyon.v3x.login.LightweightLoginServlet</servlet-class>
<init-param>
<param-name>LoginAuthenticationFile</param-name>
<param-value>/WEB-INF/conf/loginAuthentication.properties</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>verifyCodeImage</servlet-name>
<servlet-class>org.apache.jetspeed.login.VerifyCodeImageServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>SSOLoginServlet</servlet-name>
<servlet-class>org.apache.jetspeed.login.SSOLoginServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>SSOEquityLoginServlet</servlet-name>
<servlet-class>org.apache.jetspeed.login.SSOEquityLoginServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>SSOLogoutServlet</servlet-name>
<servlet-class>org.apache.jetspeed.login.SSOLogoutServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>ncremotereg</servlet-name>
<servlet-class>com.seeyon.sso.servlet.RemoteRegistServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
jetspeed
</servlet-name>
<url-pattern>
/portal/*
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>
jetspeed
</servlet-name>
<url-pattern>
/portlet/*
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>
jetspeed
</servlet-name>
<url-pattern>
/jetspeed/*
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>
jetspeed
</servlet-name>
<url-pattern>
/fileserver/*
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>
jetspeed
</servlet-name>
<url-pattern>
/ajaxapi/*
</url-pattern>
</servlet-mapping>
<!-- Map *.vm files to Velocity -->
<servlet-mapping>
<servlet-name>velocity</servlet-name>
<url-pattern>*.vm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LogoutServlet</servlet-name>
<url-pattern>/login/logout</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ManagerServlet</servlet-name>
<url-pattern>/manager/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LightweightLoginServlet</servlet-name>
<url-pattern>/login/proxy</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>verifyCodeImage</servlet-name>
<url-pattern>/verifyCodeImage.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SSOLoginServlet</servlet-name>
<url-pattern>/login/sso</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SSOEquityLoginServlet</servlet-name>
<url-pattern>/login/ssoEquity</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SSOLogoutServlet</servlet-name>
<url-pattern>/login/ssologout</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ncremotereg</servlet-name>
<url-pattern>/remotereg</url-pattern>
</servlet-mapping>
<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/error.htm</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/error.htm</location>
</error-page>
<!-- JNDI Db resource -->
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/A8</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
[解决办法]
所有路径中含有portal、portlet、fileserver....等等都由你的JetspeedServlet进行处理。如你URL为,http://localhost:8080/Test/protal/index.do或http://localhost:8080/Test/fileserver/fier/index.do,都会用你的JetspeedServlet进行处理。猜得不错你这个SERVLET可能是一个框架的入口。
[解决办法]
<servlet>
<servlet-name>jetspeed</servlet-name>
<servlet-class>org.apache.jetspeed.engine.JetspeedServlet</servlet-class>
<init-param>
<param-name>properties</param-name>
<param-value>/WEB-INF/conf/jetspeed.properties</param-value>
</init-param>
<init-param>
<param-name>applicationRoot</param-name>
<param-value>webContext</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>