Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Reply With Quote
  #2 (permalink)  
Old April 29th, 2010, 10:33 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:07 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.