struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Delgado Trujillo <jadt...@gmail.com>
Subject Re: Annotation example
Date Mon, 09 Nov 2015 19:00:18 GMT
I don`t know what is the problem.
It’s the example annotations of Getting Started Tutorial.

https://github.com/apache/struts-examples/tree/master/annotations <https://github.com/apache/struts-examples/tree/master/annotations>


Convention plugin is set enable with maven dependency.
all jsp are into /WEB-INF/content folder
The action class are into package structure that ends in action.
The action class use the name of the action ending in Action.

The example use the url 
http:localhost:8080/annotations

There is a welcome file index.jsp into /webapp folder but these file only resend the request
to /index.jsp



And into the /WEB-INF/content is another index.jsp which has the index of the application
(in this case two link associated with two actions.



I put in the browser http://localhost/annotations <http://localhost/annotations> but
the response is
404 - NOT FOUND
and i saw in the browser the URL

Why it does´t find index.jsp

I thought reading the convention plugin documentation that…
the action index is an actionless result (has neither action class nor result) so by default
the convention plugin look into /WEB-INF/content/index.jsp

What is happening?
Why the error message NOT FOUND?


> On 09 Nov 2015, at 07:02, Lukasz Lenart <lukaszlenart@apache.org> wrote:
> 
> 2015-11-08 22:03 GMT+01:00 José Antonio Delgado Trujillo <jadtmat@gmail.com>:
>> I’ve problem with the annotation example.
>> 
>> I’ve added the convention-plugin dependency in my POM.
>> But when i put localhost:8080/annotations/index tsp the result is NOT FOUND PAGE
>> 
>> However when i copy the index.jsp in /src/main/webapp all is correct.
>> ....
>> What is happening?
> 
> but it works now, right? Not sure what was your problem, all JSP files
> should be located in /WEB-INF/content and they will be used based on
> requested action and returned result
> 
> http://struts.apache.org/docs/convention-plugin.html#ConventionPlugin-Resultsandresultcodes
> 
> 
> 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
> 


Mime
View raw message