How to include applet in jsp if applet.class file in another folder
hi,
i'm getting problem when my applet.class file is not with its appropriate jsp file. i'm using jsp :plugin tag.it work when jsp file n apllet.class file at same location.
in short my jsp file is at location /webapps/jsp-examples/myproject/includeDemo.jsp
n applet i want in a WEB-INF folder.
Plz help me to solve this..
or give me other way that an applet can be loaded in jsp page n applet should be in WEB-INF file..
Help me for this
http://forum.java.sun.com/thread.jspa?threadID=5148764&messageID=9556205
Similar Messages
-
How to include several PDF documents into just one file?
I have a Word document with 6 pages that I saved in PDF.
I wanted to transform the entire document in JPEG (JPG) immage, so that I could use it in other tools, such as Facebook for example.
The problem is that using Adobe Photoshop it opens and saves page by page.
Can you give me s solution or hint?
Flavio
[email protected]Thank you!
I already saved all pages as .pdf w/ Acrobat and have all 6 pages saved in
.jpg, using Photoshop.
Problem is that I want to post the whole text in my Facebook page, and to
have it in six pieces is not quite readable...
Thanks anyway and have a joyful Xmas!
2011/12/24 try67 <[email protected]>
Re: How to include several PDF documents into just one file? created
by try67 <http://forums.adobe.com/people/try67> in Adobe Reader - View
the full discussion <http://forums.adobe.com/message/4102594#4102594> -
How do I move a picture from one pdf-file to another, already created pdf-file, with adobe reader?
Reader doesn't have editing capabilities.
-
How can we call a class file of one package for class file of another
How can we call a class file of one package from class file of another package and both packages exist in a same folder
How can we call a class file of one package from
class file of another package and both packages exist
in a same folder
Luckily they don't so it's really not a problem after all. -
How to capture applet class ?
When you see an HTML page containing an applet,
the applet code is downloaded to your browser;
is it possible to save it in a .class file ?
Thank you.Thanks for your comment .. but it sounds lots of encryption/decryption
involved.. I need somthing very simple... i have seen this code which does this.. here is the code but i am not an javascript expert .. so please
if someone gets any clue let me know...
here is the code ... it just a part of the drop down menu that 's
why it has <a class="drop" syntex in front of it ...
<a class="drop" href="javascript:AnyApplet('y')">My Applet</a><br></div> -
How to Customize the iemsa_customerdetailincl.jsp and IHSearch.class
Hi
I have a requirement, where i need to customize the way of look the email customer agent console is displaying the customer results in ebs suite. I need to get some more values from DB and need to modify the iemsa_customerdetailincl.jsp and also the default query is located in IHSearch.class file which is located in COMMON_TOP/oracle/apps/iem/solo/customer and these resultset is assigned to IHBean.class and we are accessing the IHBean and iterating thru the vector and using IHBean to display the results on the page.
And also can you let me know where can i get the username from like ServletSessionManager or SessionManager classes. Please let me know how do i need to extend or customize the IHSearch and IHBean classes for the customization of jsps.
And the EBS version is R12. Thanks.Hello All,
Can someone in this Forum reply to my question. Thanks.
N. -
How do I alter the bytes of a Class file to add calls to the methods?
If i had the bytes of a class file, and I wanted to alter the bytes that constitute each method for the class so that it included a call to the security manager, how would i do it?
1. How would I know which bytes were the opening of a method?
2. how would I know what the name of the method is?
3. How would I create bytes for something like:
SecurityManager sm = System.getSecurityManager().checkPermission(thismeth, subject);
4. I assume that if by some miracle I can do the above, then all I have to do is call defineClass(...) in ClassLoader and send it the new bytes, right?
Thanks to all!OK, if it will help anyone get me the answers here, I found a class on the internet that can read a class file and tell you where in the bytes a method occurs and what its name is, and how long it is. What I need now is how to convert a call into the correct manner of bytes.
For example, so I could add the bytes that would do:
System.out.println("Added!");
The class that reads a class file:
/* Inspector.java by Mark D. LaDue */
/* June 24, 1997 */
/* Copyright (c) 1997 Mark D. LaDue
You may study, use, modify, and distribute this example for any purpose.
This example is provided WITHOUT WARRANTY either expressed or implied. */
/* This Java application analyzes the entries in the constant pool and locates
the code arrays in a Java class file. Each entry in the constant pool
yields the following information:
Index Tag Reference(s)/Value(s)
where "Index" is its position within the class file's constant pool,
"Tag" is the official tag number for that type of entry, and
"Reference(s)/Value(s)" contains the constant pool information
according to the entry's type. (See Lindholm and Yellin's "The Java
Virtual Machine Specification" for details.) For each code array in
the class file, its starting byte, its total length, and the name of
the method in which it occurs are given. Combining this information
with the information yielded by the humble "javap" utility gives one
sufficient information to hack the code arrays in Java class files. */
import java.io.*;
class Inspector {
public static void main(String[] argv) {
int fpointer = 8; // Where are we in the class file?
int cp_entries = 1; // How big is the constant pool?
int Code_entry = 1; // Where is the entry that denotes "Code"?
int num_interfaces = 0; // How many interfaces does it use?
int num_fields = 0; // How many fields are there?
int num_f_attributes = 0; // How many attributes does a field have?
int num_methods = 0; // How many methods are there?
int num_m_attributes = 0; // How many attributes does a method have?
int[] tags; // Tags for the constant pool entries
int[] read_ints1; // References for some constant pool entries
int[] read_ints2; // References for some constant pool entries
long[] read_longs; // Values for some constant pool entries
float[] read_floats; // Values for some constant pool entries
double[] read_doubles; // Values for some constant pool entries
StringBuffer[] read_strings; // Strings in some constant pool entries
int[] method_index;
long[] code_start;
long[] code_length;
// How on earth do I use this thing?
if (argv.length != 1) {
System.out.println("Try \"java Inspector class_file.class\"");
System.exit(1);
// Start by opening the file for reading
try {
RandomAccessFile victim = new RandomAccessFile(argv[0], "r");
// Skip the magic number and versions and start looking at the class file
victim.seek(fpointer);
// Determine how many entries there are in the constant pool
cp_entries = victim.readUnsignedShort();
fpointer += 2;
// Set up the arrays of useful information about the constant pool entries
tags = new int[cp_entries];
read_ints1 = new int[cp_entries];
read_ints2 = new int[cp_entries];
read_longs = new long[cp_entries];
read_floats = new float[cp_entries];
read_doubles = new double[cp_entries];
read_strings = new StringBuffer[cp_entries];
//Initialize these arrays
for (int cnt = 0; cnt < cp_entries; cnt++) {
tags[cnt] = -1;
read_ints1[cnt] = -1;
read_ints2[cnt] = -1;
read_longs[cnt] = -1;
read_floats[cnt] = -1;
read_doubles[cnt] = -1;
read_strings[cnt] = new StringBuffer();
// Look at each entry in the constant pool and save the information in it
for (int i = 1; i < cp_entries; i++) {
tags[i] = victim.readUnsignedByte();
fpointer++;
int skipper = 0;
int start = 0;
int test_int = 0;
switch (tags) {
case 3: read_ints1[i] = victim.readInt();
fpointer += 4;
break;
case 4: read_floats[i] = victim.readFloat();
fpointer += 4;
break;
case 5: read_longs[i] = victim.readLong();
fpointer += 8;
i++;
break;
case 6: read_doubles[i] = victim.readDouble();
fpointer += 8;
i++;
break;
case 7:
case 8: read_ints1[i] = victim.readUnsignedShort();
fpointer += 2;
break;
case 9:
case 10:
case 11:
case 12: read_ints1[i] = victim.readUnsignedShort();
fpointer += 2;
victim.seek(fpointer);
read_ints2[i] = victim.readUnsignedShort();
fpointer += 2;
break;
// This is the critical case - determine an entry in the constant pool where
// the string "Code" is found so we can later identify the code attributes
// for the class's methods
case 1: skipper = victim.readUnsignedShort();
start = fpointer;
fpointer += 2;
victim.seek(fpointer);
for (int cnt = 0; cnt < skipper; cnt++) {
int next = victim.readUnsignedByte();
switch (next) {
case 9: read_strings[i].append("\\" + "t");
break;
case 10: read_strings[i].append("\\" + "n");
break;
case 11: read_strings[i].append("\\" + "v");
break;
case 13: read_strings[i].append("\\" + "r");
break;
default: read_strings[i].append((char)next);
break;
victim.seek(++fpointer);
victim.seek(start);
if (skipper == 4) {
fpointer = start + 2;
victim.seek(fpointer);
test_int = victim.readInt();
if (test_int == 1131373669) {Code_entry = i;}
fpointer = fpointer + skipper;
else {fpointer = start + skipper + 2;}
break;
victim.seek(fpointer);
// Skip ahead and see how many interfaces the class implements
fpointer += 6;
victim.seek(fpointer);
num_interfaces = victim.readUnsignedShort();
// Bypass the interface information
fpointer = fpointer + 2*(num_interfaces) + 2;
victim.seek(fpointer);
// Determine the number of fields
num_fields = victim.readUnsignedShort();
// Bypass the field information
fpointer += 2;
victim.seek(fpointer);
for (int j=0; j<num_fields; j++) {
fpointer += 6;
victim.seek(fpointer);
num_f_attributes = victim.readUnsignedShort();
fpointer = fpointer + 8*(num_f_attributes) + 2;
victim.seek(fpointer);
// Determine the number of methods
num_methods = victim.readUnsignedShort();
fpointer += 2;
// Set up the arrays of information about the class's methods
method_index = new int[num_methods];
code_start = new long[num_methods];
code_length = new long[num_methods];
//Initialize these arrays
for (int cnt = 0; cnt < num_methods; cnt++) {
method_index[cnt] = -1;
code_start[cnt] = -1;
code_length[cnt] = -1;
// For each method determine the index of its name and locate its code array
for (int k=0; k<num_methods; k++) {
fpointer += 2;
victim.seek(fpointer);
method_index[k] = victim.readUnsignedShort();
fpointer += 4;
victim.seek(fpointer);
// Determine the number of attributes for the method
num_m_attributes = victim.readUnsignedShort();
fpointer += 2;
// Test each attribute to see if it's code
for (int m=0; m<num_m_attributes; m++) {
int Code_test = victim.readUnsignedShort();
fpointer += 2;
// If it is, record the location and length of the code array
if (Code_test == Code_entry){
int att_length = victim.readInt();
int next_method = fpointer + att_length + 4;
fpointer += 8;
victim.seek(fpointer);
code_length[k] = victim.readInt();
code_start[k] = fpointer + 5;
fpointer = next_method;
victim.seek(fpointer);
// Otherwise just skip it and go on to the next method
else {
fpointer = fpointer + victim.readInt() + 4;
victim.seek(fpointer);
// Print the information about the Constant Pool
System.out.println("There are " + (cp_entries - 1) + " + 1 entries in the Constant Pool:\n");
System.out.println("Index\t" + "Tag\t" + "Reference(s)/Value(s)\t");
System.out.println("-----\t" + "---\t" + "---------------------\t");
for (int i = 0; i < cp_entries; i++) {
switch (tags[i]) {
case 1: System.out.println(i + "\t" + tags[i] + "\t" + read_strings[i].toString());
break;
case 3: System.out.println(i + "\t" + tags[i] + "\t" + read_ints1[i]);
break;
case 4: System.out.println(i + "\t" + tags[i] + "\t" + read_floats[i]);
break;
case 5: System.out.println(i + "\t" + tags[i] + "\t" + read_longs[i]);
break;
case 6: System.out.println(i + "\t" + tags[i] + "\t" + read_doubles[i]);
break;
case 7:
case 8: System.out.println(i + "\t" + tags[i] + "\t" + read_ints1[i]);
break;
case 9:
case 10:
case 11:
case 12: System.out.println(i + "\t" + tags[i] + "\t" + read_ints1[i] + " " + read_ints2[i]);
break;
System.out.println();
// Print the information about the methods
System.out.println("There are " + num_methods + " methods:\n");
for (int j = 0; j < num_methods; j++) {
System.out.println("Code array in method " + read_strings[method_index[j]].toString() + " of length " + code_length[j] + " starting at byte " + code_start[j] + ".");
System.out.println();
// All the changes are made, so close the file and move along
victim.close();
} catch (IOException ioe) {} -
How can I control a button from one swf file to another swf file?
Hi,
I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
Now, how can I write code on my main.swf file for the button which is on my external.swf file?
Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
Thanks.Here's some example code that you should be able to adapt to your needs.
// create a new loader object instance...
var loader:Loader = new Loader();
// make the download request...
var request:URLRequest = new URLRequest("external.swf");
// add a complete event listener to the loader
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
// start the actual loading process...
loader.load(request);
// create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
var externalMovie:MovieClip;
// this function is called when the download has finished and the file is ready to use...
function completeHandler(event:Event):void {
// set the contents of the loaded movie to the new empty movieClip...
externalMovie = MovieClip(event.target.content);
// add this new movie to the display list...
addChild(externalMovie);
Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
function btnClickClose(event:MouseEvent):void { -
How can I apply an image adjustment to all files in a folder?
How do I apply an edit to every file in a folder? Every time I need to do this, I end up flailing around for 10 minutes before I can finally get it to work. Or, sometimes I give up and manually paste the copied settings to each file one at a time. It seems a no-brainer that "copy settings" followed by "paste settings" to all files selected would do the trick. Or "copy settings" foillowed by "Sync settings." But it doesn't work. What am I missing?
pickfordpictures wrote:
Thanks, Rob.
You bet .
pickfordpictures wrote:
Do you know a way I might have backed out of that crop adjustment and gone back to the original crops?
Here are the (potential) ways I can think of at the moment:
* Undo (if you haven't gone too far since, or exited)
* edit history (1-by-1)
* read metadata (if previously saved prior to snafu/oops).
* restore backup catalog (if no saved metadata).
* ScrewAutoSync (if fixed number of steps to rollback for all afflicted photos).
Rob -
How to Create File in another folder
hi,
I need to create a RandomAccessFile in Folder and that Folder was also created here if self only, so How it do this in a program.
tname="xyz";
String fname=tname+".xml";
file = new File(fname);
File dir=new File(tname);
String path=dir.getAbsolutePath();
System.out.println(path);
if(dir.exists()==false)
dir.mkdirs();
I try to create xyz.xml file in xyz(folder name) itself, how can if be
Thanking you,
RaviVarma.KI'm not sure what you are trying to do but you seem to need
File f = new File("the path of the file you want to create");
f.getParentFile().mkdirs();No need to make the mkdirs() conditional since it will only make the directories if they don't exist. -
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.RavasankarAn 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.
-
How to include applet jars into an JSF application
Hey guys,
I have a rather simple question. I have made a JAR that contains an applet. The applet runs fine, but when I include the applet into a JSF / JSP page I get a Class not found error.. The JAR containing the applet is included in the websites build path.
Can someone give me a hint where the JAR shoud go? Maybe a link to a tut would be niceclasspath wasnt set correctly
-
Good afternoon everyone:
i have a question about Oracle JVM.
In my JSP file there is a applet call.
After I load the JSP file, the class seems
to be load into the Oracle Database, and even
i modify the class is no useful, how can i
reload the class from DB?
thanks
nullThanks for your comment .. but it sounds lots of encryption/decryption
involved.. I need somthing very simple... i have seen this code which does this.. here is the code but i am not an javascript expert .. so please
if someone gets any clue let me know...
here is the code ... it just a part of the drop down menu that 's
why it has <a class="drop" syntex in front of it ...
<a class="drop" href="javascript:AnyApplet('y')">My Applet</a><br></div> -
How to "Load" Applet class to current Applet?
I have to write a simple Applet to detect the JVM version of the browser, and the flow is:
1.Detector.class (Applet) load in a html page, its class version is 1.5
2.It checks whether the JVM version of the browser is 1.5 / 1.6.
3.If it is 1.5, a new browser window popup and links to jre download page.
4.If it is 1.6, it loads a Main.class (Applet), which class version is 1.6
My question is, if the codes inside the Detector.class detects the JVM version is 1.6, HOW can I LOAD the Main.class (Applet) to the current scene?
Thanks for any suggestion and help.roamer wrote:
..My question is, if the codes inside the Detector.class detects the JVM version is 1.6, HOW can I LOAD the Main.class (Applet) to the current scene?
Thanks for any suggestion and help.I suggest you change the flow.
1. Go to the applet page with both the Main.class *&* the version check applet.
2. If <1.6 is detected, have the version check applet redirect to the the 'download Java' page.
Alternately:
1. Go to the version check page.
2. If 1.6+ is detected, redirect to the Main.class page, else redirect to 'download Java' page.
I developed the [Version Check|http://pscode.org/jre.html] applet that can handle either of those alternatives.
Another approach is to use the deployJava.js that checks Java versions before launching the applet.
I also offer Wrapplet to do both the version checking and load 'child' applets. But note:
1) With the other better alternatives, I have not looked closely at the code in a long while.
2) Loading one applet in another is possible, but not easy.
3) I half expect that each new Java micro-version will ruin it. -
How to hide applet .class name in html under CODE= applet.class?
I want the user not to know about my .class name in the source code.
I know there is a way in javascript.
Does anybody knows how to do it?
in other words...in the following code ..the user can know what it the .class name of my applet..and can download the NewJApplet.class
on his/her computer easily..
remember it could be .class or .jar file FYI.
Thanks in advance
<HTML>
<BODY>
<P>
<APPLET code="NewJApplet.class" width=800 height=560></APPLET>
</P>
<HR WIDTH="100%"><FONT SIZE=-1>
</BODY>
</HTML>Thanks for your comment .. but it sounds lots of encryption/decryption
involved.. I need somthing very simple... i have seen this code which does this.. here is the code but i am not an javascript expert .. so please
if someone gets any clue let me know...
here is the code ... it just a part of the drop down menu that 's
why it has <a class="drop" syntex in front of it ...
<a class="drop" href="javascript:AnyApplet('y')">My Applet</a><br></div>
Maybe you are looking for
-
please see what I wrote above thanks
-
My wife just got a new iPhone 6 and took some great photos then I connected it to her computer and restored it to her iPhone 4 settings and lost her new photos. Is there a way to recover them?
-
We recently upgraded to CUCM 10.5 and CUC 10.5 using an e.164 dial plan throughout. One snafu that has surfaced is how do people access a CallHandler via the Greetings Administrator TUI if the CallHandler extension begins with a '+' character? Pressi
-
Setting "Services" for exporting images to web
In Bridge there is a setting when exporting images to social media that is called "services". I cannot seem to active this selection so that I can set up my pw and login to send images directly from Bridge. Can anyone help me set this up? In Bridge I
-
Can't set up mail account on iPOD
Can anyone tell me how to set up my email account on iPOD? I'm connected through cogeco cable and have an address ending in cogeco.ca I have gone through settings and clicked add new account on my iPOD. It seems to recognize it. Under Incoming mail s