salut !
lorsque je veut deploieyer une page jsp en local cette Exception se lance :voici la configuration de varible path:Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:105)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:407)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
ma page JSP :$CATALINA_HOME=C:\Program Files\Apache Software Foundation\Tomcat 5.0\
$JAVA_HOME=C:\Program Files\Java\jdk1.6.0_01\
le fichier web.xml:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <html> <head> <title>jsp1</title> </head> <body bgcolor="#ffffff"> <h1> <% out.println("ffffffffffffffffffffff"); %> </h1> </body> </html>
L'arborisance de la Page web :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <display-name>ModuleWeb</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
Remarque :de plus les page JSP/servlets d'examples qui sont fourni avec Tomcat Fonctinne bien.webapps
|__ test
|__WEB-INF
| |__web.xml
| |__lib
| |__classes
|
|__index.jsp
Partager