This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat + NetBeans deploying, need help. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat + NetBeans deploying, need help." Watch "Tomcat + NetBeans deploying, need help." New topic
Author

Tomcat + NetBeans deploying, need help.

Dmitry Zhuravlev
Ranch Hand

Joined: Apr 14, 2010
Posts: 91
Hello everyone!

Guys, please provide me with some guidelines about deploying applications on Tomcat server.

I am trying to deploy my app in two ways:

(1) without NetBeans. In this case I create and build application in NetBeans, and place the war file into webapps folder of Tomcat. But it doesn't work! While opening the simple index.jsp automatically generated by NetBeans:
Code:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Database issues</h1>
</body>
</html>

it says:

description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.20\work\Catalina\localhost\iShop\org\apache\jsp\index_jsp.java (Системе не удается найти указанный путь - this means system cannot find the given path) java.io.FileOutputStream.open(Native Method) java.io.FileOutputStream.<init>(FileOutputStream.java:179) java.io.FileOutputStream.<init>(FileOutputStream.java:70) org.apache.jasper.compiler.Compiler.setupContextWriter(Compiler.java:276) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:215) org.apache.jasper.compiler.Compiler.compile(Compiler.java:332) org.apache.jasper.compiler.Compiler.compile(Compiler.java:312) org.apache.jasper.compiler.Compiler.compile(Compiler.java:299) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Whats wrong?

(2) another way is to deploy the same application using NetBeans. I hit the run button and it works! I can use my app. The only thing which bothers me is JDBC problem. I have a JDBC connection and I have set it in two ways: via DataSource XML notation and via DriverManager java object. The second way works perfectly. The first way works ONLY if I place JDBC MySQL db connector in lib folder of Tomcat! Without this it says: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'.
I dont understand why should I copy it into lib folder. My JSTL tags work without it. My DriverManager.getConnection works without it. Whats up?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat + NetBeans deploying, need help.
 
Similar Threads
can't find file tad lib descriptor:"http://java.sun.com/jstl/core"
Unable to compile class for JSP
Creating UDDI registry using jUDDI
Unable to Resolve JSTL taglib Declaration
Suddenly stopped working