Andrea Nobili

Greenhorn
+ Follow
since Nov 08, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrea Nobili

Hello to everybody,

this is my situation. I am a junior Java developer and I am interested in Spring certifications. Searching online I only found the training course + exam solution.

The training course have a very hight price and I am asking if is it possibile study it by itself and do only the final exam. Exist this possibility or the training course is mandatory?

Someone have some experience about it and know how it work or how can I have this information?

Looking online I see many different opinion about this problem. Someone say that the training coruse is mandatory, someone else say that you can don't do the training course if you have some certified experience in Spring development, etcetc.

Can you help me to understand this thing?

Another question: some time ago I worked on a Spring MVC (that used Spring Web Flow) project (but I do very litle thing because I was very very junior). I have the basis and after this work I have explored the topic by myself. So I have the basis but I don't consider myswlf as an autonomous Spring developer (I need an architect\senior that check my work). So do you think that the training course could be something important for my professional growth (regardless of whether it is mandatory or not) or you think that I can study it by myself?

Tnx
Andrea
9 years ago
Hello to everybody,
I would present you http://scorejava.com/

This is my technical blog about Java and in particular about Spring and Spring MVC framework.

This is basically in italian language. Some tutorial are translation from some other good tutorial in english language, some other tutorial are original

I am trying to do an accurate work

If, here there are some italian developer then would give a look and say me what think about it I will be very happy !!!

Good bye

Andrea
I am quite new in the Spring MVC world and I have a doubt about the corretct creation of a Spring MVC project.

When I run an imported project (for example the Spring MVC Showcase example downlodable form the STS dashboard), inside the browser URL bar this project have an URL like: http://localhost:8080/project-name/

For example the Web MVC Showcase example have project name: "spring-mvc-showcase" and have the following URL: for example the Web MVC Showcase example have project name: "spring-mvc-showcase" and have the following URL: http://localhost:8080/spring-mvc-showcase/

Now, my doubt is related to the creation of a new Spring MVC project using Spring Template in STS\Eclipse.

I do the following operation inside STS:

File --> New --> Project and appears to me a wizard where I can chose the type of project.

So I chose Spring Template Project, now appears to me ano other wizard windows where I can chose the specific typology of Spring Project and I chose "Spring MVC Project"

Ok, now appears to me an other wizard windows in which I have to set up:
Project name and I insert: my-spring-project
Top level package and I have insert: org.mycompany.foo

Ok, now I run my project on server, this don't run and inside the URL bar of the browser I have not http://localhost:8080/my-spring-project/ (as I would expect) but I have: http://localhost:8080/foo/

In the stacktrace I have the following error message:

WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/foo/] in DispatcherServlet with name 'appServlet'

Then if I do a project clean of my project, STS rebuild the project and if I try to run it again the project run well and the URL address still remain: http://localhost:8080/foo/

I think that this is a strange behavior and I have not ideas what is the reason about it...

So:

1) Why the URL is not http://localhost:8080/my-spring-project/ but is http://localhost:8080/foo/ ?

2) Why I have to clean and rebuild my project to run it?

3) I am doing some error in the creation of a standard Spring MVC project?

I am going crazy...

Thank you very much

Andrea
11 years ago
Some days ago I begin to study this Spring Hello World Tutorial: http://viralpatel.net/blogs/spring-3-mvc-create-hello-world-application-spring-3-mvc/

In this tutorial Spring DispatcherServlet is configured using the spring-servlet.xml file, this one:



In this file I am using the context:component-scan tag to say that Spring have to scan my file serching the annotation, so for exemple, when in the controller class find that a method is annoted by @RequestMapping("/hello") annotation know that this method handle the HTTP Request toward the URL ending with "/hello". This is simple...

Now my doubt is related to the Spring MVC template project that I could automatically build in STS\Eclipse

When I create a new Spring MVC project in STS I have that my DispatcherServlet is configured by a file named servlet-context.xml that contains some configuration similar to the previus example file.

In this file, I still have the component scan tag:



but I have also another tag (that look like have similar task), this one:



What is the difference between these two tags? between these two tags?

An other "strange" thing is that the previus example (that don't use the annotation-driven tag) is very very similar to the project create by STS using the Spring MVC Template project but if I delete the annotation-driven tag from its configuration file the project don't run and give me the following error: HTTP Status 404 -

And in the stacktrace I have:

WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/maventestwebapp/] in DispatcherServlet with name 'appServlet'

But why? In the previus example work well without annotation-driven tag, and this controller class is very similar...infact have only one method that handles HTTP request toward "/" path

This is the code of my controller class:


Can someone help me to understand this thing?

Thank you very much

Andrea
11 years ago

