web.xml中的Servlet配置
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>DataEntry</servlet-name>
<servlet-class>com.ctn.origin.connection.DataEntry</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DataEntry</servlet-name>
<url-pattern>/dataentry</url-pattern>
</servlet-mapping>
Javascript :
<script type="text/javascript">
function unloadEvt() {
document.location.href='/test/dataentry';
}
</script>
但是使用这个javascript不能调用我的servlet。 是否有错误?如何调用servlet?