0

Hi,

I'm new to JSP and I'm trying to make a simple registration form. I've looked at examples and tried to do the same thing, but I have some problems.

What I have so far is register.jsp :

<div id="register_container">
	<form action="registrationProcessor.jsp" method="post">
		First Name
		<input name="firstname" type="text" class="inputbox"/><br/>
		Last Name
		<input name="lastname" type="text" class="inputbox"/><br/>
                .................
	    <input type="submit" name="Register" class="button-register" value="Register" />
    </form>
</div>

registrationProcessor.jsp:

<jsp:useBean id="formHandler" class=user.User" scope="request">
<jsp:setProperty name="formHandler" property="*"/>
</jsp:useBean>
<% 
   if (formHandler.validate()) {
%>
    <jsp:forward page="index.jsp"/>
<%
   }  else {
%>
    <jsp:forward page="register.jsp"/>
<%
   }
%>

And a Java class that represents the fields(User.java). I also have an index.jsp that includes some other pages.
When I press the submit button I just get

HTTP ERROR 404
Problem accessing /test/registrationProcessor.jsp. Reason: 

    /registrationProcessor.jsp

All JSPs are in the same folder. What am I doing wrong? Sorry if this is a no-brainer but I've been stuck here for a while.

Thanks!

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by ~s.o.s~
0

This is of course a path related issue unless you are getting an exception stack trace on your console, which might indicate some other problem. You need to provide us with the directory structure of the deployed application, the URL with which you access the registration page and the URL which gives you a 404 error. In case you are doing some path related manipulations or configuring JSP's explicitly, you'll also need to paste your deployment descriptor (web.xml).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.