• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Help with Spring / Netbeans tutorial

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am trying to learn the Spring MVC concept with this tutorial: https://netbeans.org/kb/docs/web/quickstart-webapps-spring.html

I have followed it until the end, but there is something that doesnt works. I have tried several ways to solve it and the tutorial has been followed as described, but the page after filling the form with the name just appears blank.

This small application just reads a name with the Form, it later displays a second page saying: "Hello {name}".

I have uploaded the files to Github, the part of the code that is not shown, is this one:

<h1>${helloMessage}</h1>

This code is written, in the line 15 from the file "helloView.jsp", found in the WEB > WEB-INF > JSP > helloView.jsp.

That code depends on this one written in the line 47, for the "HelloController.java" file found in this path: src > Java > Controller > HelloController.java


This are the link of the Github repository, any help to solve this is really appreciated.


Hernán

HelloView.jsp:
https://github.com/Rubytux/tutorial-spring-mvc-netbeans/blob/master/web/WEB-INF/jsp/helloView.jsp


HelloController.java:
https://github.com/Rubytux/tutorial-spring-mvc-netbeans/blob/master/src/java/controller/HelloController.java
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I couldn't quickly discover the problem with your code, but I noticed that tutorial uses an older version of the Spring framework (3.2).

There are shorter and easier ways to write the same application with newer versions of Spring. At http://spring.io/guides you can find a list of short tutorials for different Spring features, using the latest version of Spring. See for example Serving Web Content with Spring MVC (this tutorial uses Spring Boot, which allows you to make a stand-alone application, not a WAR that you need to deploy in a Java EE app server such as Glassfish or Tomcat). The tutorials are not specific for NetBeans, but it doesn't matter which IDE you use.
 
Hernán Ramírez
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper de Jong wrote:I couldn't quickly discover the problem with your code, but I noticed that tutorial uses an older version of the Spring framework (3.2).

There are shorter and easier ways to write the same application with newer versions of Spring. At http://spring.io/guides you can find a list of short tutorials for different Spring features, using the latest version of Spring. See for example Serving Web Content with Spring MVC (this tutorial uses Spring Boot, which allows you to make a stand-alone application, not a WAR that you need to deploy in a Java EE app server such as Glassfish or Tomcat). The tutorials are not specific for NetBeans, but it doesn't matter which IDE you use.



Hi, thanks for the quick answer. I am going to watch those tutorials, too bad they are not listed sequentially so the learning curve would be too sharp.

I wonder if the errors with that code is related to some deprecated features, that's a very likely possibility. I am going for new tutorials to keep learning.

Thanks again, Hernan
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic