Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Form Validation  RSS feed

 
Dave W.
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.geocities.com/bobbydave2003/E-Library.zip
Download the above file please and place in tomcat/webapps folder

I have created a Form Validation page.

In the E-Library/EndUsers/Home/NewUsers.jsp the user is asked to fill in the data and if fields are left blank, then the page goes to Process.jsp which forwards the page to either Retry.jsp where the fields are noted and the user must fill in the fields that are empty or its brought to the UserAdded.jsp

I have created a bean FormBean.java and compiled it javac -d . FormBean.java which has created a folder 'foo' and inside this is the class file.

However when all fields are left empty and the user clicks submit, I get errors saying it cannot find the foo.FormBean class when its within the same folder as the others.
Please help me as this is part of my thesis to be handed up in 2 weeks.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your zip file does not contain a properly formatted web application. Where's the WEB-INF folder? The web.xml file? Your app will not work until it follows the proper layout required by the servlet specification.
 
Dave W.
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I updated the file to include a web-inf and a web.xml but still no joy.
New download on http://www.geocities.com/bobbydave2003/E-Library.zip

Thanks for responding so quick also Bear
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by K00001727:
I updated the file to include a web-inf and a web.xml but still no joy.
New download on http://www.geocities.com/bobbydave2003/E-Library.zip

Thanks for responding so quick also Bear


WEB-INF is case sensitive.
You can try one of mine if you like:
http://simple.souther.us
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ummm, I noticed you changed your display name to an invalid value. We're light on rules here, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really need to find the servlet spec and read it. The layout of a web application must follow this spec. Your class files for example, must be rooted at WEB-INF/classes, and they must be in a non-default package.

Until you find out what the rules are for laying out a web app, you're just stabbing in the dark.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
You really need to find the servlet spec and read it.


You would find Servlet Spec link under Ben's signature.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!