struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Claude Dauphin <jc.daup...@gmail.com>
Subject Re: Any experience deploying Struts2 war webapps in Jetty 9.2.x
Date Tue, 07 Oct 2014 09:59:25 GMT
Łukasz,

Clicking http://localhost:8080/Web-JISIS3/doSelectDatabase.action, I
finally got the Login screen

everything is working fine after.

However, http://localhost:8080/Web-JISIS3/doLogin.action doesn't work and
gives:

HTTP ERROR 404

Problem accessing /Web-JISIS3/doLogin.action. Reason:

    No result defined for action jisis.login.LoginAction and result exception

------------------------------
*Powered by Jetty://*

I may have done an error in the action definition:

  <!-- "doLogin" validates the user using action class (Login.java). -->
      <action name="doLogin" class="jisis.login.LoginAction">
         <result name="input">/jsp/login/login.jsp</result>
         <result name="error">/jsp/login/login.jsp</result>
         <!--<result name="success">/jsp/login/success.jsp</result>-->
         <result>/jsp/login/success.jsp</result>
         <!--
         <result type="chain">
            <param name="actionName">doSelectDatabase</param>
            <param name="namespace">/jisis</param>
         </result>
         -->
      </action>

Best,
JCD



On Tue, Oct 7, 2014 at 11:43 AM, Jean-Claude Dauphin <jc.dauphin@gmail.com>
wrote:

> clicking http://localhost:8080/Web-JISIS3/ gives the following error on
> the Jetty Server console:
>
> 2014-10-07 11:18:30.935:INFO:oejs.Server:main: Started @8952ms
> oct. 07, 2014 11:18:51 AM org.apache.struts2.dispatcher.Dispatcher warn
> Avertissement: Could not find action or result: /Web-JISIS3/
> There is no Action mapped for namespace [/] and action name [] associated
> with context path [/Web-JISIS3]. - [unknown location]
>         at
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
>         at
> org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
>         at
> org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
>         at
> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
>         at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:552)
>         at
> org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
>         at
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
>
> While clicking on http://localhost:8084/Web-JISIS3/ to access Tomcat
> 7.0.53 gives the right jsp Login.jsp page
>
> Here is the web.xml content:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>
>    <filter>
>       <filter-name>struts2</filter-name>
>
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
>    </filter>
>    <filter-mapping>
>       <filter-name>struts2</filter-name>
>       <url-pattern>/*</url-pattern>
>    </filter-mapping>
>
>    <session-config>
>       <session-timeout>
>             30
>       </session-timeout>
>    </session-config>
>    <welcome-file-list>
>       <welcome-file>jsp/login/login.jsp</welcome-file>
>    </welcome-file-list>
>
>    <!-- Start of SiteMesh stuff -->
>    <filter>
>       <filter-name>sitemesh</filter-name>
>
> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
>    </filter>
>
>    <filter-mapping>
>       <filter-name>sitemesh</filter-name>
>       <url-pattern>/*</url-pattern>
>       <dispatcher>REQUEST</dispatcher>
>       <dispatcher>FORWARD</dispatcher>
>       <dispatcher>INCLUDE</dispatcher>
>
>    </filter-mapping>
>
>  <!-- End of SiteMesh stuff -->
>
> </web-app>
>
>
>
> On Tue, Oct 7, 2014 at 10:31 AM, Lukasz Lenart <lukaszlenart@apache.org>
> wrote:
>
>> 2014-10-07 9:59 GMT+02:00 Jean-Claude Dauphin <jc.dauphin@gmail.com>:
>> > web.xml has a login welcome-file-list that should be the 1st page
>> displayed
>> >
>> > <welcome-file-list>
>> >       <welcome-file>jsp/login/login.jsp</welcome-file>
>> >    </welcome-file-list>
>> >
>> > You can download the war file from
>> > https://kenai.com/projects/j-isis/downloads/download/Web-JISIS3.war if
>> you
>> > have time to have a look
>> >
>> > I have probably make something wrong but I cannot figure out what
>>
>> add index.html to root with such code:
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>> <html>
>> <head>
>> <META HTTP-EQUIV="Refresh" CONTENT="0;URL=jsp/login/login.jsp">
>> </head>
>> <body>
>> <p>Loading ...</p>
>> </body>
>> </html>
>>
>> or even instead of using jsp, point it directly to .action
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> Jean-Claude Dauphin
>
> jc.dauphin@gmail.com
> jc.dauphin@afus.unesco.org
>
> http://kenai.com/projects/j-isis/
> http://www.unesco.org/isis/
> http://www.unesco.org/idams/
> http://www.greenstone.org
>



-- 
Jean-Claude Dauphin

jc.dauphin@gmail.com
jc.dauphin@afus.unesco.org

http://kenai.com/projects/j-isis/
http://www.unesco.org/isis/
http://www.unesco.org/idams/
http://www.greenstone.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message