struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samanth Athrey" <samanth.ath...@azikewe.com>
Subject newbie question!
Date Mon, 28 Jul 2003 05:34:56 GMT
Hello,

This question probably might have been asked many a times. But I searched
the archive (though not fully) but could not find this. So, if anybody has a
solution please do let me know.

I have developed a sample application, which takes in an input and based on
that displays either a success page or failure page. The problem am facing
is the servlet is not being called. Below is the sturts.config.xml, b.xml
and index.jsp. Am using jdk1.4.0 and tomcat 4.1.12.

The java class files are under WEB-INF\classes\myapp package.

Thanx for you help.

========== index.jsp
<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html>
 <head>
  <title> \First Struts Application</title>
 </head>
<body>

<html:form action="/Lookup"
 name="lookupForm"
 type="myapp.LookupForm">
 Symbol &nbsp &nbsp
  <html:text  property="symbol"  />
  <br>
  <br>
   <html:submit/>
</html:form>
</body>
</html>
==================================

============= web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">

<web-app>
<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>
 <load-on-startup>1</load-on-startup>
</servlet>


<!-- Standard Action Servlet Mapping-->
<servlet-mapping>
 <servlet-name>action</servlet-name>
 <url-pattern>*.do</url-pattern>
</servlet-mapping>

<taglib>
 <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
 <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>

</web-app>

================

============== struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config
PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>

<message-resources
 parameter="myapp.ApplicationResources"/>

<form-beans>
 <form-bean name="lookupForm" type="myapp.LookupForm"/>
</form-beans>

<action-mappings>
 <action  path="/Lookup"
  name="lookupForm"
  type="myapp.LookupAction"
  input="/index.jsp">

  <forward name ="success" path="/quote.jsp"/>
  <forward name="failure" path ="/index.jsp"/>

 </action>
</action-mappings>

</struts-config>

========================


--
Regards,
Samanth Athrey,
Azikewe Systems,
www.azikewe.com




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message