I am attempting to learn struts and have run into a problem. So here is the long and short of it:
The problem I am running into is I click the JSP submit button
The appropriate action is called.
The action jumps into the java classes and creates an appropriate response.
The response is returned to the action.
The action sets the ActionForm result to null, when the response was not originally null.
So my best guess so far is that I have mucked up the configuration somehow when I created a second action type or the web xml action mapping is incorrect. So can anyone tell me what is incorrect?
struts-config.xml
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<form-beans>
<form-bean name="searchForm" type="com.agreen.struts.test.SearchForm" />
<form-bean name="addForm" type="com.agreen.struts.test.AddEmployeeForm" />
</form-beans>
<global-forwards>
<forward name="search" path="/search.jsp" redirect="false" />
<forward name="addEmployee" path="/addEmployee.jsp" redirect="false" />
</global-forwards>
<action-mappings>
<action path="/search"
type="com.agreen.struts.test.SearchAction"
name="searchForm"
scope="request"
validate="true"
input="/search.jsp"></action>
<action path="/addEmployee"
type="com.agreen.struts.test.AddEmployeeAction"
name="addForm"
scope="request"
validate="true"
input="/addEmployee.jsp"></action>
</action-mappings>
<message-resources parameter="MessageResources" />
</struts-config>
web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<!-- Action Servlet Configuration-->
<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>
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Related
I have following:
web.xml:
<web-app...>
<servlet>
<servlet-name>Jersey Web Application</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey Web Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<resource-ref>
<res-ref-name>datasource.mceAPPDb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
</web-app>
glassfish-resource.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
<resources>
<jdbc-connection-pool name="app_emailverification"
res-type="javax.sql.DataSource"
datasource-classname="oracle.jdbc.pool.OracleDataSource"
pool-resize-quantity="2"
max-pool-size="32"
steady-pool-size="8">
<property name="URL" value="jdbc:oracle:thin:#localhost:1522:MCE0_D1"/>
<property name="user" value="app_emailverification"/>
<property name="datasourceName" value="OracleDataSource"/>
<property name="serverName" value="localhost"/>
<property name="password" value="app_emailverification"/>
</jdbc-connection-pool>
<jdbc-resource enabled="true" jndi-name="datasource.mceAPPDb" object-type="user" pool-name="app_emailverification">
<description>Test DataSource jdbc/testDS for Connection Pool jdbc/testConnPool</description>
</jdbc-resource>
</resources>
and persistence.xml:
<persistence-unit name="mceapp-app-database-model"
transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>datasource.mceAPPDb</jta-data-source>
...
</persistence-unit>
</persistence>
But when i try to deploy the war in payara server gui....i get an error :
SEVERE: java.lang.RuntimeException: Invalid resource :datasource.mceAPPDb
Whats wrong woth this setup ????
I've created a simple JAX-RS resource class for my Java EE based project. I am trying to get a response back from the server but when I access my url I get an error back. This is the class that I wrote:
#Path("/rest")
public class RestResource {
#GET
#Produces(MediaType.APPLICATION_JSON)
public String create(String name)
{
return "print my string";
}
}
I cannot figure out what I'm doing wrong.
Do I have to define a new servlet in my web.xml? Is there something wrong with my current one?
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
metadata-complete="false">
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<display-name>crud-app</display-name>
<!-- Activate the JSF 2.0 servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Tell the context which URLs to send through JSF -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<!-- This is an optional parameter, but it makes troubleshooting errors
much easier -->
<!-- You are advised to remove this context parameter before a production
deployment -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!-- Welcome page -->
<welcome-file-list>
<welcome-file>person.jsf</welcome-file>
</welcome-file-list>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/ui/error/error.jsf</location>
</error-page>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/ui/error/viewExpired.jsf</location>
</error-page>
</web-app>
I managed to fix my problem by using RESTEasy. Here is my updated web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
metadata-complete="false">
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<display-name>crud-app</display-name>
<!-- Activate the JSF 2.0 servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Tell the context which URLs to send through JSF -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<!-- Auto scan REST service -->
<context-param>
<param-name>resteasy.scan</param-name>
<param-value>true</param-value>
</context-param>
<!-- this need same with resteasy servlet url-pattern -->
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/rest</param-value>
</context-param>
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
<servlet>
<servlet-name>resteasy-servlet</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>resteasy-servlet</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
<!-- This is an optional parameter, but it makes troubleshooting errors
much easier -->
<!-- You are advised to remove this context parameter before a production
deployment -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!-- Welcome page -->
<welcome-file-list>
<welcome-file>person.jsf</welcome-file>
</welcome-file-list>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/ui/error/error.jsf</location>
</error-page>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/ui/error/viewExpired.jsf</location>
</error-page>
</web-app>
I am using the following filter in the web.xml of my application, with it I am able to get authentication over java melody page.
How can I integrate this authentication with LDAP? When I login at localhost:8080/application/monitoring, it will ask credentials and they should be validated against LDAP.
Is it possible to achieve this?
<filter>
<filter-name>monitoring</filter-name>
<filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
<init-param>
<param-name>allowed-addr-pattern</param-name>
<param-value>10\.10\.10\..*|10\.10\.10\.10|10\.10\.10\..*</param-value>
</init-param>
<init-param>
<param-name>authorized-users</param-name>
<param-value>user1:pwd1, user2:pwd2</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>monitoring</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>net.bull.javamelody.SessionListener</listener-class>
</listener>
The following is the configuration that needs to be done in web.xml and
1.server.xml in case of tomcat
2.jetty.xml in case of jetty
web.xml code:
==============
<filter>
<filter-name>monitoring</filter-name>
<filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
<init-param>
<param-name>allowed-addr-pattern</param-name>
<param-value>127.0.0.1</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>monitoring</filter-name>
<url-pattern>/monitoring</url-pattern>
</filter-mapping>
<listener>
<listener-class>net.bull.javamelody.SessionListener</listener-class>
</listener>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Monitoring</realm-name>
</login-config>
<security-role>
<role-name>tomcat</role-name>
</security-role>
<security-constraint>
<web-resource-collection>
<web-resource-name>Monitoring</web-resource-name>
<url-pattern>/monitoring</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>tomcat</role-name>
</auth-constraint>
<!-- if SSL enabled (SSL and certificate must then be configured in the
server) <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint> -->
</security-constraint>
In Tomcat:
===========
Add the following realm in tomcat_home/conf/server.xml
=======================================================
<Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
connectionURL="ldap://ldapip:ldapport/" userSubtree="true"
userBase="ou=xyz,dc=abc,dc=com" userSearch="(uid={0})"
roleBase="ou=Group,dc=abc,dc=com" roleName="cn"
roleSearch="(memberUid={0})" roleSubtree="true"/>
In Jetty:
===========
Add this code in jetty.xml
<Configure id='wac' class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/abc</Set>
<Set name="war"><Property name="jetty.webapps" default="."/>/abc.war</Set>
<Set name="extractWAR">true</Set>
<Set name="securityHandler">
<New class="org.eclipse.jetty.security.ConstraintSecurityHandler">
<Set name="loginService">
<New class="org.eclipse.jetty.jaas.JAASLoginService">
<Set name="name">Monitoring</Set>
<Set name="loginModuleName">ldaploginmodule</Set>
</New>
</Set>
</New>
</Set>
</Configure>
create a file login.conf file in etc folder of jetty_base directory:
ldaploginmodule {
org.eclipse.jetty.jaas.spi.LdapLoginModule required
debug="true"
contextFactory="com.sun.jndi.ldap.LdapCtxFactory"
hostname="ldapip"
port="ldapport"
authenticationmenthod="simple"
forceBindingLogin="true"
userBaseDn="ou=People,dc=abc,dc=com"
userRdnAttribute="uid"
userIdAttribute="uid"
userObjectClass="posixAccount"
roleBaseDn="ou=Group,dc=abc,dc=com"
roleNameAttribute="cn"
roleMemberAttribute="memberUid"
roleObjectClass="posixGroup";
};
i want to write login page in Osgi-karaf.
My login.xhtml is ;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>JSF 2.0 Hello World_denememememe</title>
</h:head>
<h:body>
<h3>JSF 2.0 Hello World Example - login.xhtml</h3>
<h:form id="formLogin" prependId="false"
onsubmit="document.getElementById('formLogin').action = 'j_security_check';">
<h:panelGrid columns="2">
<f:facet name="header">
Login
</f:facet>
<h:outputLabel for="j_username" value="Username: "/>
<h:inputText id="j_username" required="true" value="#{helloBean.name}" />
<h:outputLabel for="j_password" value="Password: "/>
<h:inputSecret id="j_password" required="true" value="#{helloBean.pass}" />
<f:facet name="footer">
<h:commandButton value="Login" action="#{helloBean.birlestir}"/>
</f:facet>
</h:panelGrid>
</h:form>
</h:body>
</html>
and my web.xml is ;
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>xhtmlDeneme</display-name>
<!-- Change to "Production" when you are ready to deploy -->
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<!-- Welcome page -->
<welcome-file-list>
<welcome-file>faces/login.xhtml</welcome-file>
</welcome-file-list>
<!-- JSF mapping -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Map these files with JSF -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>karaf</realm-name>
<form-login-config>
<form-login-page>/faces/login.xhtml</form-login-page>
<form-error-page>/faces/login.xhtml</form-error-page>
</form-login-config>
</login-config>
I'm using karaf. I know when karaf is seen "j_security_check", it look "ldap-module.xml". And here is my ldap-module.xml ;
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
<jaas:config name="karaf" rank="1">
<jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule"
flags="required">
initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
connection.username=--valid username--
connection.password=--valid password--
connection.protocol=
connection.url=--valid url--
user.base.dn=cn=Users,dc=vmldapdevelop,dc=com
user.filter=(cn=%u)
user.search.subtree=true
role.base.dn=cn=Groups,dc=vmldapdevelop,dc=com
role.name.attribute=cn
role.filter=(uniquemember=%nsdn)
role.search.subtree=true
authentication=simple
</jaas:module>
</jaas:config>
</blueprint>
I try everything almost, but i don't change this error! When i delete from login.xhtml "j_security_check" part, its working.
Anybody help me?
I am using spring source dm server version 2.0.0.
I developed one application in spring/struts/hibernate. When I am running my application in spring dm server with
it gives me error like:
HTTP Status 503 - Servlet action is currently unavailable
type: Status report
message: Servlet action is currently unavailable
description: The requested service (Servlet action is currently unavailable) is not currently available.
My web.xml:
<?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"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<!-- Action Servlet Configuration -->
<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>2</load-on-startup>
</servlet>
<!-- Spring Framework context Loader -->
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>
org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Spring Framework context config location -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext*.xml
</param-value>
</context-param>
<!--TODO Prevent direct calls to *.jsp -->
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>start.jsp</welcome-file>
</welcome-file-list>
<!-- Define the basename for a resource bundle for I18N -->
<context-param>
<param-name>
javax.servlet.jsp.jstl.fmt.localizationContext
</param-name>
<param-value>
com.patni.temgt.web.ApplicationResources
</param-value>
</context-param>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/SettleTest</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
and struts-config.xml is:
<form-beans>
<form-bean name="timeEntryForm"
type="com.patni.temgt.web.CreateTimeEntryActionForm" />
<form-bean name="expenseEntryForm"
type="com.patni.temgt.web.CreateExpenseEntryActionForm" />
<form-bean name="timeEntryReportForm"
type="com.patni.temgt.web.TimeEntryReportActionForm" />
<form-bean name="adminCostingCodeForm"
type="com.patni.temgt.web.AdminCostingCodeActionForm" />
<form-bean name="loginForm"
type="com.patni.temgt.web.LoginActionForm" />
<form-bean name="adminEnvironmentVariableForm"
type="com.patni.temgt.web.AdminEnvironmentVariableActionForm" />
<form-bean name="adminEmployeeForm"
type="com.patni.temgt.web.AdminEmployeeActionForm" />
<form-bean name="adminContactDetailForm"
type="com.patni.temgt.web.AdminContactDetailActionForm" />
<form-bean name="adminApplicationUserForm"
type="com.patni.temgt.web.AdminApplicationUserActionForm" />
<form-bean name="adminUserRoleForm"
type="com.patni.temgt.web.AdminUserRoleActionForm" />
<form-bean name="myCostingCodeForm"
type="com.patni.temgt.web.MyCostingCodeActionForm" />
</form-beans>
<global-forwards>
<forward name="login" path="/WEB-INF/jsp/login.jsp" />
</global-forwards>
<action-mappings>
<action path="/timeEntry"
type="com.patni.temgt.web.CreateTimeEntryAction"
name="timeEntryForm" scope="session" validate="false"
input="/WEB-INF/jsp/timeEntry.jsp">
<forward name="success" path="/WEB-INF/jsp/timeEntry.jsp" />
<forward name="invalid" path="/WEB-INF/jsp/timeEntry.jsp" />
</action>
<action path="/expenseEntry"
type="com.patni.temgt.web.CreateExpenseEntryAction"
name="expenseEntryForm" scope="session" validate="false"
input="/WEB-INF/jsp/expenseEntry.jsp">
<forward name="success" path="/WEB-INF/jsp/expenseEntry.jsp" />
<forward name="invalid" path="/WEB-INF/jsp/expenseEntry.jsp" />
<forward name="list" path="/WEB-INF/jsp/expenseList.jsp" />
<forward name="approvallist" path="/expenseApproval.htm?action=list" redirect="true" />
</action>
<action path="/expenseApproval"
type="com.patni.temgt.web.ExpenseApprovalAction"
name="expenseEntryForm" scope="session" validate="false"
input="/WEB-INF/jsp/expenseApprovalList.jsp">
<forward name="approvallist" path="/WEB-INF/jsp/expenseApprovalList.jsp" />
</action>
<action path="/adminCostingCode"
type="com.patni.temgt.web.AdminCostingCodeAction"
name="adminCostingCodeForm" scope="session" validate="false"
input="/WEB-INF/jsp/adminCostingCode.jsp">
<forward name="success" path="/WEB-INF/jsp/adminCostingCode.jsp" />
<forward name="invalid" path="/WEB-INF/jsp/adminCostingCode.jsp" />
</action>
<action path="/login"
type="com.patni.temgt.web.LoginAction"
name="loginForm" scope="session" validate="false"
input="/WEB-INF/jsp/login.jsp">
<forward name="mainPage" redirect="true"
path="/settleMain.htm" />
</action>
<action path="/settleMain"
type="com.patni.temgt.web.SettleMainAction">
<forward name="success" path="/WEB-INF/jsp/settleMain.jsp" />
</action>
<action path="/adminEnvironmentVariable"
type="com.patni.temgt.web.AdminEnvironmentVariableAction"
name="adminEnvironmentVariableForm" scope="session"
input="/WEB-INF/jsp/adminEnvironmentVariable.jsp">
<forward name="success"
path="/WEB-INF/jsp/adminEnvironmentVariable.jsp" />
<forward name="invalid"
path="/WEB-INF/jsp/adminEnvironmentVariable.jsp" />
</action>
<action path="/adminEmployee"
type="com.patni.temgt.web.AdminEmployeeAction"
name="adminEmployeeForm" scope="request"
input="/WEB-INF/jsp/adminEmployee.jsp">
<forward name="success" path="/WEB-INF/jsp/adminEmployee.jsp" />
<forward name="invalid" path="/WEB-INF/jsp/adminEmployee.jsp" />
</action>
<action path="/adminContactDetail"
type="com.patni.temgt.web.AdminContactDetailAction"
name="adminContactDetailForm" scope="request"
input="/WEB-INF/jsp/adminContactDetail.jsp">
<forward name="employee" path="/adminEmployee.htm" />
<forward name="company" path="/adminCompany.htm" />
<forward name="success" path="/WEB-INF/jsp/adminContactDetail.jsp" />
<forward name="invalid" path="/WEB-INF/jsp/adminContactDetail.jsp" />
</action>
<action path="/adminApplicationUser"
type="com.patni.temgt.web.AdminApplicationUserAction"
name="adminApplicationUserForm" scope="request"
input="/WEB-INF/jsp/adminApplicationUser.jsp">
<forward name="success" path="/WEB-INF/jsp/adminApplicationUser.jsp" />
<forward name="invalid" path="/WEB-INF/jsp/adminApplicationUser.jsp" />
</action>
<action path="/adminUserRole"
type="com.patni.temgt.web.AdminUserRoleAction"
name="adminUserRoleForm" scope="request"
input="/WEB-INF/jsp/adminUserRole.jsp">
<forward name="success" path="/WEB-INF/jsp/adminUserRole.jsp" />
<forward name="invalid" path="/WEB-INF/jsp/adminUserRole.jsp" />
</action>
<action path="/timeEntryReporting"
type="com.patni.temgt.web.TimeEntryReportAction"
name="timeEntryReportForm" scope="request"
input="/WEB-INF/jsp/timeEntryReporting.jsp">
<forward name="success" path="/WEB-INF/jsp/timeEntryReporting.jsp" />
<forward name="invalid" path="/WEB-INF/jsp/timeEntryReporting.jsp" />
</action>
<action path="/myCostingCodes"
type="com.patni.temgt.web.MyCostingCodeAction"
name="myCostingCodeForm" scope="request"
input="/WEB-INF/jsp/myCostingCodes.jsp" parameter="method">
<forward name="success" path="/WEB-INF/jsp/myCostingCodes.jsp" />
<forward name="invalid" path="/WEB-INF/jsp/myCostingCodes.jsp" />
</action>
</action-mappings>
<controller>
<set-property property="processorClass"
value="org.springframework.web.struts.DelegatingRequestProcessor" />
</controller>
<!-- ========== Message Resources Definitions =========================== -->
<!-- Will look for a properties file
com.patni.temgt.web.ApplicationResources.properties" -->
<message-resources
parameter="com.patni.temgt.web.ApplicationResources" />
<!-- Start the Spring Web Context plugin for Struts -->
<plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/action-servlet.xml" />
</plug-in>
what could be the reason for this?
It means that the servlet identified by "action" (org.apache.struts.action.ActionServlet) failed to initialize, probably due to a configuration issue or a missing class on the class path.
There should be an exception printed in the console of your application server or in a log file. It probably will indicate what the problem is.