justin chin

Greenhorn
+ Follow
since Jun 22, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by justin chin

I think I understood the original question. The user wants to call a java method from within a javascript snippet that lives with a JSP.

1. Onclick calls your javascript snippet.
2. Your javascript snippet that lives in the jsp (which lives on a Web App Server) has access to java code via the <%= methodName(parms) %> functionality. You can past that method your request which has all of your form parameters in it.
3. You can use a JSPF to contain the java code "methodName" that can access the Web App Server Java layer to keep things a little cleaner. This of course then can access anything you can imagine including POJO's.

This probably isn't the recommended way to solve this solution, but this answers you question directly.
13 years ago
JSP
Yes, within a JSP you can call a POJO type method.



In the above code, you have a java method called printStatusInfo that takes a request and can return a String. It can return an XML string that you can alert to the screen to validate you are working properly.
13 years ago
JSP