getting Http 404 error in jsp forms

Hi,
I am new to java spring. I am trying to create a login form.
I wrote the following code :
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Home</title>
    </head>
    <body>
            <form action="[b]process.jsp[/b]">
            <input type="text" name="uname" value="Name..." onclick="this.value=''"/><br/>
            <input type="text" name="uemail"  value="Email ID..." onclick="this.value=''"/><br/>
            <input type="password" name="upass"  value="Password..." onclick="this.value=''"/><br/>
            <input type="submit" value="register"/>
            </form>

</body>
</html>

Open in new window


This should direct to process.jsp .
I have both home.jsp and process.jsp in the location : myTwitter/src/main/webapp/WEB-INF/views/process.jsp
But i get the following error when i click on Register button. :

HTTP ERROR 404

Problem accessing /process.jsp. Reason:

    /process.jsp

Powered by Jetty://

Open in new window


why is it unable to find it ?
Rohit BajajAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gurpsbassiCommented:
try /views/process.jsp
Rohit BajajAuthor Commented:
Hi,
Got the same error didnt work
gurpsbassiCommented:
Im not sure why you have got these jsps under WEB-INF in the first place?

normally theyre kept outside.
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Rohit BajajAuthor Commented:
Hi,
Do you have git account.
I can share my code with you.
The jsp's were inside WEB-INF only.
I initally created a project by selecting spring-mvc archetype. Which automatically creates the default program.
gurpsbassiCommented:
sure.
give me your respository url.
Rohit BajajAuthor Commented:
Rohit BajajAuthor Commented:
HI,
Any comments on the git repo ?
gurpsbassiCommented:
just thinking about it, should you not have action = "process" inside your home.jsp form? Which then maps to a POST request in another controller. I think what you're doing with one jsp trying to call another jsp defeats the purpose of using a MVC architecture.

I would have a controller that handles the POST request of login details and then resolves to a view.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.