aspose file tools*
The moose likes Struts and the fly likes struts 2 hello world error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts 2 hello world error" Watch "struts 2 hello world error" New topic
Author

struts 2 hello world error

Venu gopa
Greenhorn

Joined: May 11, 2011
Posts: 4
I am newbie to struts 2 .......my question may be naive

started working on example from http://veerasundar.com/blog/2008/11/create-struts-2-hello-world-application/

I got the error
May 12, 2011 11:15:48 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
May 12, 2011 11:15:51 AM 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\jdk1.6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\QuickTime\QTSystem\;C:\apache-ant-1.8.1/BIN;C:\WINDOWS\system32\WindowsPowerShell\v1.0;.;C:\Program Files\Java\jdk1.6\bin
May 12, 2011 11:15:51 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 12, 2011 11:15:51 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 329 ms
May 12, 2011 11:15:51 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 12, 2011 11:15:51 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
May 12, 2011 11:15:51 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
May 12, 2011 11:15:51 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
May 12, 2011 11:15:51 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive HiServlet.war
May 12, 2011 11:15:51 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive Struts2.war
May 12, 2011 11:15:52 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
INFO: Parsing configuration file [struts-default.xml]
May 12, 2011 11:15:52 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
INFO: Parsing configuration file [struts-plugin.xml]
May 12, 2011 11:15:52 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
INFO: Parsing configuration file [struts.xml]
May 12, 2011 11:15:52 AM org.apache.struts2.config.Settings getLocale
WARNING: Settings: Could not parse struts.locale setting, substituting default VM locale
May 12, 2011 11:15:52 AM com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory <clinit>
INFO: Setting DefaultObjectTypeDeterminer as default ...
May 12, 2011 11:15:52 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive StutsSample.war
May 12, 2011 11:15:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory Applet
May 12, 2011 11:15:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
May 12, 2011 11:15:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
May 12, 2011 11:15:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
May 12, 2011 11:15:53 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory Test
May 12, 2011 11:15:53 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 12, 2011 11:15:53 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 12, 2011 11:15:53 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
May 12, 2011 11:15:53 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1934 ms
pooja par
Ranch Hand

Joined: Feb 14, 2011
Posts: 31
Please stop the server and then start.
May be you just did restart without stoping
Venu gopa
Greenhorn

Joined: May 11, 2011
Posts: 4
thanks for reply...

i figured that out.......now i'm getting new error
May 13, 2011 11:55:35 AM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find action or result
There is no Action mapped for namespace / and action name Hello. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:458)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)


can you help me resolving this issue
pooja par
Ranch Hand

Joined: Feb 14, 2011
Posts: 31
It clearly says
There is no Action mapped for namespace / and action name Hello. - [unknown location]

Please check in your struts.xml whether you have a action tag with "hello"
sample struts.xml

JSP

In the above jsp I have "action="createManagerInterest" and in the striys.xml there is a matching action tag for "createManagerInterest"
So the control goes to that particular action.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts 2 hello world error