You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Keith Wong <kw...@dominocomp.com> on 2002/07/11 02:53:04 UTC
Path question HELP!!!
Hi all,
I'm newbie on struts and I am getting problem on URL path problem, any help will be appreciated.
I am trying to creating a seperate directory on old app. and try to bring struts in. The old app. URL is www.myapp.com/apps and the new one I like to create is www.myapp.com/apps/admin, will be using struts under this directory. For sure, I config struts in wrong one and I am getting the error from Tomcat :
Here are some of code and config file:
in login.jsp:
<html:base/>
<html:form action="/login" focus="username">
in web.xml
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/apps/admin/*</url-pattern>
</servlet-mapping>
in struts-config.xml
<action path="/login"
type="com.myapp.admin.LoginAction"
name="loginForm"
scope="request"
input="/admin/login.jsp"
validate="true" >
<forward name="success" path="/admin/mainAdmin.jsp" redirect="true"/>
<forward name="failure" path="/admin/login.jsp"/>
</action>
here is login.jsp generated by struts:
<base href="http://localhost/apps/admin/login.jsp">
<form name="loginForm" method="POST" action="/apps/apps/admin/login">
after I submit the user and password then i am getting this error.....
type Status report
message /admin/login.jsp
description The requested resource (/admin/login.jsp) is not available.
Thx,
Keith Wong