try the following

<package name="db" namespace="/" extends="struts-default">

instead of

<package name= "db" extends= "struts-default">

You forgot to add namespace to your "package". Hope this solves ur problem.

*Thanks and Regards,*
Muralidhar Yaragalla.
*http://yaragalla.blogspot.in/
*


On Wed, Oct 16, 2013 at 12:30 PM, Srimuralidharan S <
srimuralidhara...@dhyanit.com> wrote:

> Hi to all,
>              I'm using struts 2 framework with the following configuration
> i received the following warning and my application doesn't works
>  [Form] No configuration found for the specified action: '/' in namespace:
> ''. Form action defaulting to 'action' attribute's literal value.
>
>
> my struts.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE struts PUBLIC
>    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>    
> "http://struts.apache.org/**dtds/struts-2.0.dtd<http://struts.apache.org/dtds/struts-2.0.dtd>
> ">
> <struts>
> <constant name="struts.devMode" value="true" />
> <package name= "db" extends= "struts-default">
> <global-results>
> <result name = "failure">/error.jsp</result>
> <result name="input">/invalid.jsp</**result>
> </global-results>
> <action name ="start" method="back" class = "com.dhyan.db.DbAccess" >
> <result name= "success">/index.jsp</result>
> </action>
> <action name = "select" method="selectQuery" class =
>  "com.dhyan.db.DbAccess">
> <result name= "success">/view.jsp</result>
> <result name="no-data">/invalid2.jsp</**result>
> </action>
> <action name="databasetrigger" class =  "com.dhyan.db.DbAccess">
> <result name = "success">/inserted.jsp</**result>
> </action>
> </package>
> </struts>
>
>
>
> my index.jsp
> <%@ page language="java" contentType="text/html; charset=UTF-8"
>     pageEncoding="UTF-8"%>
> <%@ taglib prefix = "st" uri = "/struts-tags" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
> http://www.w3.org/TR/html4/**loose.dtd<http://www.w3.org/TR/html4/loose.dtd>
> ">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> <title>Database Access</title>
> </head>
> <body>
> <st:form>
> <st:div>
> <st:textfield name="no" label="Employee ID" value="" />
> <st:textfield name= "name" label="Employee Name" />
> <st:submit value="insert" align="center" action="databasetrigger"/>
> <st:submit value="view" align="center" action = "select"/>
> </st:div>
> </st:form>
> </body>
> </html>
>
>
>
>
> my web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app 
> xmlns:xsi="http://www.w3.org/**2001/XMLSchema-instance<http://www.w3.org/2001/XMLSchema-instance>"
> xmlns="http://java.sun.com/**xml/ns/javaee<http://java.sun.com/xml/ns/javaee>"
> xmlns:web="http://java.sun.**com/xml/ns/javaee/web-app_2_5.**xsd<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>
> http://java.sun.com/xml/ns/**javaee/web-app_2_5.xsd<http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd>"
> id="WebApp_ID" version="2.5">
> <display-name>dbcon</display-**name>
> <welcome-file-list>
> <welcome-file>index.jsp</**welcome-file>
> </welcome-file-list>
>
> <filter>
> <filter-name>struts2</filter-**name>
> <filter-class>org.apache.**struts2.dispatcher.**FilterDispatcher</filter-*
> *class>
> </filter>
>
> <filter-mapping>
> <filter-name>struts2</filter-**name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> </web-app>
>
>
> Please help me in to overcome this problem
> --
> Regards,
> Srimuralidharan.S
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> user-unsubscribe@struts.**apache.org<user-unsubscr...@struts.apache.org>
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to