Whether to import the class file put in JAVA_TOP

I have put the java class file in JAVA_TOP. Now i want to access the method in that class from jsp, is it necessary to import the class file path in jsp. Without importing the class file path how can i access the method.
JSP Coding
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import="java.*" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>
Hello World
</title>
</head>
<body>
<%
sample objsample = new sample();
%>
<b>
NAME : </b><input type="text" value="<%=objsample.getName()%>">
</body>
</html>
Class file
public class sample
public sample()
String name = "JOHN";
public String getName()
return name;
Pls help me

Hi,
For sys outs check the following log files:
<ORACLE_SOA_HOME>/opmn/logs/default_group~home~default_group~1.log
or
<ORACLE_SOA_HOME>/j2ee/home/log/home_default_group_1/system_*.log
Here server instance name is home, change it with your server instance name.
Dharmendra
http://soa-howto.blogspot.com

Similar Messages

  • Where to put the class file

    i am using tomcat 4.1.27 server and i created a UserData.java file as a bean; i have placed the class file in the WEB-INF/classes folder. still i get the following error:
    ==============================================================
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 21 in the jsp file: /ics334/Javanese/name7.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\ics334\Javanese\name7_jsp.java:60: cannot resolve symbol
    symbol : class UserData
    location: class org.apache.jsp.name7_jsp
    UserData user = null;
    ^
    An error occurred at line: 21 in the jsp file: /ics334/Javanese/name7.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\ics334\Javanese\name7_jsp.java:62: cannot resolve symbol
    symbol : class UserData
    location: class org.apache.jsp.name7_jsp
    user = (UserData) pageContext.getAttribute("user", PageContext.SESSION_SCOPE);
    ^
    An error occurred at line: 21 in the jsp file: /ics334/Javanese/name7.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\ics334\Javanese\name7_jsp.java:65: cannot resolve symbol
    symbol : class UserData
    location: class org.apache.jsp.name7_jsp
    user = (UserData) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "UserData");
    ^
    3 errors
    Apache Tomcat/4.1.27
    ===============================================================
    the structure of the jsp file is as
    <%@ page contentType="text/html" %>
    <%@ page import="java.sql.*,java.util.*" %>
    <%@ page import ="javax.servlet.*"%>
    <%@ page import ="javax.servlet.http.*"%>
    <html dir="rtl">
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    </head>
    <body>
    <p dir="ltr">
    <jsp:useBean id="user" class="UserData" scope="session"/>
    <jsp:setProperty name="user" property="*"/>
    <font size="5">Your Name is :<%= user.getUsername() %> <BR></font>
    </p>
    </body>
    </html>
    can anyone help plz?

    I am also facing the same problem. Try placing ur
    class files in tomcat's /common/classes folder.
    Sometimes it works. How ever it did not work in my
    case. Hope it works in your!!This ain't a right way of doing it... when creating a web-app, the files should be contained in it.
    The problem is can be resolved by packaging the class in say beans. Then place that class in WEB_INF/classes/beans.
    Cheers!
    ***Annie***

  • How do I make a batch file if the .class file uses a foreign package?

    I am trying to make an MS-DOS batch file using the bytecode file from the Java source file, called AddFields.java. This program uses the package BreezySwing; which is not standard with the JDK. I had to download it seperately. I will come back to this batch file later.
    But first, in order to prove the concept, I created a Java file called Soap.java in JCreator. It is a very simple GUI program that uses the javax.swing package; which does come with the JDK. The JDK is currently stored in the following directory: C:\Program Files\Java\jdk1.6.0_07. I have the PATH environment variable set to the 'bin' folder of the JDK. I believe that it is important that this variable stay this way because C:\Program Files\Java\jdk1.6.0_07\bin is where the file 'java.exe' and 'javac.exe' are stored. Here is my batch file so far for Soap:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java Soap
    pause
    Before I ran this file, I compiled Soap.java in my IDE and then ran it successfully. Then I moved the .class file to the directory C:\acorn. I put NOTHING ELSE in this folder. then I told the computer where to find the file 'java.exe' which I know is needed for execution of the .class file. I put the above text in Notepad and then saved it as Soap.bat onto my desktop. When I double click on it, the command prompt comes up in a little green box for a few seconds, and then the GUI opens and says "It Works!". Now that I know the concept of batch files, I tried creating another one that used the BreezySwing package.
    After I installed my JDK, I installed BreezySwing and TerminalIO which are two foreign packages that make building code much easier. I downloaded the .zip file from Lambert and Osborne called BreezySwingAndTerminalIO.zip. I extracted the files to the 'bin' folder of my JDK. Once I did this, and set the PATH environment variable to the 'bin' folder of my JDK, all BreezySwing and TerminalIO programs that I made worked. Now I wanted to make a batch file from the program AddFields.java. It is a GUI program that imports two packages, the traditional GUI javax.swing package and the foreign package BreezySwing. The user enters two numbers in two DoubleField objects and then selects one of four buttons; one for each arithmetic operation (add, subtract, multiply, or divide). Then the program displays the solution in a third DoubleField object. This program both compiles and runs successfully in JCreator. So, next I moved the .class file from the MyProjects folder that JCreator uses to C:\acorn. I put nothing else in this folder. The file Soap.class was still in there, but I did not think it would matter. Then I created the batch file:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java AddFields
    pause
    As you can see, it is exactly the same as the one for Soap. I made this file in Notepad and called it AddFields.bat. Upon double clicking on the file, I got this error message from command prompt:
    Exception in thread "main" java.lang.NoClassDefFoundError: BreezySwing/GBFrame
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Caused by: java.lang.ClassNotFoundException: BreezySwing.GBFrame
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 12 more
    Press any key to continue . . .
    I know that most of this makes no sense; but that it only means that it cannot find the class BreezySwing or GBFrame (which AddFields extends). Notice, however that it does not give an error for javax.swing. If I change the "set path..." command to anything other than the 'bin' folder of my JDK, I get this error:
    'java' is not recognized as an internal or external command,
    operable program or batch file.
    Press any key to continue . . .
    I know this means that the computer cannot find the file 'java.exe' which I believe holds all of the java.x.y.z style packages (native packages); but not BreezySwing or any other foreign packages. Remember, I do not get this error for any of the native Java packages. I decided to compare the java.x.y.z packages with BreezySwing:
    I see that all of the native packages are not actually visible in the JDK's bin folder. I think that they are all stored in one of the .exe files in there because there are no .class files in the JDK's bin folder.
    However, BreezySwing is different, there is no such file called "BreezySwing.exe"; there are just about 20 .class files all with names like "GBFrame.class", and "GBActionListener.class". As a last effort, I moved all of these .class files directly into the bin folder (they were originally in a seperate folder called BreezySwingAndTerminalIO). This did nothing; even with all of the files in the same folder as java.exe.
    So my question is: What do I need to do to get the BreezySwing package recognized on my computer? Is there possibly a download for a file called "BreezySwing.exe" somewhere that would be similar to "java.exe" and contain all of the BreezySwing packages?

    There is a lot of detail in your posts. I won't properly quote everything you put (too laborious). Instead I'll just put your words inside quotes (").
    "..there are some things about the interface that I do not like."
    Like +what?+ This is not a help desk, and I would appreciate you participating in this discussion by providing details of what it is about the 'interface' of webstart that you 'do not like'. They are probably misunderstandings on your part.
    "Some of the .jar files I made were so dangerously corrupt, that I had to restart my computer before I could delete them."
    Corrupt?! I have never once had the Java tools produce a corrupt Jar. OTOH, the 'cannot delete' problem might relate to the JRE gaining a file lock on the archive at run-time. If the file lock persisted after ending the app., it suggests that the JRE was not properly shut down. This is a bug in the code and should be fixed. Deploying as .class files will only 'hide' the problem (from casual inspection - though the Task Manager should show the orphaned 'java' process).
    "I then turned to batch files for their simple structure and portability (I managed to successfully transport a java.util containing batch file from my computer to another). This was what I did:
    - I created a folder called Task
    - Then I copied three things into this folder: 1. The file "java.exe" from my JDK. 2. The program's .class file (Count.class). and 3. The original batch file.
    - Then I moved the folder from a removable disk to the second computer's C drive (C:\Task).
    - Last, I changed the code in the batch file...:"
    That is the +funniest+ thing I've heard on the forums in the last 72 hours. You say that is easy?! Some points.
    - editing batch files is not scalable to 100+ machines, let alone 10000+.
    - The fact that Java worked on the target machine was because it was +already installed.+ Dragging the 'java.exe' onto a Windows PC which has no Java will not magically make it 'Java enabled'.
    And speaking of Java on the client machine. Webstart has in-built mechanisms to ensure that the end user has the minimum required Java version to run the app. - we can also use the [deployJava.js|http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit] on the original web page, to check for minimum Java before it puts the link to download/install the app. - if the user does not have the required Java, the script should guide them through installing it.
    Those nice features in deployJava.js are available to applets and apps. launched using webstart, but they are not available for (plain) Jar's or loose class files. So if 'ensuring the user has Java' is one of the requirements for your launch, you are barking up the wrong tree by deploying loose class files.
    Note also that if you abandon webstart, but have your app. set up to work from a Jar, the installation process would be similar to above (though it would not need a .bat file, or editing it). This basic strategy is one way that I provide [Appleteer (as a downloadable ZIP archive)|http://pscode.org/appleteer/#download]. Though I side-step your part 1 by putting the stuff into a Jar with the path Appleteer/ - when the user expands the ZIP, the parts of the app. are already in the Appleteer directory.
    Appleteer is also provided as a webstart launched application (and as an applet). Either of those are 'easier' to use than the downloadable ZIP, but I thought I would provide it in case the end user wants to save it to disk and transport the app. to a machine with no internet connection, but with Java (why they would be testing applets on a PC with no internet connection, I am not sure - but the option is there).
    "I know that .jar and .exe files are out because I always get errors and I do not like their interfaces. "
    What on earth are you talking about? Once the app. is on-screen, the end user would not be able to distinguish between
    1) A Jar launched using a manifest.
    2) A Jar launched using webstart.
    3) Loose class files.
    Your fixation on .bat files sounds much like the adage that 'If the only tool you have is a hammer, every job starts to look like a nail'.
    Get over them, will you? +Using .bat files is not a practical way to provide a Java app. to the end user+ (and launching an app. from a .bat looks quite crappy and 'second hand' to +this+ user).
    Edit 1:
    The instructions for running Appleteer as a Jar are further up the page, in the [Running Appleteer: Application|http://pscode.org/appleteer/#application] section.
    Edited by: AndrewThompson64 on May 19, 2009 12:06 PM

  • Importing a .class file into my package?

    Hi. I'm making a java program but I need to use an external .class file to get variables and use methods from. Is it possible to "import" a class file into my package to be able to do so?
    Thanks

    Basically, for our last project we created a class
    that held the information about a year: how many days
    were in a month, how many months were in a year, etc.
    etc. For this project, we'll be having to use that
    same class to make a GUI calendar. Our teacher
    provided a class which he compiled for us to use in
    our projects incase our previous class had some flaws
    in it, which mine did. Unfortunately, it's in .class
    format and I don't know how to use it in my package!That's going to be a problem then. I would assume that it is going to have an API like your old one did. Same name and same methods etc. So do you know what the name and method signatures of your class were supposed to be?

  • How to get the .class file for the extended Controller .java file

    Hi,
    I did the below steps.
    1. Created New OAWorkspace
    2. Created New project
    3. Imported the page .xml file
    4. Added new .java file by extending the controller class
    5. Added code in the .java file.
    6. Ran the .xml file
    As I copied all the folders from Unix box, the page was opened.
    But My question was where can I see the .class file the extended controller. It's a .java file. How to compile and get the .class file for this .java file. If I get this .class file, I can go to the page and click the personlize page. and change the Controller name to the new path by ftp ing the new class to the cust.oracle.apps.pos.changeorder.webiui.
    Please let me know how to create the .class file.
    Thanks,
    HP

    All are Java files are stored in JDEV_INSTALL_DIR:\jdevhome\jdev\myprojects\
    In your case the path java would be
    JDEV_INSTALL_DIR:\jdevhome\jdev\ myprojects \cust\oracle\apps\pos\changeorder\webui\
    AND
    Once you compile the java file in Jdeveloper, Class files get generated @ below path
    In your case the path of class would be
    JDEV_INSTALL_DIR:\jdevhome\jdev\ myclasses \cust\oracle\apps\pos\changeorder\webui\
    Duplicate Thread-
    Thanks
    --Anil
    http://oracleanil.blogspot.com/

  • Import the jar file of jfreereport to bluej

    i'm having trouble importing the jar file needed to use the jfreereport in bluej.
    as much as possible i don't want to type the SET CLASSPATH in the command window. is there a way to include the jfreereport jar file to be used in the bluej?

    You're doing privileged operations almost everywhere in this applet so you can't use the straightforward calls. At a minimum you need to put your applet in a jar, sign the jar and use AccessController.doPrivileged() to wrap the code which does the privileged operations, which is basically all of your code. In other words, you would need one to wrap your code in init(), one in start(), one in actionPerformed(), etc.

  • Classpath is not identifing the class file

    Iam developing cumtom java function event in Oracle WorkFlow. Here iam getting ClassNotFoundException. I included all class file in the jar file and the jar file added in the class path
    The problem seems be, java compiler not recognising the class which is there in the classpath.. any one suggest on this. ??

    Let's get this straight first: ClassNotFoundException is something that happens at runtime; that means you must have been able to compile your program successfully. So it is not the "java compiler not recognising the class".
    What does your classpath look like exactly?
    Is the class you are trying to use in a package?
    Are you correctly importing the class?
    Look inside the JAR files in your classpath to check if the class is really present in one of the JAR files.
    If you were able to compile the code successfully but you get an error while running it, then the compiler must have been able to find the class while you were compiling it. Are you passing the same classpath to the Java runtime environment as what you are using when you were compiling your code?
    And by the way, you posted this question in the forum about generics, but your question does not have anything to do with generics. Please post your questions in the appropriate forum in the future.

  • Advice on encrypting the class files so that it cannot be reverse engineer

    Hi,
    i will like to ask if there is any way where we can encrypt the class files so that people cannot use reverse engineering to modify the codes?
    Thanks

    tommickey wrote:
    leeChaolan wrote:
    Hi,
    i will like to ask if there is any way where we can encrypt the class files so that people cannot use reverse engineering to modify the codes?
    ThanksIn addition to what others said encryption is totally different from what you want.(called as 'obfuscation').Not necessarily. You could encrypt the class files, but then you would have to provide an unencrypted ClassLoader (and possibly Main if you didn't want to put the ClassLoader in the bootstrap classpath) that is capable of decrypting them. Then, someone could decompile this ClassLoader (obfuscated or not) and either simply take the decryption algorithm and decrypt the classes, or even easier, simply modify the ClassLoader to write out the decrypted class files itself.
    So, why would you? ;-)

  • How can I hide the class file ??

    Hi !
    I has a question, when i write a program of Java, then use the command "javac" to compiler to class file for other people using, but the class file can be disassembled and convert to source code. How can I hide the class file and let people can not disassemble, or can not see the source code. Thinks

    See these....
    http://www.saffeine.com/
    http://www.jarsafe.com/
    I recently read this. This will help you.
    http://developer.java.sun.com/developer/qow/archive/160/index.jsp
    Enojy....
    Rajesh

  • Error while running 'ldifde.exe' to import the schema file

    Hello,
    I'm doing a practical in exchange server. I have two servers, First one is the domain controller it's a Server 2012 R2 and the Second one is the server planing to install exchange 2010. it has server 2008 R2. My issue is when i'm trying to setup Exchange
    Server 2010 it comes error while installing "error while running 'ldifde.exe' to import the schema file" I tried to fix but i couldn't. Please if anyone know about this error give me a solution. 
    Regards.
    Ashane Deshapriya ( MCP )

    Can you run these commands from an elevated powershell and try to install exchange. 
    Import-Module ServerManager
    Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart
    If that also fails please post the error.
    Thanks, MAS
    Please mark as helpful if you find my comment helpful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Cannot overcome Exchange Server 2013 Install Error - "There was an error while running 'ldifde.exe' to import the schema file

    Hello,
    I am attempting to install Exchange 2013 on to a 2008R2 Server on a domain running 2008R2 DC's.  I have worked every error resolution I can find, but I can't get past this error.
    Error:
    The following error was generated when "$error.Clear();
    install-ExchangeSchema -LdapFileName ($roleInstallPath + "Setup\Data\"+$RoleSchemaPrefix + "schema27.ldf")
    " was run: "There was an error while running 'ldifde.exe' to import the schema file 'C:\Windows\Temp\ExchangeSetup\Setup\Data\schema27.ldf'. The error code is: 8224.
    Any assistance is appreciated.

    Are you running the installation from an ISO-file?
    If so, then copy the files (preferably
    Exchange 2013 w. SP1) to the local disk
    and run the install with elevated privileges.
    Martina Miskovic

  • Error while importing the .txt file for SAP script to another system.

    Hi Gurus,
    I'm trying to import the .txt file exported (using RSTXSCRP) from one system to another.But getting the following error on the destination system  (4.6C).I'm able to import the same file on all other releases (Like 470 500,600,604).
    "ERROR: Invalid start marker: SF instead of SFORM "
    Kindly assist..
    Jasvir

    Hi,
    Usually when you download the file and open it with notepad, the first line is like
    SFORMZINVOICE
    ie SFORM followed by form name
    Check this in your downloaded file
    Regards

  • I exported an archive of iCal from a computer running the last OS X. On a new computer running OS X (10.7.4), I tried to import the .icbu file and got a message "The calendar failed to restore". How do I fix this/get my calendar?

    I exported an archive of iCal from a computer running the last OS X. On a new computer running OS X (10.7.4), I tried to import the .icbu file and got a message "The calendar failed to restore". How do I fix this/get my calendar?

    I exported an archive of iCal from a computer running the last OS X. On a new computer running OS X (10.7.4), I tried to import the .icbu file and got a message "The calendar failed to restore". How do I fix this/get my calendar?

  • I shot video on a Panasonic P2 and I'm trying to import the MXF files to Final Cut Pro but when I try to import, the only thing that imports is a blurry image of each clip. There's no audio and no video...how can I import MXF files into Final Cut Pro?

    I shot video on a Panasonic P2 and I'm trying to import the MXF files to Final Cut Pro but when I try to import, the only thing that imports is a blurry image of each clip. There's no audio and no video...how can I import MXF files into Final Cut Pro?

    at the end, you say "import preferences", which program are you describing?
    So im safer using footage that is remotely being pulled from iphoto...
    vs
    using footage that is imported into FCP from imovie?
    Is there anything i can do in fcp to make this footage more reliable or safer or more stable as i pull remotely from iphoto?
    All the footage, and all the libraries to all programs, or on a new pegasus 12tb raid 5 setup fyi.

  • How to hide the source code from the .class file

    Hi,
    By some jad tool we can recompile the .class files and get the java file corresponding to it. How to protect it?
    Anyone please help me..
    Thanks & Regards,
    N.Ravasankar

    An obfuscator can for example rename classes, variables to meaningless names, like one-letter names. And it can make some bytecode that is hard to decompile or just makes the code less readable when decompiled. Some obfuscators might even be able to do something to the code that makes decompilers not work or incorrect decompile code.

Maybe you are looking for

  • How can I find out if my iphone has been synced to another computer? (Backup/Sync Privacy)

    So it would seem easy for someone (lets just say a girlfriend for example) to plug my iPhone into her computer while I am staying the night and backup to iTunes.  I have my settings to "require a passcode immediately", however there was one day there

  • Event handler for disclosureopenicon in tree in flex 4

    hi all,           Is it possible to write event handler to disclosureopenicon for tree control in flex? if its possible means, h w can i write?

  • SOAP Error in Outbound

    Dear All I am using the following SOAP request from Java Class to PI.      String str = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://w

  • Viewing PDF on iPad/iPhone

    Hello, I work for a financial company and it seems that some of our user's were having trouble viewing a pdf document that contained editable text boxes.  The layout of the form itself would show, but none of the text within the text boxes would appe

  • Can anybody send me some docs on ESS/MSS and Adobe Forms.

    Hi all, Can anybody please send me some doc/materials/link on how to coonfigure/develop/work with ESS/MSS and Adobe forms. Its very urgent requirement. Thanks n Regards A.M.Rao