0

Im having an error invoking a simple servlet in a maven project. I've created a maven project from command line, with this line

mvn archetype:generate -DgroupId=my.group.id -DartifactId=MavenWebApp1  
-DarchetypeArtifactId=maven-archetype-webapp 
-DinteractiveMode=false

after that I've imported it to netbeans, and add a simple servlet. I invoke it from my JSP page and I get this error on the browser.

HTTP Status 404 - /newServlet type Status report message /newServlet description The requested resource is not available. Apache Tomcat/7.0.56

This is the JSP/HTML code

<html>
    <body>
        <h2>Hello World!</h2>
        <form action="newServlet" method="POST">
            <input type="text">
            <input type="submit" value="Aceptar">
        </form>
    </body>
</html>

After that I've created a new Maven Java Web project from the Netbeans menu and I have the same error. Finally I've created a new Java Web project (not maven) and it works ok! Need I to make some changes to the maven project?

Thanks in advance for you help Regards Darío

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
DarioJolo
  • 1
  • 2

1 Answers1

0

It´s solved, a few days later I created a new maven project on Netbeans and it's work correctly with servlets

DarioJolo
  • 1
  • 2