Unable to compile J2EE in Windows XP
I have installed successiful J2EE 1.4 in my computer but i couldin't able to compile.
J2EE is in D:/programfiles/sun/appserver/
tutorial is in C:/unzipped/
I don't know how to add JAVA-HOME/bin ,J2EE_HOME/bin and J2EE_HOME/share/bin ON FRONT OF MY PATH.
How coul i set my PATH?
For examole my program that i what to compile is in C:/dubo.java what can i do to compile it.
I will just hope that Windows XP does not have different navigation for environment setup, this is how
PATH can be set on Windows 2000:
Start->Settings->Control Panel
Double click System, select Advanced tab
Select Environment Variables button
Find variable called PATH in user variable section. If it exists, then select its row and click edit. Write necessary entries at the very beginning - in your case, this should look something like:
D:\programfiles\sun\appserver\jdk\bin;d:\programfiles\sun\appserver\bin;<whatever was already there>
If there is no variable called PATH, then click New button, in Variable Name field specify PATH, in variable value specify:
D:\programfiles\sun\appserver\jdk\bin;d:\programfiles\sun\appserver\bin
Click OK to exit the environment setup. If you are compiling from command line, you'll have to open fresh command prompt to get these changes.
Similar Messages
-
Unable to compile Pro C file in windows
Hi
I have installed oracle 11g rel1 in windows XP. But the problem is i am unable to compile Pro C file to produce executable. It is able to convert pro c file to .c file. But not able to produce any executable. My installation did not installed pro c GUI either. nor any demo file of pro c is available under precomp/ folder. Has this installation gone wrong or how can i produce executable?
Thanks
Sasy dont u try this...i m not sure if its a right way to do things, but seems like it can work
$ORACLE_HOME/bin/proc test.pc
cc -I${ORACLE_HOME}/precomp/public -c test.c
do : find /cisa -name "*clntsh*" -print
say u get sumthing lyk this
$ORACLE_HOME/lib32/libclntsh.so.10.1
// instead of this:
cc -o test test.c -L $ORACLE_HOME/lib -lclntsh
write:
cc -o test test.c -L $ORACLE_HOME/lib $ORACLE_HOME/lib32/libclntsh.so.10.1
so u r directly refering to the library while linking -
Appserver unable to Compile JSP pages
Hello
I have deployed a webapplication on SunONE application server installed on a SunOS 5.8 box. When I try to access any page , I keep getiing errors indicating that the page could not be compiled. An attempt to compile the page seperately using the javac installed with the App server however succeeds.
The errors I get are as shown. The same webapp runs fine when installed on SunONE application server installed on Windows 2000 machine. Any help would be greatly appreciated
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
An error occurred at line: 175 in the jsp file: /filesfolders/process_parameters.jsp
Generated servlet error:
/actu01/appserver7/appserv/instances/server1/generated/jsp/j2ee-modules/ap/_jasper/_filesfolders/_index_jsp.java:1962: Variable jbs may not have been initialized.
bFilter = jbs.isDocChanFiltersEnabled();
^
An error occurred between lines: 175 and 176 in the jsp file: /filesfolders/process_parameters.jsp
Generated servlet error:
/actu01/appserver7/appserv/instances/server1/generated/jsp/j2ee-modules/ap/_jasper/_filesfolders/_index_jsp.java:1970: Variable bFolders may not have been initialized.
boolean bEmptyRS = !(bFolders || bExecutables || bDocuments);
Thanks
-AniruddhaI am having a similar problem on Windows 2000. Servlets run but jsp's all hit this error. Here is a copy of the log:
[15/May/2003:07:40:16] INFO ( 1924): CORE1116: Sun ONE Application Server 7.0^M
[15/May/2003:07:40:20] INFO ( 1924): CORE5076: Using [Java HotSpot(TM) Server VM
, Version 1.4.1_01] from [Sun Microsystems Inc.]^M
[15/May/2003:07:40:35] INFO ( 1924): JMS5023: JMS service successfully started.
Instance Name = domain1_server1, Home = [C:\tools\as7se\imq\bin].^M
[15/May/2003:07:40:40] INFO ( 1924): JTS5014: Recoverable JTS instance, serverId
= [100]^M
[15/May/2003:07:40:41] INFO ( 1924): RAR5060: Install JDBC Datasources ...^M
[15/May/2003:07:40:41] INFO ( 1924): RAR5059: Binding [JDBC DataSource Name: jdb
c/jdbc-simple, Pool Name: PointBasePool]^M
[15/May/2003:07:40:42] INFO ( 1924): JMS5015: Install JMS resources ...^M
[15/May/2003:07:40:44] INFO ( 1924): WEB0100: Loading web module [webapps-simple
] in virtual server [server1] at [webapps-simple]^M
[15/May/2003:07:40:48] INFO ( 1924): HTTP3072: HTTP listener http-listener-1 [ht
tp://LINDENBERGR-LT01:80] ready to accept requests^M
[15/May/2003:07:40:48] INFO ( 1924): CORE3274: successful server startup^M
[15/May/2003:07:40:48] INFO ( 1924): CORE5053: Application onReady complete.^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: java.lang.ClassFormatE
rror: sun/tools/java/Parser (Illegal constant pool index)^M
[15/May/2003:07:42:53] SEVERE ( 1924): StandardWrapperValve[jsp]: Servlet.servic
e() for servlet jsp threw exception^M
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:322
)^M
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)^M
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)^M
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(St
andardWrapperValve.java:720)^M
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrap
perValve.java:118)^M
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperVa
lve.java:278)^M
at java.security.AccessController.doPrivileged(Native Method)^M
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:274)^M
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:505)^M
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:212)^M
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:505)^M
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:203)^M
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:505)^M
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProce
ssor.java:157)^M
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)^M
^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.defineClass0(Native Method)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.defineClass(ClassLoader.java:502)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.security
.SecureClassLoader.defineClass(SecureClassLoader.java:123)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
lassLoader.defineClass(URLClassLoader.java:250)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
lassLoader.access$100(URLClassLoader.java:54)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
lassLoader$1.run(URLClassLoader.java:193)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.security
.AccessController.doPrivileged(Native Method)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
lassLoader.findClass(URLClassLoader.java:186)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.loadClass(ClassLoader.java:299)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at sun.misc.Laun
cher$AppClassLoader.loadClass(Launcher.java:265)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.loadClass(ClassLoader.java:255)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.loadClassInternal(ClassLoader.java:315)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.defineClass0(Native Method)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.defineClass(ClassLoader.java:502)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.security
.SecureClassLoader.defineClass(SecureClassLoader.java:123)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
lassLoader.defineClass(URLClassLoader.java:250)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
lassLoader.access$100(URLClassLoader.java:54)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
lassLoader$1.run(URLClassLoader.java:193)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.security
.AccessController.doPrivileged(Native Method)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.net.URLC
lassLoader.findClass(URLClassLoader.java:186)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.loadClass(ClassLoader.java:299)^M
@[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at sun.misc.Laun
cher$AppClassLoader.loadClass(Launcher.java:265)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.loadClass(ClassLoader.java:255)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at java.lang.Cla
ssLoader.loadClassInternal(ClassLoader.java:315)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at sun.tools.jav
ac.BatchEnvironment.parseFile(BatchEnvironment.java:453)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at sun.tools.jav
ac.Main.compile(Main.java:486)^M
[15/May/2003:07:42:53] WARNING ( 1924): CORE3283: stderr: at org.apache.ja
sper.compiler.SunJavaCompiler$JavacTask.run(SunJavaCompiler.java:240)^M
Thanks,
Bob -
Dear friends,
I am unable to install j2ee in my machine. I have java 1.6 update 10 (jdk-6u10-windows-i586-p) installed in my machine. Now I want to install j2ee. I have downloaded java_ee_sdk-6-windows. And installed it. But installation is not proper. My findings are there is no bin folder in the installed folder. Somebody please help me?.
regards
ShihabThere is no bin for J2EE in a conventional sense. You will generally download a J2EE container and use that. For example, Tomcat, JBoss, Bea, etc. Or your IDE, such as NetBeans, may provide one for you. What you really are getting in a J2EE download is an app server and the various J2EE API JAR files that you compile with.
- Saish -
Unable to Compile New Report.vi
Error 7
Error 1003
I am unable to compile the New Report.vi from the Report Generation Toolkit.
I have Windows 2000 and LV 7.1.
I have Forced Re-Compliation of all my VIs (Ctrl-Shift-Run)
I have tried adding Dynamic links in my App build.
What else can I try?Duplicate post, see original thread here.
-D
Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman -
Hi !
When I try to compile in JDev with javac and the java 1.3.1 library, I get the following error :
Error: javac: invalid flag: -source
The command line generated by JDev looks like :
C:\jdk1.3.1_03\bin\javac.exe -J-mx512m -verbose -deprecation -source 1.3 -target 1.3 -encoding Cp1252 -g -classpath [...] -sourcepath [...] -d [...] @C:\DOCUME~1\user\LOCALS~1\Temp\javac54193.tmp
It seems that -source and -target flags do not exist in this version of javac.
But it does not seem possible to remove these flags generated by JDev, so I'm unable to compile with javac 1.3.1 and JDev.
So i'm looking for :
- A workaround to prevent JDev from adding the -source and -target flags.
- A future release of JDev where you could disable these flags, or, much better, where JDev automatically disables these flags when it detects a 1.3.1 library (there may be other incompatible flags I did not mention).
Thank you for your answers :)Hi,
when you open the project properties and choose the compiler option to tht the compiler to "javac" and then the "source" and "target" to 1.3, wouldn't this compile it for Java 3? I don't think that it is necesary to use JDK 1.3 for compiling the sources
Cross-Compilation Options
By default, classes are compiled against the bootstrap and extension classes of the platform that javac shipped with. But javac also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use -bootclasspath and -extdirs when cross-compiling; see Cross-Compilation Example below.
-target version
Generate class files that will work on VMs with the specified version. The default is to generate class files to be compatible with the 1.2 VM in the Java 2 SDK. The versions supported by javac in the Java 2 SDK are:
1.1
Ensure that generated class files will be compatible with 1.1 and VMs in the Java 2 SDK.
1.2
Generate class files that will run on VMs in the Java 2 SDK, v 1.2 and later, but will not run on 1.1 VMs. This is the default.
1.3
Generate class files that will run on VMs in the Java 2 SDK, v 1.3 and later, but will not run on 1.1 or 1.2 VMs.
1.4
Generate class files that are compatible only with 1.4 VMs.
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html
Frank -
Unable to compile class for JSP. apache-tomcat-6. What could be wrong?
Hello, I am new to JSP and I am trying a very basic jsp and class file on Windows XP. I get the Unable to compile class for JSP.
Steps that I have done:
javac ch06_01.java , placed the ch06_01.class under
C:\Apps\apache-tomcat-6.0.16\webapps\ch06\WEB-INF\classes
Then grabbed the ch06_02.jsp and placed it under
C:\Apps\apache-tomcat-6.0.16\webapps\ch06\
When I run it (by placing this into Explorer or Firefox URL
http://localhost:8080/ch06/ch06_02.jsp) I get the error further
below. Things I have done and made sure they are in place are:
set up JAVA_HOME to C:\Apps\jdk1.6.0_06
Using CATALINA_BASE: C:\Apps\apache-tomcat-6.0.16
Using CATALINA_HOME: C:\Apps\apache-tomcat-6.0.16
Using CATALINA_TMPDIR: C:\Apps\apache-tomcat-6.0.16\temp
Using JRE_HOME: C:\Apps\jre1.6.0_06
I did a google on the error and I found people saying to place the
tools.jar from the jsk into the lib directory under CATALINA_HOME. But
the examples still don't work. What step could I be missing? Your help is greatly
appreciated.
This is the simple jsp file:
<%@ page import="ch06_01" %>
<HTML>
<HEAD>
<TITLE>Using a JavaBean</TITLE>
</HEAD>
<BODY>
<H1>Using a JavaBean</H1>
<% ch06_01 messager = new ch06_01(); %>
The message is: <%= messager.msg() %>
</BODY>
</HTML>
this is the simple ch6_01 java file:
public class ch06_01
public ch06_01()
public String msg()
return "Hello from JSP!";
HTTP Status 500 -
type Exception report
message
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:
An error occurred at line: 6 in the generated java file
The import ch06_01 cannot be resolved
An error occurred at line: 9 in the jsp file: /ch06_02.jsp
ch06_01 cannot be resolved to a type
6: <BODY>
7: <H1>Using a JavaBean</H1>
8:
9: <% ch06_01 messager = new ch06_01(); %>
10:
11: The message is: <%= messager.msg() %>
12:
An error occurred at line: 9 in the jsp file: /ch06_02.jsp
ch06_01 cannot be resolved to a type
6: <BODY>
7: <H1>Using a JavaBean</H1>
8:
9: <% ch06_01 messager = new ch06_01(); %>
10:
11: The message is: <%= messager.msg() %>
12:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Edited by: indikon1 on Jun 12, 2008 1:18 PM
I just updated the directories of the variables to reflect the current status of my system.What is wrong is that you are using an "old" jsp tutorial :-)
Since Java 1.4, JSPs have been unable to access classes in the "default" package.
What you need to do:
Put the java class ch06_01 in a package.
Steps to do this
- Edit ch06_01 and add the following to the very top of the file (without the quotes): "package mypackage;"
- create a folder "mypackage"
- move ch06_01.java into that folder
- compile that class (now in the mypackage package)
- place ch06_01.class under C:\Apps\apache-tomcat-6.0.16\webapps\ch06\WEB-INF\classes\mypackage
In your jsp:
<%@ page import="mypackage.ch06_01" %>
I would suggest using a more up-to-date tutorial that uses JSTL.
Take a look at this [Apache Tomcat tutorial|http://www.coreservlets.com/Apache-Tomcat-Tutorial/index.html] -
Unable to compile add.jsp
I am able to run the examples in the tomcat, but unable to run my own add.jsp which tries to connect to oracle9i. The following error is displayed. add.jsp file is copied at the end of this error message.
type Exception report
message
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
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat 4.1\work\Standalone\localhost\examples\add_jsp.java:7: '.' expected
import DbConnect1;
^
1 error
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
at java.lang.Thread.run(Thread.java:534)
The add.jsp contents are
<%@page contentType="text/html" import="DbConnect1,java.util.*,java.sql.*,java.lang.*"%>
<html>
<head><title>JSP Page</title></head>
<%
String no,name,c;
//int n;
no=request.getParameter("NUMBER");
//n=Integer.parseInt(no);
name=request.getParameter("NAME");
c=request.getParameter("check");
if(c==null) c="";
if(c.equals("1"))
out.println("Retry Again");
if(name==null )
{name="";}
if(!name.equals(""))
try{
DbConnect1 t=new DbConnect1();
t.insert(no,name);
response.sendRedirect("display.jsp");
}catch(Exception e){response.sendRedirect("add.jsp?check=1");
else {%>
<form action="add.jsp" method=post>
<input type=hidden name=check>
<BODY BGCOLOR=PURPLE>
<BR><PRE><FONT COLOR=WHITE SIZE=4 STYLE="WESTERN"><B><BR><BR><BR><BR> NUMBER <INPUT TYPE=TEXT SIZE=10 NAME="NUMBER">
<BR><BR> NAME <INPUT TYPE=TEXT SIZE=20 NAME="NAME"><BR>
<BR><BR><BR><BR> <INPUT TYPE="SUBMIT" VALUE="ADD" onClick="display()">
</FORM>
</form>
<%}%>
<SCRIPT LANGUAGE ="JavaScript">
function display()
window.location="/project/display.jsp"; }
</SCRIPT>
</html>
Any help would be greatly appreciated.
Thanks
Geethaif you want to know how to declare a package for your classes
Follow the steps to make your application work
Make this as the first statement in your DbConnect1 class
package DbConnect1;
Compile the class and place the DbConnect1.class file into
Tomcat/webapps/<yourapplication>\WEB-INF\classes\package\ directory
for eg : if your package name is test then place the class files under
Tomcat/webapps/<yourapplication>\WEB-INF\classes\test directory
This is where Tomcat looks for class files
If you have any doubts regarding directory dtructure to be followed in Tomcat please refer to some of the example packages under Root directory
In your JSP say
page import = packageName. DbConnect1
-Hope this helps
Regards
Manikantan -
Tomcat 4.1 Bean error (Unable to compile class for JSP)
Help,
I am using Tomcat 4.1 with with JDK1.3.1_01. I have a JSP page in which I try to use a Bean, but I get the following error from Tomcat.
The JSP page is very simple. I am using package names in the import statement. Code below.
I've put the class files under
<TOMCAT>\webapps\projectname\WEB-INF\classes under the appropriate packages. What else is missing? I can not figure out what I am doing wrong.
***************** START JSP CODE *********************
<html>
<head>
<title>User Information</title>
</head>
<%@ page session="true" %>
<%@ page import="com.xxx.yyy.data.*" %>
<body>
<P> </P>
<P> </P>
<P> </P>
<!--
<jsp:useBean id="user" class="com.xxx.yyy.data.User" scope="session"/>
-->
<%
User user = (User) session.getAttribute("user");
%>
UserID = <%= user.getUserID() %><BR>
User Name = <%= user.getUserName() %><BR>
Password = <%= user.getPassword() %><BR>
Password Hint = <%= user.getPasswordHint() %><BR>
</body>
</html>
***************** END JSP CODE *********************
***************** START TOMCAT ERROR MESSAGE *********************
org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:477)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:182)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2397)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
root cause
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 20 in the jsp file: /userInfo.jsp
Generated servlet error:
[javac] Compiling 1 source file
D:\Apache_Group\Tomcat_4.1\work\Standalone\localhost\PALBO\userInfo_jsp.java:7: package com.xxx.yyy.data does not exist
import com.xxx.yyy.data.*;
^
D:\Apache_Group\Tomcat_4.1\work\Standalone\localhost\PALBO\userInfo_jsp.java:61: package com.xxx.yyy.data does not exist
com.xxx.yyy.data.User user = null;
^
An error occurred at line: 20 in the jsp file: /userInfo.jsp
Generated servlet error:
D:\Apache_Group\Tomcat_4.1\work\Standalone\localhost\PALBO\userInfo_jsp.java:63: package com.xxx.yyy.data does not exist
user = (com.xxx.yyy.data.User) pageContext.getAttribute("user", PageContext.SESSION_SCOPE);
^
An error occurred at line: 20 in the jsp file: /userInfo.jsp
Generated servlet error:
D:\Apache_Group\Tomcat_4.1\work\Standalone\localhost\PALBO\userInfo_jsp.java:66: package com.xxx.yyy.data does not exist
user = (com.xxx.yyy.data.User) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.xxx.yyy.data.User");
^
An error occurred at line: 25 in the jsp file: /userInfo.jsp
Generated servlet error:
D:\Apache_Group\Tomcat_4.1\work\Standalone\localhost\PALBO\userInfo_jsp.java:77: cannot resolve symbol
symbol : class User
location: class org.apache.jsp.userInfo_jsp
User user = (User) session.getAttribute("user");
^
An error occurred at line: 25 in the jsp file: /userInfo.jsp
Generated servlet error:
D:\Apache_Group\Tomcat_4.1\work\Standalone\localhost\PALBO\userInfo_jsp.java:77: cannot resolve symbol
symbol : class User
location: class org.apache.jsp.userInfo_jsp
User user = (User) session.getAttribute("user");
^
6 errors
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:120)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:326)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:182)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2397)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
***************** END TOMCAT ERROR MESSAGE *********************Hi
I am running my Tomcat apps (on a Windows dev machine) in an alternate location (ie. not default webapps). The same crap comes to me every time. Unable to install etc. I have tried every trick in the book regarding classpath settings etc.
When I use 'javap' to check the classpath from any location on my machine, its works and javap returns the signature of my class.
When I use it though Tomcat (with the import set to include the filename), it get the error. I have heard rumors that using JDK 1.3 in stead of 1.4 helps, but I just want it to work with 1.4 :)
So if any of you can help me on this, please.
PS. On my linux server it works just fine, as does every other thing on that machine ;)
Chris (chris.schuit <at> euronet.nl) -
Dear all,
I've used java.util.List in my jsp, but when I import the package into the jsp, the following error occurs, please help:
Type: Exception Report
Message: Internal Server Error
Exception
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
C:\Sun\AppServer7\domains\domain1\server1\generated\jsp\j2ee-modules\EmailTracker2\_jasper\_index_jsp.java:14: class jasper.index_jsp must be declared abstract. It does not define java.util.List getIncludes() from class org.apache.jasper.runtime.HttpJspBase.
public class indexjsp extends HttpJspBase {
^
1 error, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.loadJSP(JspServlet.java:641)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.access$000(JspServlet.java:501)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:322)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)Hi,
I am using J2EE SDK 1.4 Server and deployed a Stateless Session Bean and used a JSP page as Web Deployment component. When I deploy the application no error is given but when I access application using the given web context name the following error is displayed on the browser.
type Exception report
message
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
No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually
$JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and
access path.
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:132)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:356)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:420)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:444)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:557)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
Can anyone tell me why this error could be generated? I've given the JAVA_HOME environment variable value as C:\Sun\AppServer\jdk and J2EE_HOME variable value as C:\Sun\AppServer. -
Unable to compile JSP in Java Server
Hi:
I have installed Java Application Server Platform Edition 8 locally and attempting to run an application with a JSP. However, when it attempts to compile the JSP, I get the following message:
org.apache.jasper.JasperException: Unable to compile class for JSP
No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:132)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:356)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:420)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:444)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:557)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
I thought that Tomcat came with the implementation of the JAVA server. If so, why am I getting this message? Do I have to also install Tomcat separately? If yes, is there anything I need to know about port conflicts? Java Server is currently using 8080 for HTTP. Please advise as to how I can resolve this problem.Hi,
You may want to search this forum using the search term "Unable to compile class for JSP" you will get many hits and some suggestions on what may be the issue.
http://onesearch.sun.com/search/developers/index.jsp?col=devforums&qp_name=J2EE+Software+Development+Kit+%28J2EE+SDK%29&qp=forum%3A136&qt=Unable+to+compile+class+for+JSP -
Generated servlet error - unable to compile class for JSP - using NB5.5/SS9
I am using NB5.5 beta2 and Sun server 9.0 with JSF 1.1 - all is OK when I am creating firts JSF application - welcomeJSF.jsp page is rendered normally - but when I am adding one more jsp with JSP view and so on - then - I am getting errors in both JSF pages - both - in original welcomeJSF and the new invoice.jsp page
here is code for typical error
org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:99: cannot find symbol
[javac] symbol : method setJspId(java.lang.String)
[javac] location: class com.sun.faces.taglib.jsf_core.ViewTag
[javac] jspxth_f_view_0.setJspId("id7");
[javac] ^
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:144: cannot find symbol
[javac] symbol : method setJspId(java.lang.String)
[javac] location: class com.sun.faces.taglib.html_basic.OutputTextTag
[javac] jspxth_h_outputText_0.setJspId("id17");
[javac] ^
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:145: setValue(java.lang.String) in com.sun.faces.taglib.html_basic.OutputTextTag cannot be applied to (javax.el.ValueExpression)
[javac] jspxth_h_outputText_0.setValue(org.apache.jasper.runtime.PageContextImpl.getValueExpression("Java Server Faces", (PageContext)_jspx_page_context, java.lang.Object.class, null));
[javac] ^
[javac] 3 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:94)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:384)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:461)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:528)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:507)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:530)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:414)
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:455)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:139)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
note The full stack trace of the root cause is available in the Sun Java System Application Server Platform Edition 9.0 logs.
and there is output for another error:
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:144: cannot find symbol
[javac] symbol : method setJspId(java.lang.String)
[javac] location: class com.sun.faces.taglib.html_basic.OutputTextTag
[javac] jspxth_h_outputText_0.setJspId("id17");
[javac] ^
Generated servlet error:
[javac] E:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\ERPSolution\org\apache\jsp\welcomeJSF_jsp.java:145: setValue(java.lang.String) in com.sun.faces.taglib.html_basic.OutputTextTag cannot be applied to (javax.el.ValueExpression)
[javac] jspxth_h_outputText_0.setValue(org.apache.jasper.runtime.PageContextImpl.getValueExpression("Java Server Faces", (PageContext)_jspx_page_context, java.lang.Object.class, null));
[javac] ^
[javac] 3 errors
and here is code of my new invoice.jsp page:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1><h:outputText value="Java Server Faces" /></h1>
<h:inputText value="#{managerBean.currentInvoice.id}"/>
<h:inputText value="#{managerBean.currentInvoice.description}"/>
<h:inputText value="#{managerBean.currentInvoice.total}"/>
<h:commandButton value="new_invoice"
type="submit"
actionListener="#{managerBean.createNewInvoice}"/>
</body>
</f:view>and faces-config.xml file:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config>
<managed-bean>
<managed-bean-name>managerBean</managed-bean-name>
<managed-bean-class>com.brl.ERPSolution.ui.ManagerBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>managerBean was intended to be backing beans which will call the facaed beans of EJB 3.0 entity beans - but at presnet - almost empty methods are declared there:
package com.brl.ERPSolution.ui;
import javax.faces.event.ActionEvent;
import com.brl.solutions.EJB3.*;
* @author Administrator
public class ManagerBean {
protected int currentInvoiceId;
protected Invoices currentInvoice;
protected InvoicesFacade invoicesFacade;
/** Creates a new instance of ManagerBean */
public ManagerBean() {
/* business methods */
public void createNewInvoice(ActionEvent actionEvent)
invoicesFacade.create(this.currentInvoice);
public Invoices getCurrentInvoice()
return this.currentInvoice;
public void setCurrentInvoice(Invoices currentInvoice)
this.currentInvoice=currentInvoice;
}I read in one blog (actually - the only page which was returned by yahoo - so - this should be very rare error!!!) to try to use Sun server's verifier.bat - and - it reported 0 errors and 0 warning. Build was succesfull as well and also - deployment was without errors - but - above mentioned error appeared during the automatic compilation of jsp pages/servlet when newly deployed jsps are first accessed from remote browser.
So - is it possible, please, to receive some advice - what to do further? I feel that my invoice.jsp page can be with errors, - however - the original welcomeJSF.jsp should be working without errors even the erronwous JFS jsp page is added to web application.
Thans for any adice or hint in advance!!!OK - I have made 'clean and build main project' from NB menu and the deployed the resulting *.war and the error messages have disappeared... So - it seems to be bug...
-
Suddenly unable to compile glib2 for mingw32
I maintain the mingw32-glib2-* packages in AUR and after modifying the PKGBUILD for mingw32-glib2 (conforming to MinGW PKGBUILD guidelines and properly quoting URLs/paths), I find myself unable to compile it fully, with the following error:
Traceback (most recent call last):
File "../../../gio/gdbus-2.0/codegen/gdbus-codegen", line 41, in <module>
sys.exit(codegen_main.codegen_main())
File "/home/christian/Downloads/mingw32-glib2/src/glib-2.30.2/gio/gdbus-2.0/codegen/codegen_main.py", line 171, in codegen_main
parsed_ifaces = parser.parse_dbus_xml(xml_data)
File "/home/christian/Downloads/mingw32-glib2/src/glib-2.30.2/gio/gdbus-2.0/codegen/parser.py", line 289, in parse_dbus_xml
parser = DBusXMLParser(xml_data)
File "/home/christian/Downloads/mingw32-glib2/src/glib-2.30.2/gio/gdbus-2.0/codegen/parser.py", line 57, in __init__
self._parser.Parse(xml_data)
File "/home/christian/Downloads/mingw32-glib2/src/glib-2.30.2/gio/gdbus-2.0/codegen/parser.py", line 155, in handle_start_element
if attrs.has_key('name') and self.doc_comment_last_symbol == attrs['name']:
AttributeError: 'dict' object has no attribute 'has_key'
make[6]: *** [gdbus-example-objectmanager-generated.h] Error 1
Here is the current PKGBUILD (unsubmitted):
pkgname=mingw32-glib2
pkgver=2.30.2
pkgrel=4
arch=(any)
pkgdesc="Common C routines used by GTK+ 2.4 and other libs (mingw32)"
depends=(mingw32-runtime mingw32-gettext mingw32-zlib mingw32-libffi)
makedepends=(mingw32-gcc python2)
license=(LGPL)
options=(!strip)
url="http://www.gtk.org/"
source=("http://ftp.gnome.org/pub/GNOME/sources/glib/2.30/glib-$pkgver.tar.xz")
sha256sums=('f0e91e6333321ddb48fa12b5c66f56c3d5f05325748c66dd2e9016c278ff8e82')
build()
cd "$srcdir/glib-$pkgver"
cat > win32.cache << EOF
glib_cv_long_long_format=I64
glib_cv_stack_grows=no
EOF
export CFLAGS="-O2 -pipe -march=i686 -mms-bitfields"
export CPPFLAGS="-D_REENTRANT"
export PKG_CONFIG_LIBDIR="/usr/i486-mingw32/lib/pkgconfig"
unset PKG_CONFIG_PATH
unset LDFLAGS
PYTHON="/usr/bin/python2"
./configure \
--prefix=/usr/i486-mingw32 \
--host=i486-mingw32 \
--cache-file=win32.cache \
--with-threads=win32
make
package() {
cd "$srcdir/glib-$pkgver"
make DESTDIR="$pkgdir" install
cd ${pkgdir}
rm -rf usr/i486-mingw32/{share/{gtk-doc,man},lib/charset.alias}
rm $pkgdir/usr/i486-mingw32/lib/*.def
i486-mingw32-strip $pkgdir/usr/i486-mingw32/bin/*.exe
i486-mingw32-strip -x $pkgdir/usr/i486-mingw32/bin/*.dll
i486-mingw32-strip -g $pkgdir/usr/i486-mingw32/lib/*.a
I appreciate any help I can get. Thanks!
EDIT: Fixed!
Last edited by Schala (2012-03-12 08:40:18)I don't know if it is the same probleme you had but may be it will help you.
You need to add a path and a classpath to variables and class you are using (for example sevlet.*) in autoexec.bat or in environment variables if you are using NT or Windows 2000. -
Noobie: unable to compile a simple test
Hello all,
I'm unable to compile a simple test to connect to the database, here is the env data:
OS: windowsXP (32bit).
compiler/linker: mingw.
IDE: codeblocks.
the program is:
#include <iostream>
#include <algorithm>
#include <occi.h>
using namespace oracle::occi;
using namespace std;
class occicoll
private:
Environment *env;
Connection *conn;
Statement *stmt;
string tableName;
string typeName;
public:
occicoll (string user, string passwd, string db)
env = Environment::createEnvironment (Environment::OBJECT);
conn = env->createConnection (user, passwd, db);
~occicoll ()
env->terminateConnection (conn);
Environment::terminateEnvironment (env);
int main()
return 0;
and I get this compiler errors:
|=== TestOCCI, Debug ===|
C:\XEClient\oci\include\oratypes.h|98|Error E2257 : , expected|
C:\XEClient\oci\include\oratypes.h|99|Error E2238 : Multiple declaration for '_int64'|
C:\XEClient\oci\include\oratypes.h|98|Error E2344 : Earlier declaration of '_int64'|
C:\XEClient\oci\include\oratypes.h|99|Error E2257 : , expected|
C:\XEClient\oci\include\oratypes.h|104|Error E2257 : , expected|
C:\XEClient\oci\include\oratypes.h|105|Error E2257 : , expected|
main.cpp|33|Error E2176 : Too many types in declaration|
main.cpp|34|Error E2111 : Type 'occicoll' may not be defined here|
main.cpp|36|Error E2034 : Cannot convert 'int' to 'occicoll' in function main()|
||=== Build finished: 9 errors, 0 warnings ===|
most like I'm missing a few flags, any Ideas?
thanks,
GalHi,
OS: windowsXP (32bit).
compiler/linker: mingw.
On Windows the only supported environment is Visual Studio / cl.exe (the Microsoft compiler).
Regards,
Mark -
Unable to compile class for JSP: import ...
Hi everybody!
I've tried to change from Servlet to JSP. The Servlet used a package und compiled fine under NB 4.1.
When the JSP is compiled on the Server (Sun Java System Application Server Platform Edition 8 2004Q4 Beta) the following error occurs:
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
[javac] D:\Programme\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\NR_Java4Web1\org\apache\jsp\DisplayingDatabaseRecords_jsp.java:44: illegal start of expression
[javac] import de.conus.util.DBUtil.*
[javac] ^
Do I have to place the classfile manually on the server?
Thanks for your help,
MichaelAll import-statements where of the same kind. I had to place trhe classfiles
at the application server under lib\classes. Now it works
Thanks
Maybe you are looking for
-
Hye craig, hamid, christian and all ........... i have a user access interface which i create where there are two fields username and password and a button, i have also created a table USERS for users which have username and password fields ..... On
-
Error while executing webgui service
Hi All, I have created a R/3 system(system object, system alias) in portal and maintained the ITS properties. When i am testing the connection for the ITS its working fine. When i am trying to execute the servie "webgui" in R/3 system by using the T-
-
Upgrading from OS X 10.4.0/1 to 10.4.7
Another quickie, can one upgrade - safely - from Tiger 10.4.0 or 1 to 10.4.7 WITHOUT downloading and implementing the intermediary upgrades (ie.: 10.4.2 then to 10.4.3, et al?) I've just downloaded 10.4.7 and though the system requirements, according
-
Problem with file transfer via wi-fi!
Hi, folks, Please, could someone help me to get a music file I made using Groovemaker app? After finish the mix, I built a song. Then, I saved it in the "mix browser". In the end of the exporting process, I typed the URL address displayed in the brow
-
How can I install Tiger upgrade on Power Mac G5?
I have PowerMac G5 with OSX 3.9. I bought retail disk of Tiger but it will not install as upgrade. It goes past the restart process but stops shortly after installation begins with message telling me that installation failed. I originally bought Leop