我在用Eclipse+ Lomboz开发JSP的时候,
最初建立的index.jsp页用Run on Server运行正常,
但在我建立了一个LoginConfirm的servlet之后,
把握的jsp页用Run on Server运行,
得到的url中间加入了一个\LoginConfirm.
从前是http://localhost:8080/iri/index.jsp,
变成了http://localhost:8080/irip/LoginConfirm/index.jsp,
手动使用原url可以正常运行。百思不得其解,
请各位大虾看在党国的份上,
拉兄弟一把。
最初建立的index.jsp页用Run on Server运行正常,
但在我建立了一个LoginConfirm的servlet之后,
把握的jsp页用Run on Server运行,
得到的url中间加入了一个\LoginConfirm.
从前是http://localhost:8080/iri/index.jsp,
变成了http://localhost:8080/irip/LoginConfirm/index.jsp,
手动使用原url可以正常运行。百思不得其解,
请各位大虾看在党国的份上,
拉兄弟一把。
- <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>irip</display-name>
- <servlet>
<description>Check the password & the user type & redirect</description>
<display-name>LoginConfirm</display-name>
<servlet-name>LoginConfirm</servlet-name>
<servlet-class>servlet.LoginConfirm</servlet-class>
</servlet>- <servlet-mapping>
<servlet-name>LoginConfirm</servlet-name>
<url-pattern>/LoginConfirm</url-pattern>
</servlet-mapping>- <welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
难道我要把我的jsp页放在这样的子目录下?
那我还要写别的Servelet,又要怎么办呢。