0

I have a JSP page 1 to addusers to the account.On submission of the form another JSP 2gets called and manipulates the parameters.If values are null i am returning an error message to the user.If values are not null i need to call a servlet which will run a backend script.

The thing here is to call the servlet on the condition if the values are not null.The JSP 2 should automatically trigger the servlet and pass the parameters contained in the JSP2 to the servlet on the condition if values are not null.

Is this possible?Can anyone direct me in the right path towards this?????

Thanks in advance

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by peter_budo
0

Why you are trying to inject second page that is obsolete there? If you want to be sure user entered values and these are of correct format use JavaScript/Ajax/jQuery to do on form validation and submit form only if conditions are fulfilled.

0

Why you are trying to inject second page that is obsolete there? If you want to be sure user entered values and these are of correct format use JavaScript/Ajax/jQuery to do on form validation and submit form only if conditions are fulfilled.

Thanks for the reply...

Could do that using the javascript..ONce after submitting the form i wish to avoid hard coding in the servlet so that i could do most of my manipulations in the JSP that is called as the result and that JSP will trigger the servlet automatically if it requires and returns back the result to another JSP which will do further processing ...

0

You are getting logic of Java web development in wrong way. JSP is just presentation layer that is supposed to collect and present data. It is servlet and classes associated with it that are "hard workers" and handle logic.

This question has already been answered. 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.