If you've read any posts in this forum you know that writing scriptlet code in a JSP is not the way to go.
Java code belongs in a java class.
Potential problems spotted in your code:
> if (material_number != "" && material_desc != "" && partno != "" ) {
This line of code doesn't do what you think it does.
When comparing string values, you should use the .equals method.