Where does the calculation take place?

The HTML-version calculates on the user’s PC, the ASP and JSP version calculates on the server.

Thus, the user get the results instantly in the HTML-version.

Is there an option to connect the JSP version to a database, maybe integrate through some custom code written in Java ?

You get the full source of the JSP-page and the JavaBeans. It is easy to add your specific code to the JSP-apge to save/read that data into a database or similar.

Do you have any installation instructions for running on a Tomcat server.

If you install Tomcat using the default paths, and set the paths as shown in the wizard – you have to move the cursor over the label so see the whole path – it works.

You can test your Tomcat installation by opening up

http://localhost:8080/examples/jsp

Please try the examples included by tomcat and make sure that these works.

Can the JavaBeans be saved into an Oracle database?

Yes, but you will have to supply the plumbing to the database yourself, either 1. You just serialize the JavaBeans 2. Or you map each individual input cell to a database column.

Tip: Name the cells in Excel, and those names will be used in the JavaBean.

SpreadsheetConverter doesn’t find my JDK.

You can point to the JDK to use by setting JAVA_HOME. Set it so that JAVA_HOME + “binjavac.exe” exists

http://wso2.org/project/wsas/java/1.1/docs/setting-java-home.html

How can I use the generated JavaBeans?

SpreadsheetConverter generates a JSP-page and a JavaBeans. In your case, you can just ignore the JSP-page and only use the JavaBeans. Each JavaBeans is totally self-contained and can be used as a subroutine. First call the setters, then the getters. The JavaBeans will recalculate automatically when the first getter is called.

Tip: Name the cells in Excel, and those names will be used in the JavaBean.

One problem we find when integrating products like these are JAR file collisions, in particular common third party JARs. Do you have a list somewhere of what third party JARs (open source or commercial) that you use? Or are you doing this all through JNI and don’t need extra JARs?

Each JSP-page and JavaBean generated is independent from other generated pages. (So there is some code duplication, but it simplifies maintenance, versioning etc….). Only standard Java-classes are used. We do not do JNI, all code is pure Java.

Apache Tomcat 5.5 and later complains about compilation errors when regenerating the web page

The JVM running the tomcat server has already loaded the servlet’s .class file and initialised the servlet object. It won’t reload the .class file or restart the servlet automatically. One solution is to stop and then restart tomcat, so it will use the new .class file.

Another solution is to use the manager application (see below) to issue a reload command for your web application. This will force tomcat to reload the new .class files without having to shutdown tomcat. For example: If your web application is called myapp and located in webapp/myapp, then using the following URL will use the manager to reload the application:

http://localhost:8080/manager/reload?path=/myapp (Your server name and application name is probably different.)

For more information, see

http://www.velocityreviews.com/forums/t140821-recompile-jsp-with-java-classes.html

How can I collect the submitted data using Java?

SpreadsheetConverter generates a standard HTML-form.

You loop over the request parameters, either by looping over the parameters, or by using getParameter.

Use getParameter method to get form element values

For example, if you named cell A1 “firstname”, you can access the first name using the formula

request.getParameter(“firstname”)

Reading data using a servlet

http://www.nakov.com/inetjava/lectures/part-3-webapps/InetJava-3.3-HTML-Forms-and-Parameters.html

http://www.jguru.com/faq/view.jsp?EID=1297854

and from the book “Java Servlets Developer’s Guide” published by McGraw-Hill/Osborne Media Group

http://www.java2s.com/Code/JavaDownload/HTMLFormsFromBookJavaServletsDevelopersGuide.zip

Or directly inside a JSP-page. The advantage of using a JSP-page is that all you need is to copy the file to the server. Servlets may require changing a configuration file.

<%@page import="java.util.*" %>
<%
	String username, password;
	if(request.getParameter("firstname") == null)
		username = "";
	else
		username = request.getParameter("firstname");
	
%>

Try this Excel add-in now!

Click on Download to install and test this Excel add-in for Windows.

Click on Upload to let us convert a spreadsheet for you for free.