Last version of class file not called by Tomcat
Hi,
I'm a beginner in JSP/Tomcat.
I would like to include as much java code as possible inside java classes and just call java methods from my JSP pages.
For instance in project PCliente I've created the Java class
/u5/web/jakarta-tomcat-4.1.27/webapps/ROOT/WEB-INF/classes/PCliente.java
The class compiles successfully into PCliente.class which is stored in the same directory as the source.
The first time I call the class from my JSP page it runs OK.
The jsp page is in
/u5/web/jakarta-tomcat-4.1.27/webapps/ROOT/pcliente/resultados.jsp.
After I make some changes in PCliente.java, compile it, and run again the class from the JSP page, it doesn't get the last version of PCliente.class but a previous version. Also, I ignore where this previous version is kept (I assume Tomcat keeps a backup !? Where ?).
Can someone please tell me what am I (or Tomcat or both) doing wrong ?
I still have a serious handicap with Tomcat's configuration. A simple hint regarding this problem would be very apreciated.
I'm using Tomcat 4.1.27 and J2SDK 1.3.1_9 installed in a Solaris environment.
Thanks for your help,
Miguel
Hi,
It sounds like your hitting the good ole rule that you need to restart the web application server (sometimes just a refresh will work, depends on the app server) when deploying new/updated classes.
In short, if you restart Tomcat it should use the newer class...
dapanther...
Similar Messages
-
Fire FTP does not work with Firesfox 4. It worked OK with version 3. How can I get a New Fire FTP? Last version of FTP does not solve the problem
I need to know if it's 64-bit or 32-bit.
If it's 64-bit, try copying the mms.cfg file from C:\WINDOWS\syswow64\Macromed\Flash to C:\WINDOWS\system32\Macromed\Flash -
Since I updated my iPhone, with the last version , Siri it's not working at all.
Have you changed location (e.g., in a different country)?
See this article about countries that support Siri: http://www.apple.com/ios/feature-availability/
Also, from the HT4992 article you attached: "* Siri is currently in Beta. Siri requires Internet access. Siri may not be available in all languages or in all areas, and features may vary by area. Cellular data charges may apply." -
Last version of keynote do not allow quicktime export
last version of keynote do not allow interactive quicktime export.
I used alot that functionality to give my sales team presentation they uses on their PC.
My workflow is broken any idea on how to get this functionality back???Thanks a lot, I am still discovering Pages and have not yet gotten a proper sense ao the "lay of the land"
-
Why is U51 blocking individual class files not in jars but U45 accepted them?
Let me answer the "why do you need individual class files?" question first. We have a rather large applet based application with a current client-side minimum jar download size of 1.8 MB. If we put ALL of our class files into jars, that size will probably double. Most users only use a small portion of the class files for their particular tasks. Which of the class files they use depends upon the tasks they perform. Having ALL users download ALL the classes, albeit compressed in jars, is extremely time consuming and a major problem after application updates due to the large number of users and the network load it would cause.
Jar file manifest:
Permissions: all-permissions
Codebase: *
Application-Name: MyApplication
Application-Library-Allowable-Codebase: *
Caller-Allowable-Codebase: *
Trusted-Library: true
We have 11 directories with one containing the applet and main client application code. The other 10 directories contain class files relating to the various sub-applications in the system. The system has a third-party runtime jar file, too.
We have a private network and servers for our business so the exposure is small. This is a screen-scraping, reformattring application that does no real data processing so doesn't need the same security as a true data processing application. Since we are not open to the Internet and of limited security risk, we chose to keep a more simplified structure.
This all worked under 1.7.0_45. I read the security guide and it was my understanding that these attributes in the manifest would also work for U51. Apparently not. Looking at the guides, now, it appears they have been changed sometime last year regarding mixed-code to mean jars with certificates and jars without certificates. The support for individual class files appears to have been removed. If this is true, then there should have been a beta of the U51 code because the rules seem to have been changed since the last release or there is a new bug.This is exactly my same problem. My app (and applet) is about 5 MB if I consider all the classes and libraries used by the app. (I mean 5MB is the size of the jar file). I can't ask customers to download 5 MB every time they want to access the program.
We need java ask code signing for the principal applet but then we must have the possibility to run single class files as needed.
Help us all please.
Thanks Paolo -
Maven problem: class file not added in excecutable after compilation
Hi,
I ran into the following issue.
I created a program, capable of reading an identity card from an electronic card reader. I use maven for dependency management and compilation.
The libraries used for reading the card reader are not from any maven repository. So I cheated a little bit and added the jar file to the repository myself
and created a pom file for it too in the repository. I respected the structure groupId - artifactId - version . It is something like
<dependency>
<groupId>be.belgium.eid</groupId>
<artifactId>beid35JavaWrapper-win</artifactId>
<version>3.5</version>
<type>jar</type>
</dependency>
The jar file and a pom file are then to be found on that location. When running the program in my development environment, everything runs fine.
But when I create an executable for this program, the class files for these libs are not added to the created executable.
questions:
1/ Do I also need to create the .sha1 file for this. If so: how?
2/ What are these .sha1 files
3/ Has anyone written a similar program, but with eid libs from maven? Which ones?
thanks for any help
Edited by: user8276126 on Apr 2, 2011 9:07 AMtry clearing cache and restarting tomcat. If you post the code that you are using to call the methods it will help to find the issue.
-
Ant tools: converter java card - class file not belonging to the package!
Hi
I have another problem with converter. Could you help me please again if you have the time?
I have created a directory when I save the class files generated by javac. After That , I use convert in this way:
<convert
JCA="true"
EXP="true"
CAP="true"
packagename="testUn/classes/testUn"
packageaid="0x01:0x01:0x01:0x01:0x01:0x01:0x01:0x01:0x02:0x00"
majorminorversion="1.0"
verbose = "true">
<AppletNameAID
appletname="testUn.classes.testUn.PorteAppUn"
aid="0x01:0x01:0x01:0x01:0x01:0x01:0x01:0x01:0x02:0x00:0x00"/>
<classpath refid="classpath"/>
</convert>
Here is the answer of the computer:
[echo] Generation of the CAP,JCA and EXP files...
[convert] Java Card Ant Tasks, Version 1.0
[convert] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
[convert] Note: Usage of Java Card Ant Tasks is optional. Java Card Ant Tasks are not supported by Sun Microsystems, Inc.
[convert] Java Card 2.2.2 Class File Converter, Version 1.3
[convert] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
[convert] parsing /home/ehoudart/app-manager/VersionZero/src/testUn/classes/testUn/PorteAppUn.class
[convert] converting testUn.PorteAppUn
[*convert] error: class PorteAppUn does not belong to package testUn.classes.testUn.*
[convert] conversion completed with 1 errors and 0 warnings.
I do not understand why this unique applet class file does not belong to its own package. Is someone an idea?
Thanks very much in advance for your answer.Here is a complete example build.xml (I think I have posted this before).
<?xml version="1.0" encoding="UTF-8" ?>
<project default="convert" name="javacard-starter">
<!-- Build specific properties -->
<property name="target.classes" location="${basedir}/target/classes" />
<property name="target.javacard" location="${basedir}/target/javacard" />
<property name="source.java" location="${basedir}/src/main/java" />
<!-- Must point to the folder containing the JAR files from the JCDK -->
<property name="javacard.libs" location="${basedir}/lib" />
<!-- Must point to the folder containing the JAR file from the JCDK ant task -->
<property name="javacard.ant-task" location="${basedir}/lib" />
<!-- Must point to the folder containing the API export files from the JCDK -->
<property name="javacard.export" location="${basedir}/src/main/export" />
<property name="verbose" value="true" />
<property name="noverify" value="false" />
<!-- Path for JC tasks -->
<path id="classpath">
<fileset dir="${javacard.ant-task}">
<include name="*.jar" />
</fileset>
<fileset dir="${javacard.libs}">
<include name="*.jar" />
</fileset>
</path>
<!-- set the export path to the Java Card export files -->
<path id="export" description="set the export file path">
<fileset dir="${javacard.export}">
<include name="**/*.exp" />
</fileset>
<pathelement path="${javacard.export}" />
<pathelement path="${target.classes}" />
<pathelement path="${target.javacard}" />
</path>
<!-- Definitions for tasks for Java Card tools -->
<taskdef name="capgen" classname="com.sun.javacard.ant.tasks.CapgenTask" classpathref="classpath" />
<taskdef name="deploycap" classname="com.sun.javacard.ant.tasks.DeployCapTask" classpathref="classpath" />
<taskdef name="convert" classname="com.sun.javacard.ant.tasks.ConverterTask" classpathref="classpath" />
<taskdef name="verifyexport" classname="com.sun.javacard.ant.tasks.VerifyExpTask" classpathref="classpath" />
<taskdef name="verifycap" classname="com.sun.javacard.ant.tasks.VerifyCapTask" classpathref="classpath" />
<taskdef name="verifyrevision" classname="com.sun.javacard.ant.tasks.VerifyRevTask" classpathref="classpath" />
<typedef name="appletnameaid" classname="com.sun.javacard.ant.types.AppletNameAID" classpathref="classpath" />
<typedef name="jcainputfile" classname="com.sun.javacard.ant.types.JCAInputFile" classpathref="classpath" />
<target name="init">
<mkdir dir="${target.classes}" />
<mkdir dir="${target.javacard}" />
</target>
<target name="clean">
<delete dir="${target.classes}" />
<delete dir="${target.javacard}" />
<delete dir="${javacard.eeprom}" />
</target>
<target name="compile" depends="init" description="Compile source code to class files">
<!-- Compile the java code from ${src} to ${classes} -->
<javac debug="yes" optimize="no" srcdir="${source.java}" destdir="${target.classes}" source="1.5" target="1.5">
<classpath refid="classpath" />
</javac>
</target>
<target name="convert" depends="compile" description="Convert class files to cap files">
<convert packagename="chaining" packageaid="0xF0:0x00:0x00:0x01:0x00:0x01" majorminorversion="1.0" classdir="${target.classes}" outputdirectory="${target.classes}" jca="true" exp="true" cap="true" debug="true" verbose="${verbose}" noverify="${noverify}">
<appletnameaid aid="0xF0:0x00:0x00:0x01:0x00:0x01:0x00:0x01" appletname="chaining.ChainingApplet" />
<exportpath refid="export" />
<classpath refid="classpath" />
</convert>
</target>
<target name="copy-debug">
<mkdir dir="${target.debug}" />
<echo>Copying cap files</echo>
<copy flatten="true" todir="${target.debug}" verbose="true">
<fileset dir="${target.classes}" includes="**/*.cap" />
<fileset dir="${target.classes}" includes="**/*.exp" />
<fileset dir="${target.classes}" includes="**/*.jca" />
</copy>
</target>
<target name="all" depends="clean, convert" />
</project> -
String.format() error (works in a class file , not in jsp)
Hello all,
I am using Java 5 and am trying to use the String.format() method in a jsp but am getting the following error:
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: 5 in the jsp file: /ajax.jsp
Generated servlet error:
C:\Documents and Settings\gforte\.netbeans\5.0beta2\jakarta-tomcat-5.5.9_base\work\Catalina\localhost\agi\org\apache\jsp\ajax_jsp.java:50: cannot find symbol
symbol : method format(java.lang.String,java.util.Date,java.util.Date)
location: class java.lang.String
String dateString = String.format("%tb%td",date,date);
^
1 error
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:246)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
Apache Tomcat/5.5.9
The code I am using is working fine in a class file but wont work in my jsp.
<%@page import="java.util.*,java.lang.String"%>
Date date = new Date();
String dateString = String.format("%tb%td",date,date);
System.out.println(dateString);Any ideas?I get excactly the same problem.
If compile the the JSP in Netbeans it works fine, however when Tomcat attempts to compile it into a servlet at runtime, I get the same error as described.
This is the line in JSP that fails:
<code>Some more text <%= String.format("%s","Bizarre") %> </code>However this one works OK:
<code>Some more text <%= "Bizarre".substring(3) %> </code>Its almost as if Tomcat is compiling under JDK 1.4.2 or something but I don't have any other JDK or JRE installed; only 1.5.
I suspect it may be a Tomcat setting that's causing a 1.4 code compliance.
In Netbeans, if I go to the project properties -> Sources, at the bottom is the "Source Level" drop down list. If I change this to 1.4 and clean and build the whole project I get the same error when the jsp (or any class with this construct) is compiled by NetBeans.
Note: I am using the Netbeans 5.0 and Tomcat and 5.5.9 co-bundle which I downloded from the Sun website.
Can anyone help?
Heres the splurge from the browser output:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 55 in the jsp file: /login.jsp
Generated servlet error:
C:\Documents and Settings\Peter\.netbeans\5.0\jakarta-tomcat-5.5.9_base\work\Catalina\localhost\SuperStruts\org\apache\jsp\login_jsp.java:105: cannot find symbol
symbol : method format(java.lang.String,java.lang.String)
location: class java.lang.String
out.print( String.format("%s","Bizarre") );
^
1 error
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:246)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
Note also that when I run this JSP page:
<%@page import="java.util.*"%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%
Properties p = System.getProperties();
Enumeration keys = p.keys();
Object key;
while (keys.hasMoreElements()) {
key = keys.nextElement();
out.println("key: " + key + " - " + p.getProperty((String)key) + "<br/>");
%> ... I get this browser output:
key: java.runtime.name - Java(TM) 2 Runtime Environment, Standard Edition
key: sun.boot.library.path - C:\Program Files\Java\jdk1.5.0_06\jre\bin
key: java.vm.version - 1.5.0_06-b05
key: shared.loader - ${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
key: java.vm.vendor - Sun Microsystems Inc.
key: java.vendor.url - http://java.sun.com/
key: path.separator - ;
key: tomcat.util.buf.StringCache.byte.enabled - true
key: java.vm.name - Java HotSpot(TM) Client VM
key: file.encoding.pkg - sun.io
key: user.country - GB
key: sun.os.patch.level - Service Pack 2
key: java.vm.specification.name - Java Virtual Machine Specification
key: user.dir - C:\Program Files\netbeans-5.0\enterprise2\jakarta-tomcat-5.5.9\bin
key: java.runtime.version - 1.5.0_06-b05
key: java.awt.graphicsenv - sun.awt.Win32GraphicsEnvironment
key: java.endorsed.dirs -
key: os.arch - x86
key: java.io.tmpdir - C:\Documents and Settings\Peter\.netbeans\5.0\jakarta-tomcat-5.5.9_base\temp
key: line.separator -
key: java.vm.specification.vendor - Sun Microsystems Inc.
key: java.naming.factory.url.pkgs - org.apache.naming
key: java.util.logging.manager - org.apache.juli.ClassLoaderLogManager
key: user.variant -
key: os.name - Windows XP
key: sun.jnu.encoding - Cp1252
key: java.library.path - C:\Program Files\Java\jdk1.5.0_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\oracle\product\10.2.0\db_2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program Files\CVSNT\
key: java.specification.name - Java Platform API Specification
key: java.class.version - 49.0
key: sun.management.compiler - HotSpot Client Compiler
key: os.version - 5.1
key: user.home - C:\Documents and Settings\Peter
key: catalina.useNaming - true
key: user.timezone - Europe/London
key: java.awt.printerjob - sun.awt.windows.WPrinterJob
key: file.encoding - Cp1252
key: java.specification.version - 1.5
key: catalina.home - C:\Program Files\netbeans-5.0\enterprise2\jakarta-tomcat-5.5.9
key: java.class.path - C:\Program Files\Java\jdk1.5.0_06\lib\tools.jar;C:\Program Files\netbeans-5.0\enterprise2\jakarta-tomcat-5.5.9\bin\bootstrap.jar
key: user.name - Peter
key: java.naming.factory.initial - org.apache.naming.java.javaURLContextFactory
key: package.definition - sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
key: java.vm.specification.version - 1.0
key: java.home - C:\Program Files\Java\jdk1.5.0_06\jre
key: sun.arch.data.model - 32
key: user.language - en
key: java.specification.vendor - Sun Microsystems Inc.
key: awt.toolkit - sun.awt.windows.WToolkit
key: java.vm.info - mixed mode
key: java.version - 1.5.0_06
key: java.ext.dirs - C:\Program Files\Java\jdk1.5.0_06\jre\lib\ext
key: sun.boot.class.path - C:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\i18n.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_06\jre\classes
key: server.loader - ${catalina.home}/server/classes,${catalina.home}/server/lib/*.jar
key: java.vendor - Sun Microsystems Inc.
key: catalina.base - C:\Documents and Settings\Peter\.netbeans\5.0\jakarta-tomcat-5.5.9_base
key: file.separator - \
key: java.vendor.url.bug - http://java.sun.com/cgi-bin/bugreport.cgi
key: common.loader - ${catalina.home}/common/classes,${catalina.home}/common/i18n/*.jar,${catalina.home}/common/lib/*.jar
key: sun.io.unicode.encoding - UnicodeLittle
key: sun.cpu.endian - little
key: package.access - sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
key: sun.desktop - windows
key: sun.cpu.isalist - demonstrating (I think) that the correct JDK and JDK are in use by Tomcat. -
i have some class files, and i need to know what Java compiler used to compiled that class file (only care for the version number...like 1.4.2, 1.5.0, 1.1.0, etc)
any one know how i can get this info? or any good google keywords?thanx, since now i know how the class file bytes are set up..i guess i can get the version number by looking at the hex.
tedious (but not that tedious)...thought there be a simplier way...oh well..
thanx again -
Updated Class files not generated
Hi ,
I am using Eclipse SDK Version: 3.2.2 and have configured with my project and weblogic server. When the application is running in debug mode if necessary making some fix and when i use ctrl+b the new class file should be generated and immediately the application should refer to the new class file without expecting to restart the weblogic server.
But that's not happening, when i do a ctrl+b the class files are cleaned and new class files are not getting generated,moreover this cleaning is also consuming lot of time.
Can some body help me to resolve this , so that i can save lot of time in restarting the server for every small fix too.
Regards
SathyaHi ,
I am using Eclipse SDK Version: 3.2.2 and have configured with my project and weblogic server. When the application is running in debug mode if necessary making some fix and when i use ctrl+b the new class file should be generated and immediately the application should refer to the new class file without expecting to restart the weblogic server.
But that's not happening, when i do a ctrl+b the class files are cleaned and new class files are not getting generated,moreover this cleaning is also consuming lot of time.
Can some body help me to resolve this , so that i can save lot of time in restarting the server for every small fix too.
Regards
Sathya -
Hi All,
I just set up IdM 7.0. I took the classes folder from my colleague's machine and pasted it in the WEB-INF folder in my local. (I am using tomcat).
When I am running my application at one instance it calling a class, but I am getting the following message
XPRESS exception:
Class <package>.<classname> not found
I have added entry in the environment variables also. What all I could do I believe I have done bhut still it is giving me this error. I even compiled the java file and created the class file in my system, but still it is not working ( though that will not be a problem because class files are machine independent). I even tried putting the whole path upto the class file, into the environment variable. But still this error is coming.
Please help me.
Regards
Alex
Edited by: AlexRaju on Apr 16, 2008 11:15 AM
Edited by: AlexRaju on Apr 16, 2008 11:16 AMtry clearing cache and restarting tomcat. If you post the code that you are using to call the methods it will help to find the issue.
-
Identify Java version from CLASS file
Hi,
I have a .class file. I would like to identify the Java version from that.
Is there a way to find out?
Also, is there a way to find out the Java version from JAR file?
Thanks.Kavipriya wrote:
I have a .class file. I would like to identify the Java version from that.
Is there a way to find out?Sure, there's the major version number (48, 49, 50) included in the class files. Look for the class file specification, shouldn't be too hard to find. -
How to decide from class file that which java version (1.3, 1.4 etc) was used to compile it?
Sorry I made a mistake,
its minor, major
Dont we have some utility given by Sun for this?
javap -verbose <classname>will print out versions plus more...
Do I need to use InputStream for reading class file then see the version?
DataInputStream din = new DataInputStream(new FileInputStream(classFile));
din.readInt();
short minor = din.readShort();
short major = din.readShort();Why do you need to do this? -
Java class files not found error in jsp sub-directories
Hello:
I have a web-application that is setup in the following way:
index.jsp
test\index1.jsp
WEB-INF\classes\test.class
Both jsp pages index.jsp and index1.jsp uses the test.class in the WEB-INF\classes directory.
The index.jsp page works fine.
The test\index1.jsp gives me a "cannot resolve symbol" error. Error shown below:
[jsp src:line #:19]
cannot resolve symbol symbol : class test location: class test.index1 test ts = new test("hello");
Any help at all is appreciated.
Thanks,
BennyHello Qiang:
Thanks a lot for replying, and sorry for the delay in replying back to you. I have been searching the forums for a while and have yet to find anyone else with a similar problem. And yes, it is kinda wierd.
But, anyways, I checked the java version from the windows command line as follows and it is using version 1.4.2:
java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
Also, here are the contents of my test.class file:
public class test
private String t = null;
public test(String t1)
setTest(t1);
public void setTest(String t1)
t = t1;
public String getTest()
return t;
Here are the contents of my index.jsp file:
<b> hello </b>
<%
String test_str = null;
test ts = new test("Hello from the main jsp directory");
test_str = ts.getTest();
%>
<b> test_str is: </b> <%=test_str%>
Click here to test your jsp index1.jsp file in the test sub-directory
Here are the results from this jsp page:
hello
test_str is: Hello from the main jsp directory
Click here to test your jsp index1.jsp file in the test sub-directory
Here are the contents from the test/index1.jsp file:
<b> hello from test sub-directory </b>
<%
String test_str = null;
test ts = new test("Hello from the jsp test sub-directory");
test_str = ts.getTest();
%>
<b> test_str is: </b> <%=test_str%>
And here is what happens when I try to go to the test/index1.jsp page:
Request URI:/benny_test/test/index1.jsp
Exception:
OracleJSP:oracle.jsp.provider.JspCompileException:
Errors compiling:C:\OC4J\j2ee\home\application-deployments\default\benny_test\persistence\_pages\_test\_index1.java
Line # Error
47
[jsp src:line #:5]
cannot resolve symbol symbol : class test location: class test.index1 test ts = new test("Hello from the jsp test sub-directory");
47
[jsp src:line #:5]
cannot resolve symbol symbol : class test location: class test.index1 test ts = new test("Hello from the jsp test sub-directory");
I will try putting it in a package like you said and see if that helps. Also, do you see a similar issue in your environment.
Anyways, thanks for all your help. Hope to hear from you soon.
Thanks,
Benny -
.Class file not updating
Hi all,
I am working on an applet that requires the use of a .class file. So, when I make changes to test.java, I want the changes to move over to test.class, however they are not moving over there. In a sense, my .class file is outdated and is not updating when I save my .java file or run it (as an applet). How can I get this file to update?
-Christ_guardChrist_Guard wrote:
No, build automatically is on, and manually building does not work either.Then put aside the IDE and work with a text editor, javac and the jar tool until you figure out what you are doing. Obviously you are doing something wrong in your compiling and/or deploying steps and it's not productive for anyone, including you, to have us sitting around playing guessing games as to what might be the problem.
Also from your initial post it is clear that you don't understand the life-cycle of a Java program. Your java file is source, it has nothing to do with what happens at runtime. It is only the compiled class file that is important.
See http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
If you are on a different OS then choose the applicable one here http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
Maybe you are looking for
-
Hi forum!! In the ERP order we assign a item of a order to a WBS element and we need to see that WBS element in CRM but that field does not appear in the CRM order!! Because of that I think about creating an ERP Order in CRM Order because the WBS ele
-
How change key of a loop?
When I audition loops -- both MIDI (green) and Audio (blue) -- I see that I can play them in a different key than how they are listed. Once I drag that loop to a track, how do I then manipulate the key that it is in? Thanks.
-
What is the Dashboard? Is it something that works only thru Business Catalyst? <rant> Why can't Adobe write a proper manual? And why can't Adobe give hyperlinks to its own help centres and to this forum? It took me five minutes to find this place?
-
Have I phone 5C speakers are working // my phone not ringing ?? Tried everything in settings ( I think ) what makes the phone ring ???
-
I keep trying to load the music stor to download songs when i get to the part were they list all the songs and you click buy there are no songs in the list. NONE!