Mark Spritzler wrote:So JQuery created it from the response it received from the server

"towards the FOLDER: /mapping/produces and not towards a .json file"

To help clear something up here. It is not a folder or a file. It is a URL. a routing path in a URL meaning the url contains the server/domain address, then the app name, then the path. If .json is ther eit is not to point to a file that ends in .json it is still just part of the URL path. It is not directories and files.

So when JQuery has its ajax method, it takes some callback functions. And it knows how to create the parameter and pass it to that callback function.

Mark



Mmm I think that now is more clear for me but it still remains quite obscure for me...I try to tell you what I understood and what I'm missing in your reasoning (Please, have patience with a newbye)

So you say me that "/mapping/produces" is not a folder but it is an URL (this one: http://localhost:8080/spring-mvc-showcase/mapping/produces ) that will be handled in some way from my controller...ok...I think that this is clear

But what exactly happens in the execution of my function? After your explanation I got the following idea:

1) The user click on the link and the callback function is execute

2) At the beginning simply put in the link variable the referer of the clicked tag (it will be used when the output message will be displayed next to this link)

3) The AJAX call function is called

4) Before send the ajax request to the server check if my called URL end with ".json", my URL don't end with ".json" so, in this case, the body of the if is not executed

5) Now the ajax request is send to the controller of the web application to be correctly handled. This request is handled by a method of my MappingController class, this one:



This method handlet GET HTTP Request towards the URL "/mapping/produces" and I think that produces=MediaType.APPLICATION_JSON_VALUE mean that create and return an object in JSON format (and this object in JSON format will be returned in the body of my HTTP Response because I have the @ResponseBody annotation for this method)

So it is created and returned a new JavaBean object.

In my package I have a JavaBean class that just creates an object with foo and fruit fields initialized



6) So, this new JavaBean object was returned to the client in JSON format inside the body of the HTTP Response. So now we are again in the JQuery script that have received the HTTP Response from the server. So we are in the success case:

Ok...this is the reason why the function take a json parameter, this parameter contain the returned object in JSON format and now is call the method that have to display the value of the String conversion JSON object as output value next to the clicked link

Now I think that I have understand, is it all right?

Thank you very much for your courtesy and professionalism












11 years ago
Hello to everybody,

I am studing the Spring MVC showwcase dowloadable from the STS dashboard.

Now I am studing how Spring MVC mapping the resources and I have some problem to understand the following thing:

So, I have the following link that generate an HTTP Request towards the "/mapping/produces" folder:



As you can see this link have class named "writeJsonLink" and for this class there is defined the following JQuery function triggered on the click of the link:



Ok, I have commented the code to try to understand its behavior (I am a beginner of Javascript and JQuery) and seems me that the behavior of this script is the following one: When I click the link, start the function that before send the ajax call to the web application check if the url of the clicked link is an address that end with .json extension.

In this case this case my URL don't end with .json (because my url is towards the FOLDER: /mapping/produces and not towards a .json file), so the function don't add the header "Accept", "application/json" to the HTTP Request body field.

Ok, now my problem is to understand what do this piece of code:



In succes case call a function having a parameter named json that simply call a method named showSuccessResponse passing to it the json obkect converted to String and the link.

Now, I know what showSuccessResponse do (I use it to create a span tag that show a message in my page next to the clicked link).

the problem is: who is the json parameter that I pass to the function in the success case. I am converting to String this parameter but: when and where I have created id?

If I execute my example when I click on the link appear me (next to the link) the following message: {"foo":"bar","fruit":"apple"}

Seems ad it was created an JSON object having the following key\value contents:


foo: bar
fruit: apple


But where is it created ?!?! boooo

When I click on the link and the method is executed I have the following message in my stacktrace:



Can you help me to undestand what happen?

Thanks
Andrea

11 years ago

Mark Spritzler wrote:I didn't give you any link. In my post, I entered in nothing of a link. But it looks like the browser or something else, which happens a lot places on the internet, did a search or created a popup with a link. I did not put that there.

getParameter is not on the String class, it returns a String, but is in the HttpServletRequest class.

And @RequestParam means Spring will go into the HttpServletRequest and call getParameter on that class for you. It will also convert the String that returns to the type of the parameter in your Controller method.

Mark



Ok,
now it is very clear :-)

Tnx
11 years ago
Ok,
doing so seem to work well:



So I have a method that handle only the http request towards "mapping/parameter" and two other method for the same folder with one parameter: foo and foo2

I have an other theorical doubt probably most related about Java rather than about Spring framework

You have give me this link: http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameter%28java.lang.String%29
This link is the Java Docs and there is nothig about Spring framework docs.

