I installed Apache Tomcat 7.0.28 in my JBuilder6. I use JDK 1.6.0_32 (jre6). I can get http://localhost:8080/ page. However, when I tried to run my JSP file, I encountered following error:

org.apache.catalina.startup.Bootstrap start -config "C:\Documents and Settings\user\jbproject\whoznextdoor\conf\server8080.xml" -nonaming
Jun 23, 2012 8:22:47 AM org.apache.catalina.startup.Bootstrap main
WARNING: Bootstrap: command "-nonaming" does not exist.

Please help.

MyDreamGirl

This is not an error but just a warning message that the parameter -nonaming is not supported by the Bootstrap class as you can see from the source code. Any problems you are facing because of this?

My JSP does not come up engined by the web server as usual due to that warning message. The whole message is:

C:\Program Files\Java\jdk1.6.0_32\bin\javaw -classpath "C:\JBuilder6\apache-tomcat-7.0.28\bin\bootstrap.jar;C:\JBuilder6\apache-tomcat-7.0.28\bin\commons-daemon.jar;C:\JBuilder6\apache-tomcat-7.0.28\bin\tomcat-juli.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\annotations-api.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\catalina-ant.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\catalina-ha.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\catalina-tribes.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\catalina.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\ecj-3.7.2.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\el-api.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\jasper-el.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\jasper.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\jsp-api.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\servlet-api.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\tomcat-api.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\tomcat-coyote.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\tomcat-dbcp.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\tomcat-jdbc.jar;C:\JBuilder6\apache-tomcat-7.0.28\lib\tomcat-util.jar;C:\JBuilder6\apache-tomcat-7.0.28\webapps\examples\WEB-INF\classes;C:\JBuilder6\apache-tomcat-7.0.28\webapps\examples\WEB-INF\lib\jstl.jar;C:\JBuilder6\apache-tomcat-7.0.28\webapps\examples\WEB-INF\lib\standard.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\alt-rt.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\alt-string.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\im\indicim.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\im\thaiim.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.6.0_32\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_32\lib\dt.jar;C:\Program Files\Java\jdk1.6.0_32\lib\htmlconverter.jar;C:\Program Files\Java\jdk1.6.0_32\lib\jconsole.jar;C:\Program Files\Java\jdk1.6.0_32\lib\sa-jdi.jar;C:\Program Files\Java\jdk1.6.0_32\lib\tools.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\core\core.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\core\org-openide-filesystems.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\lib\boot.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\lib\org-openide-modules.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\lib\org-openide-util-lookup.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\lib\org-openide-util.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\ext\jh-2.0_05.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\ext\updater.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-api-annotations-common.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-api-progress.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-api-visual.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-core-execution.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-core-io-ui.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-core-multiview.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-core-output2.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-core-ui.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-core-windows.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-core.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-applemenu.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-autoupdate-services.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-autoupdate-ui.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-editor-mimelookup-impl.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-editor-mimelookup.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-favorites.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-javahelp.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-keyring-impl.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-keyring.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-masterfs.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-options-api.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-options-keymap.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-print.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-progress-ui.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-queries.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-sendopts.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-settings.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-modules-spi-actions.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-spi-quicksearch.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-swing-outline.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-swing-plaf.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-netbeans-swing-tabcontrol.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-actions.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-awt.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-compat.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-dialogs.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-execution.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-explorer.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-io.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-loaders.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-nodes.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-options.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-text.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-util-enumerations.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\platform\modules\org-openide-windows.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\profiler\lib\jfluid-server-15.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\profiler\lib\jfluid-server.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\profiler\modules\org-netbeans-lib-profiler-charts.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\profiler\modules\org-netbeans-lib-profiler-common.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\profiler\modules\org-netbeans-lib-profiler-ui.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\profiler\modules\org-netbeans-lib-profiler.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\profiler\modules\org-netbeans-modules-profiler-oql.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\profiler\modules\org-netbeans-modules-profiler.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\core\com-sun-tools-visualvm-modules-startup.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-api-caching.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-application-views.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-application.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-attach.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-charts.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-core.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-coredump.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-heapdump.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-host-remote.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-host-views.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-host.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-jmx.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-jvm.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-jvmstat.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-modules-appui.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-profiler.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-profiling.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-sa.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-sampler.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-threaddump.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-tools.jar;C:\Program Files\Java\jdk1.6.0_32\lib\visualvm\visualvm\modules\com-sun-tools-visualvm-uisupport.jar" -Dcatalina.home="C:/JBuilder6/apache-tomcat-7.0.28" org.apache.catalina.startup.Bootstrap start -config "C:\Documents and Settings\user\jbproject\whoznextdoor\conf\server8080.xml" -nonaming
Jun 24, 2012 3:39:31 PM org.apache.catalina.startup.Bootstrap main
WARNING: Bootstrap: command "-nonaming" does not exist.

