I'm wondering if it is possible to pass form data from index.jsp file to a java class and then back to the response.jsp. I'm trying to compute something with the data they have entered into index.jsp but it can't be done in Javascript. Is there a way that I can retrieve the data?
The other thing is using http servelts and writing the entire html in Java, but that seems overly complex and not worth the effort if there are simpler ways of doing this.
Thanks in advance for the help!
This is one of the scripts (in javascript) that I written to try and solve this problem, but my class, RunPython.java, always comes an error?
<script type="text/javascript">
function onSubmit(){
var Bugfile = document.forms[0]["BugFile"].value;
var GD = document.forms[0]["GD"].value;
<%
String s = request.getParameter("Bugfile");
String d = request.getParameter("GD");
RunPython re = new RunPython(s,d);
%>
}
Error:
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP
PWC6197: An error occurred at line: 61 in the jsp file: /index.jsp PWC6199: Generated servlet error: string:///index_jsp.java:106: cannot find symbol symbol : class RunPython location: class org.apache.jsp.index_jsp
PWC6197: An error occurred at line: 61 in the jsp file: /index.jsp PWC6199: Generated servlet error: string:///index_jsp.java:106: cannot find symbol symbol : class RunPython location: class org.apache.jsp.index_jsp