File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts can't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts can Watch "Struts can New topic
Author

Struts can't work

Andrzej Cichon
Greenhorn

Joined: Nov 15, 2010
Posts: 9


Struts2.xml:

web.xml:

index.jsp:

name.jsp:



index.jsp works well. But when i click "submit":



console:
2010-11-15 15:01:01 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Programy\QuickTime\QTSystem\;D:\Programy\Matlab\bin;D:\Programy\Matlab\bin\win32;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\MySQL\bin
2010-11-15 15:01:01 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorldStruts' did not find a matching property.
2010-11-15 15:01:01 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:cos' did not find a matching property.
2010-11-15 15:01:01 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2010-11-15 15:01:01 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 712 ms
2010-11-15 15:01:01 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2010-11-15 15:01:01 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
2010-11-15 15:01:02 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
INFO: Parsing configuration file [struts-default.xml]
2010-11-15 15:01:02 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
INFO: Parsing configuration file [struts-plugin.xml]
2010-11-15 15:01:02 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
INFO: Parsing configuration file [struts.xml]
2010-11-15 15:01:02 org.apache.struts2.config.Settings getLocale
WARNING: Settings: Could not parse struts.locale setting, substituting default VM locale
2010-11-15 15:01:02 com.opensymphony.xwork2.util.ResolverUtil findInPackage
INFO: Scanning for classes in [/D:/Programowanie/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/cos/WEB-INF/classes/pakiety/] matching criteria: org.apache.struts2.config.ClasspathConfigurationProvider$1@e2291
2010-11-15 15:01:02 com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory <clinit>
INFO: Setting DefaultObjectTypeDeterminer as default ...
2010-11-15 15:01:02 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2010-11-15 15:01:02 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
2010-11-15 15:01:02 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/62 config=null
2010-11-15 15:01:02 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1472 ms
2010-11-15 15:02:14 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'ShowName' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-11-15 15:02:15 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'ShowName' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-11-15 15:06:33 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'ShowName' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-11-15 15:06:33 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'ShowName' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-11-15 15:15:28 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'ShowName' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-11-15 15:15:28 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'ShowName' in namespace: ''. Form action defaulting to 'action' attribute's literal value.


What is wrong ?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

Welcome to the CodeRanch.
struts.xml (and it should be named struts.xml) has to be on the classpath. The easiest way to do this in a web app is to put it in the WEB-INF/classes directory.
Struts 2 provides several example applications here that make a good template for getting started.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Andrzej Cichon
Greenhorn

Joined: Nov 15, 2010
Posts: 9
Joe Ess wrote:struts.xml (and it should be named struts.xml) has to be on the classpath. The easiest way to do this in a web app is to put it in the WEB-INF/classes directory.

Won't help. Now I have:

I renamed 'Struts2.xml' to 'Struts.xml' and I have the same problem:



2010-11-15 16:02:26 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'ShowName' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-11-15 16:02:26 org.apache.struts2.components.Form evaluateExtraParamsServletRequest
WARNING: No configuration found for the specified action: 'ShowName' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

Andrzej Cichon wrote:
I renamed 'Struts2.xml' to 'Struts.xml' and I have the same problem:


Small 's'. "struts.xml"
Again, I recommend you look at the examples provided by the Struts team.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts can't work
 
Similar Threads
Page not found
Struts2.2.3 problem
Resource not found
Struts2 struck with a issue of 404
Form action defaulting to 'action' attribute's literal value