Now I have study the getParameter method documentation and I have see that this method belongs to java.lang.String that is one of the standard Java library...

So it means that when in my code I use the annotation: @RequestParam("foo2") String foo2 the Spring framework call for me the getParameter method from the java.lang.String class and put this value inside a new String variable? I have well understand?

In practice when I call a Spring annotation, Spring framework call form me some his method that do something? (in this case: call the java.lang.String.getParameter() method and put the returned value inside a String variabile whose name is declared by the developer in the annotation body)

Thank you very much for your help
Andrea

11 years ago

Mark Spritzler wrote:You can't put two params like that in params=""

But you could do it in code. Pass in the HttpServletRequest and look yourself.

Or have the first two methods, then the third not have params in it. It might be that the first two are checked first then the third. And in the third pass HttpServletRequest and make sure they aren't in there.

Mark



mmm, ok...so I have undestrand that I can not have something like params="!foo, !foo2".

But I have not understand how can I solve this situation, can you help me? :-(

Thanks
Andrea
11 years ago
Hello,
I am going crazy trying to handle the following situation:

In a view I have the following 3 links that all generate an HTTP Request towards the "/mapping/parameter" folder. These links differ from each other for the parameter passed, so the first one pass a parameter named foo, the second one pass a parameter named foo2 and the last one pass no parameter.



Now, in my controller class, I would handle this situation using 3 different methods, so I added the following methods to my controller:



The problem is that in this way is handled only the !foo, !foo2 case and if I click on the first link (the one with the parameter naming foo) I obtain the following error in the stack trace:

nov 24, 2012 9:10:29 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [appServlet] in context with path [/spring-mvc-showcase] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8080/spring-mvc-showcase/mapping/parameter': {public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameter(), public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameterNegation()}] with root cause
java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8080/spring-mvc-showcase/mapping/parameter': {public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameter(), public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameterNegation()}
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.lookupHandlerMethod(AbstractHandlerMethodMapping.java:262)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:212)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:55)
at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:297)
at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1091)
at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1076)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:896)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:917)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:813)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:798)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

And if I click on the second link (the one with the parameter naming foo) I obtain the following error in the stack trace:

nov 24, 2012 9:11:27 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [appServlet] in context with path [/spring-mvc-showcase] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8080/spring-mvc-showcase/mapping/parameter': {public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameter2(java.lang.String), public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameterNegation()}] with root cause
java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8080/spring-mvc-showcase/mapping/parameter': {public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameter2(java.lang.String), public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameterNegation()}
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.lookupHandlerMethod(AbstractHandlerMethodMapping.java:262)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:212)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:55)
at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:297)
at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1091)
at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1076)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:896)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:917)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:813)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:798)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Why? How can I resolve?

Thanks
Andrea









11 years ago
Hello to everybody,

in this periodo I am studing the Spring MVC showcase example (dowlodable from STS dhasboard) and I have some simple question about the "Request Mapping" examples:

1) In my home.jsp page I have this link:



As you can see by this link I am doing an HTTP GET Request having a "foo" parameter containing the value: "bar".

This HETTP Request is handled by the following method of the controller class MappingController:



This method manage HTTP Request (only GET type) that have a parameter named "foo"

How can I take the value ("bar") of this parameter and put it in a variable inside the code of my byParameter method?

Thank you very much
Andrea
11 years ago
Hello to all,

I am studing the Spring MVC showcase example downloaded from the STS dashboard.

I have a basic question for you:

In my home.jsp view I have two links, something like that:



So, in this example the first one is handled by a controller class named SimpleController and the second one is handled by a controller class named SimpleControllerRevisited

This is the code of SimpleController class:



As you can see the simple() method is annoted by @RequestMapping("/simple") annotation so it mean that this method handles request towards "/simple" folder. This method return a String to the caller and this string is encapsulated into the BODY section of the HTTP Response...ok it is very simple !!

Now this is the code of SimpleControllerRevisited



It is very similar to the previus SimpleController() method. It handles request towards "/simple/revisited" folder and return a string into the BODY of the HTTP Response

what is the difference between these two methods?

When I do:
method=RequestMethod.GET I'm specifying that the HTTP Request type is a GET...but is it not the default HTTP Request? Also in the other method is a GET although it is not explicitly specified? Or what?

What do exactly the: headers="Accept=text/plain" parameter of the @RequestMapping annotation?

thank you very much
Andrea




11 years ago
mmm I am not so sure of what I am saying but...maybe you have some classpath problem...

In general, JUnit (just like any Java library) needs to be on your classpath, do you have it in your classpath?
11 years ago

Prasad Krishnegowda wrote:whenever a request is made for "*.html" it invokes the servlet with url-pattern "/", which is your dispatcherservlet1, in this xml you don't have request mapping so this exception is thrown..

