Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2010, 07:30 AM
Registered User
 
Join Date: Apr 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default invokde a jsp page from servlet...need help.m a student and need this for my Project

hello friends i need to invoke a jsp page from a servlet..........
the need is that user enters data into a form on a jsp page.a servlet is called by the form submit.....
In the servlet the data is to be verified and if it has errors it should display a Success Page or error Page.........if thrs a error page the errors should be seen on that jsp Page
 
Old April 29th, 2010, 10:33 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well typical for a web application :)
What you can do is if you have errors in the form data recieved, create a list of error messages [for each validation error for example] and set this list as request attribute and FORWARD to the error page/to the same page where user has entered the data. On this page get the request attribute, if it is not null then loop through the list and display error message.
Remember you need to forward to the jsp not redirect!
__________________
- Rakesh
http://iam-rakesh.blogspot.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can JSP integrate with Servlet and run on MySQL wesleygch JSP Basics 0 April 10th, 2007 02:22 AM
Package javax.servlet.jsp does not exist wottt JSP Basics 5 January 17th, 2007 06:37 AM
MMS using servlet or jsp monika.vasvani ASP.NET 1.0 and 1.1 Basics 0 July 19th, 2006 06:24 AM
jsp working but servlet not....... rai Apache Tomcat 0 June 23rd, 2005 12:37 AM
Pro JSP Servlet example Marvin Servlets 2 September 5th, 2003 08:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.