My JSP does not come up engined by the web server as usual due to that warning message

Like I mentioned, it is just a warning message and shouldn't affect normal execution of JSP's/Servlets. The problem must lie somewhere else. Have you looked at all the log files and the logging done on the console? What is the URL you are trying to hit? What is the structure of your project which is deployed in Tomcat?

I know it is a warning message. However, a web page based upon my JSP file failed to come out. I have attached the full message that comes in my console. I am trying to hit the URL http://localhost:8080/FileUpload.jsp. I am not sure what you mean by the structure of my project in Tomcat. Can you elaborate?

I can get the page http://localhost:8080/ and it shows my install of Apache Tomacat is successful.

I have attached the full message that comes in my console.

I don't see any attachments?

I am trying to hit the URL http://localhost:8080/FileUpload.jsp.

Are you sure that's the right URL to be invoked? Don't you need the application name in there, something like http://localhost:8080/myapp/FileUpload.jsp? How would the servlet engine know which application's FileUpload.jsp to invoke?

I am not sure what you mean by the structure of my project in Tomcat. Can you elaborate?

I'm assuming that you are copying the project to the webapps directory of tomcat in which case you need to tell me the directory structure of how your project looks like.

Per your suggestion, I also tried http://localhost:8080/whoznextdoor/FileUpload.jsp, it does not render the web page based upon the JSP file, either. Nothing came up.

One possible case of blank page is when the JSP blows up when it is been rendered. You'll have to hunt the log files and look at the console logs. Or maybe you need to add an indication in your JSP, something like printing "hello" to sysout when the JSP is hit.

Any other suggestions?

One possible solution would be to ditch the JBuilder for the time being and deploy the project to Tomcat manually. This will help us know whether it's the JBuilder doing something strange or a problem with your project. Also, you still haven't posted the directory structure of your web application...

I put System.out.println in the code and it does not print.

I am not sure if this is what you want. I have directory of my web application:

whoznextdoor/bak
whoznextdoor/classes
whoznextdoor/conf
whoznextdoor/defaultroot/WEB-INF
whoznextdoor/defaultroot/FileUpload.jsp
whoznextdoor/src
whoznextdoor/work

Thanks

MyDreamGirl

The project structure seems problematic and definitely doesn't resemble a regular web app. A normal web app looks like:

app/index.jsp
app/WEB-INF/web.xml
app/WEB-INF/classes

If you want to access FileUpload.jsp, it should be accessible if you add defaultroot after whoznextdoor in the URL though that would be really ugly or maybe add a redirection in the web.xml file.

I'd strongly recommend following the Java EE 5 tutorial if you want to learn about good JSP practices and an IDE like Eclipse. Also, have a look at how they structure their sample applications.

JBuilder has different directory structure of web applications from other IDEs. It works in Tomcat 3 and 4. There should be a way to work it out in Tomcat 7, correct?

Another example is IBM RAD (Rational Application Developer). It has directory structure as follows:

myapps/src
myapps/WebContent/index.jsp
myapps/WebContent/WEB-INF/classes
myapps/WebContent/WEB-INF/lib

It works.

Sorry I made a mistake in my previous posting. The directory structure in JBuilder is

whoznextdoor/bak
whoznextdoor/classes
whoznextdoor/conf
> whoznextdoor/defaultroot/WEB-INF/classes
whoznextdoor/defaultroot/FileUpload.jsp
whoznextdoor/src
whoznextdoor/work