Already, when you map "/" (All) requests to spring dispatcher servlet, what's the need creating a new dispatcher servlet for *.html?



mmm...maybe I have not totaly understand what you want explain me...

what do you mean when you say me that: "in this xml you don't have request mapping so this exception is thrown? Which file you mean?

If you speak about web.xml I think that in this file I have specify the mapping for "*.html" HTTP Request that that must be managed by my SECOND DispatcherServlet named appServlet2, infact in my web.xml file I have declared these 2 tags:

The first one to create a new instance for DispatcherServlet named appServlet2


The second one to map towards this DispatcherServlet all the HTTP Request having pattern "*.html"



You also say me that: whenever a request is made for "*.html" it invokes the servlet with url-pattern "/" (that is the first one named appServlet) but this is not true !!!

When an HTTP request is made for "*.html" it is not invoked the first DispatcherServlet but seems that is invoked the second one (appServlet2) that is configured to handle exactly "*.html" HTTP Request, infact if I click on my link: "Get HELLO.html" in my stack trace I have:



In the first line you can see that the request direct to: "/spring-mvc-showcase/hello.html" is managed by my second DispatcherServlet named "appServlet2" that is configured to handle "*.html" http request....and even more...if I delete the previus 2 tags (to create the instance and the mapping for appServlet2 DispatcherServlet), if click on this links the application can not manage "*.html" request and goes into error...

So, seems that use the right DispatcherServlet for request having form "*.html" but the strange thing is that in this example to work well I have to use @RequestMapping("/hello.html") to annotate my method, and so run well and the method is mapped for my hello.html http request.



If I use this form it is all ok...but I think that it is very strange and have to work using @RequestMapping("/hello")

why?

I am doing this "experiment" to understand well the mapping logic of Spring MVC framework...it is just an experiment to learn how Spring MVC work...

Thank you very much
Andrea





11 years ago
I have develop this example basing uppon the Spring MVC Showcase example.

The result I want to achieve is as follows: a web application that manage 2 kinds of HTTP Request:

FIRST HTTP Request type:: HTTP request towards resources having a structure [/b]/folder[/b]

SECOND HTTP Request type: HTTP request towards resources having a structure [/b]/file.html[/b]

The showcase example manage by default the first type of HTTP Request, so I have add an other DispatcherServlet in my web.xml configuration file to manage the HTTP Request towards *.html pattern but I am finding some problem to handle the second type of request

So this is my web.xml code:



As you can see in this web.xml fine I have defined 2 DispatcherServlet: the first one that manage the first type of HTTP Request and the second one that manage the second type.

Ok, the DispatcherServlet that manage the HTTP Request towards resources having form: file.html have servlet-name=appServlet2 and it is configured by the servlet2-context.xml configuration file.

This is the code of servlet2-context.xml:



this is a "copy" of the servlet-context.xml file that configure the original DispatcherServlet of the example, the only difference, made by me, is that I import a different file: controller2.xml

This file simply specify the package in wich are actived the component scan managed by this servlet:


So, for this servlet is actived the component scan that search annotation in the following package: org.springframework.samples.mvc2.simple

Ok...In this package I have created the following controller class:



As you can see the sayHello method is annoted by @RequestMapping("/hello") annotation and, in theory, have to manage HTTP Request towards /hello.html file !!!

But don't work well !!!

Adding in my home.jsp view I add these links:


When I click on these links I have the following error message:

HTTP Status 404
....
- description The requested resource is not available.


And this is my stacktrace:



So it is clear that Spring have loaded the appServlet2 DispatcherServlet (the DispatcherServlet that is configured to manage HTTP Request toward filename.html resources) but don't find a mapping for the hello.html resources...

If I change the @RequestMapping("/hello") annotation in @RequestMapping("/hello.html") for my method (inside my HelloController class) the example run well !!!
Using the "/hello.html" pattern inside the @RequestMapping annotation, Spring find the mapping with my sayHello() method and all run well !!!

Infact this is the relative stack trace (the HTTP reuqest is is properly managed by appServlet2 DispatcherServlet and the sayHello() method is called)



I think that this behavior is very very strange because the appServlet2 is configured to handle automatically HTTP request toward resources shaped as: "filename.html" because I have mapped this kind of resources in my web.xml file by the tag:



But if I don't specify that the .html in the @RequestMapping annotation don't work...

The strange thing is that I have created an other simplify Spring project (outside the Spring MVC Showcase Project) and in this one I have not this mapping problem...

Why? Someone can help me to understand this thing? I am going crazy

Thank you very much for your attenction
Andrea


11 years ago