Problems with a struts app

Hi,

I have done this simple login web app with Struts, with LoginAction, LoginForm and three JSP pages, login.jsp, success.jsp and failure.jsp. It's from a tutorial found here: http://www.roseindia.net/struts/struts-login-form.shtml

I have this in my web.xml:

<servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

....

<servlet-name>action</servlet-name>

<url-pattern>*.do</url-pattern>

.............

The app is deployed on Tomcat 6 on another computer, and when I type in:

http://ipadress:8080/StrutsLogin2

I get: The requested resource (/StrutsLogin2/) is not available.

If I type: http://ipadress:8080/StrutsLogin2/login.do

I get the success.jsp page saying: "Hi null"

StrutsLogin2 is the project name.

Help please,

Matt

[927 byte] By [javaExceptiona] at [2007-11-27 8:18:20]
# 1
Do you have a welcome file defined in the web.xml?If you do have a welcome file defined in the web.xml is the file present in your application?
tolmanka at 2007-7-12 20:03:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hi,

The index.jsp is removed and my web.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<servlet>

<servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

<init-param>

<param-name>config</param-name>

<param-value>/WEB-INF/struts-config.xml</param-value>

</init-param>

<init-param>

<param-name>debug</param-name>

<param-value>3</param-value>

</init-param>

<init-param>

<param-name>detail</param-name>

<param-value>3</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet-mapping>

<servlet-name>action</servlet-name>

<url-pattern>*.do</url-pattern>

</servlet-mapping>

</web-app>

-

This:

http://192.168.1.101:8080/StrutsLogin2/login.do

gives this in the browser: HTTP Status 500 - No action instance for path /login could be created

Thanks,

Matt

javaExceptiona at 2007-7-12 20:03:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Hi Matt,I have seen that web link previously, please send me your source code, I will give you with solution.ThanksAmit Pandyaamitpandya75@gmail.com
aMiTa at 2007-7-12 20:03:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

A little correction, this:

http://192.168.1.101:8080/StrutsLogin2/login.do

will forward me directly to the success.jsp, instead of asking for user/pass. I swear this is a simple error for someone with a little more experience in struts/JSP.

Is this class, <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

found in one of the jar-files under /lib?

/Matt

javaExceptiona at 2007-7-12 20:03:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
HiPlease check your e-mail, I am sending you application with little correction.Please let me know, If you have some question,ThanksAmit Pandyaamitpandya75@gmail.com
aMiTa at 2007-7-12 20:03:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...