Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML

Fresher Job


 

Search Host

Monthly Fee($)
Disk Space (MB)
Register With us for Newsletter!
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

Tutorials

Java Server Pages

JAXB

Java Beans

JDBC

MySQL

Java Servlets

Struts

Bioinformatics

Java Code Examples

Interview Questions

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Web Promotion

Web Submission

Submit Sites

Manual Submission?

Web Promotion Guide

Hosting Companies

Web Hosting Guide

Web Hosting

Linux

Beginner Guide to Linux Server

Frameworks

Persistence Framework

Web Frameworks

Free EAI Tools

Web Servers

Aspect Oriented Programming

Free Proxy Servers

Softwares

Adware & Spyware Remover

Open Source Softwares

ValidationException
Expert:kram
im throwing different validationException on my command class and i'm trying to catch this exceptions on my action class to redirect it to another page once a specific exception is catched.
code:
on my command class
try {
if (condition)
{
throw new ValidationException(exception.exception1);
}
else
{
throw new ValidationException(this.message);
}
}
catch (ValidationException e){
throw e;
}

on my action class
catch (ValidationException e)
{
if (e.getKey().equals(exception.exception1)
{
createError(e, request, mapping);
return findAndTrackForward(mapping, "page1", request.getSession());
}
else {
createError(e, request, mapping);
return findAndTrackForward(mapping, "page2", request.getSession());
}

the problem is:
page1 = is the same page where the validation is done...and it works
page2 = is not the same page..it is another jsp page...

once else is satisfied on my catch block (action class)
it redirects to page2 but the pop-up/alert message that contains the message (this.message) does not appear,
but once i change this part of my code --
else {
createError(e, request, mapping);
return findAndTrackForward(mapping, "page2", request.getSession());
}
to --
else {
createError(e, request, mapping);
return findAndTrackForward(mapping, "page1", request.getSession());
}
page2 to page1.....the pop-up/alert message containing the message (this.messsage) appears..and of course it will only be redirected to the same page...

How can i make my pop-up/alert message containing the message (this.messsage) appear and after clicking OK from that pop-up it will redirect to another page(page2)?
Answers
Hi friend,



Read for more information at

http://www.roseindia.net/struts/struts_validator_framework.shtml




Thanks

More Questions
Post Answers
 
Ask Question Facing Programming Problem?
Useful Links
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.