MyDreamGirl

And following file is available too.

whoznextdoor/defaultroot/WEB-INF/web.xml

JBuilder has different directory structure of web applications from other IDEs. It works in Tomcat 3 and 4. There should be a way to work it out in Tomcat 7, correct?

I'm afraid that's a question more suited for the JDeveloper support forums.

Another example is IBM RAD (Rational Application Developer). It has directory structure as follows:

That's the IDE project directory structure; when you deploy an application to the servlet container, it has to conform to the servlet specification. In case of RAD, it's quite possible that it copies the contents inside the WebContent directory without copying the directory itself.

You need to have a look at the directory structure of your deployed application which exists in Tomcat to understand what funny stuff JDeveloper does under the hood after deploying your application.

It is interesting that I got diffrent error when I closed and reopened my project. This time my codes did not compile successfully.

FileUpload.jsp: java.lang.NoClassDefFoundError: org/apache/tools/ant/Task
FileUpload.jsp: Caused by java.lang.NoClassDefFoundError: org.apache.tools.ant.Task
...12 more
Could not find the main class: org.apache.jasper.jspC. Program will exit.

I tried google this error and was not able to find solution.

What are the contents of your JSP file?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page import="java.util.*, java.io.*,java.lang.*,java.sql.*,java.text.*" %>
<%@ page import="javax.servlet.*, javax.servlet.http.*" %>
<%@ page import="javax.mail.*,javax.mail.internet.*,javax.activation.*,com.sun.mail.handlers.*" %>
<%@ page language="java"  import="whoznextdoor.*" %>
<%
%>

<html>
    <head></head>
    <body>
        <p>Commons File Upload Example</p>
        <form action="http://localhost:9080/Whoznextdoor/FileUploadAction.jsp" enctype="multipart/form-data" method="POST">
            <textarea name="info" rows="10"  cols="70"></textarea><br>
            <input type="file" name="file1"><br>
            <input type="file" name="file2"><br>
            <input type="file" name="file3"><br>
            <input type="Submit" value="Upload File"><br>
        </form>
    </body>
</html>

Nothing suspicous in the code itself apart from the non-standard imports for which I assume you have already added the JAR's to the classpath. Can you post the entire stack trace for the exception which occurs when compiling the JSP without trimming anything?

The stuff I posted earlier is all I got from the console. There is no entire stack trace for the exception. There is no hyperlink for "...12 more". See details below again.

FileUpload.jsp: java.lang.NoClassDefFoundError: org/apache/tools/ant/Task
FileUpload.jsp: Caused by java.lang.NoClassDefFoundError: org.apache.tools.ant.Task
...12 more
Could not find the main class: org.apache.jasper.jspC. Program will exit.

There is no entire stack trace for the exception

An exception always carries the entire stack trace. If not on the console, it's getting logged to some Tomcat log file. Anyways, with the single file you posted along with the short trace, the only obvious problem I see is that Apache Ant libraries are missing from the runtime classpath (though the question as to why they are required still remains). One suggestion might be to try this deployment outside JBuilder (manually create a web application directory structure), copy it to Tomcat's webapp directory and then try to run your application.

Can you give me more information about how to get Tomcat log files that contain the entire stack trace. Which diercory should I look into?

As to directory struction of any JBuilder project, it has been working with Tomcat 3.2 and 4.0, and 6.0.18. It should work under 7.0.28, isn't it?

Can you give me more information about how to get Tomcat log files that contain the entire stack trace. Which diercory should I look into?

The Tomcat logs are in the "logs" directory inside the Tomcat installation.

As to directory struction of any JBuilder project, it has been working with Tomcat 3.2 and 4.0, and 6.0.18. It should work under 7.0.28, isn't it?

Ideally it should, but it doesn't seem to be. I think JBuilder team is the only one who can authoritively answer as to why this isn't working as expected and provide a fix/workaround. Also, have you tried replacing Tomcat 7 with Tomcat 6 and checked if it still works?

JBuilder 6 causes too much trouble. I have switched to Eclipse IDE for J2EE with Apache Tomcat 7.0.28. Everything is working fine now.

Thanks anyway.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.