How jsp can call applet functions
good morning to all java experts
i have one problem that is
in my application i have one applet in the server side which contains functions like encryption, decryption, hash functions.
whenever any client wants to store some information on server side then he download the applet from the server and he gives his own key and encrypt all the contents and these encrypted message only transmitted through media and store on server side
whenever clients wants to retrieve some information from server then he fetch the only encrypted message to client side then he down load the applet from server and decrypts the message as he pass the previous key.
the problem is that whenever jsp calls the applet functions through javascript it displaying error message like: error in the jsp page
but this concept working through html page properly
plss reply as soon as possible
thanking uuu
the problem is that whenever jsp calls the applet functions through javascript Show the relevant code how you thought to accomplish this (this is namely impossible without firing a new request to the server).
it displaying error message like: error in the jsp pageAnd further on, you -as developer- should know that it is not-done and unclear to talk about errors if they are irrelevant. Always post and the full, complete, original and unchanged error message and -if in Java- also the stacktrace. They are helpful in debugging.
Similar Messages
-
How do you call a function in an attached MovieClip from the current MovieClip?
Hi there,
I have this MovieClip A (converted as a symbol) and put in my
main MovieClip B using attachMovie() , and I am wondering how I can
call a function defined in A from within B.
Is it possible?
ThanksHi kglad,
yes, I did the attachMovie of the symbol B and it seems like
none of the ActionScript written in B was not carried over.
This is how I built B into a symbol :
(1) Two layers ( one for the ActionScript only, the other for
the Components)
(2) I defined the functions to be called remotely by A in the
ActionScript layer
(3) I selected all the components in the Components Layer and
did a Convert To Symbol
(4) I added the Symbol into A's Library
(5) I used attachMovie to instantiate the Symbol of B
I must have missed out something somewhere
Thanks -
How can call a function module(RFC)in one server to another sever in my rep
How can call a function module(RFC)in one server to another sever in my report program.
What i am know whenever rfc enabled immediately radio button checks then only it will come.
please justify.Syntax
CALL FUNCTION func DESTINATION dest [EXPORTING p1 = a1 p2 = a2 ...]
[IMPORTING p1 = a1 p2 = a2 ...]
[CHANGING p1 = a1 p2 = a2 ...]
[TABLES t1 = itab1 t2 = itab2 ...]
[EXCEPTIONS [exc1 = n1 exc2 = n2 ...]
[system_failure = ns [MESSAGE smess]]
[communication_failure = nc [MESSAGE cmess]]
[OTHERS = n_others]].
http://help.sap.com/saphelp_47x200/helpdata/en/22/042537488911d189490000e829fbbd/frameset.htm -
How do you call a function within a package using OCI in C
I am trying to call a user-defined function in Oracle 8.1.7 using OCI in C. I am getting a ORA-06550 PLS-00221, <function name> is not a procedure or is undefined. Can anyone tell me how I would call a function using OCI?
Thanks.I think I figured it out, but I am now getting a ORA-06512 error; numeric or value error: character string buffer too small.
-
How do I call a function from an Itemrenderer?
Hi, Im new in flex and I wonder if I can call a function from within an AdvancedDataGridRendererProvider
for example:
<mx:AdvancedDataGrid>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="id" />
</mx:columns>
<mx:rendererProviders>
<mx:AdvancedDataGridRendererProvider
dataField="detail"
renderer="components.myRendererProvider"
columnIndex="2"
depth="2"
/>
</mx:rendererProviders>
</mx:AdvancedDataGrid>
<mx:Script>
<![CDATA[
public function outerFunction(){
]]>
</mx:Script>
myRendererProvider
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" paddingLeft="10" paddingRight="2" horizontalGap="2" paddingTop="0">
<mx:Script>
<![CDATA[
public function callOuterFunction( ){
how do I call the outerFunction() from here?
]]>
</mx:Script>
<mx:LinkButton fontSize="13" fontWeight="bold" click="callOuterFunction( )" label="label" />
</mx:HBox>
thank you in advance.There are two ways to call a function from within an ItemRenderer. One way is to dispatch an event from your ItemRenderer and listen for the event in your main application. This approach has the advantage of creating loosely coupled code which is eaiser to maintain and extend if needed, but it takes a bit more work to set things up than using the second aproach lised below. You could also create a custom event to have greater control over what data is sent with the event.
private function callOuter():void {
this.dispatchEvent(new MouseEvent());
The other approach is to call the main application by using parentDocument.
private function callOuter():void {
parentDocument.handleItemRenderer();
Chris -
Does flex can call vbscript function ?
i am not sure does flex or action script can call vbscript function .
how can i get detail information . thank you!Adobe does not provide such a capability. Folks have created ways to call
Java I believe, and ExternalInterface will call JavaScript. And you can use
sockets. And NativeProcess from AIR apps. -
How do you call a function module in a web dynpro application ?
Why do you delete my postings ?????????????????????????????
pls see subject
Edited by: Ilhan Ertas on Apr 1, 2009 4:51 PM
Edited by: Ilhan Ertas on Apr 1, 2009 4:52 PMIts not me deleting them. Perhaps a different moderator or a technical problem within SCN itself.
Someone might be concerned about your question because it is very basic.
You can call a function module from WD the same way you did in any ABAP program - with the CALL FUNCTION syntax. There is a service call wizard that will generate a matching context and calling code for you - but it is just a helper, code generator. Everything it does can be done by hand as well (and often better than the generator). -
When I send e-mail messages with file by using a POP3 in Exchange 2010 I received delivered message with file. How I can disable this functions that file do not include to delivery message. I use Exchange 2010 only local users.
I think there is not native rule for this, but you could try a transport rule which removes all attachments over a very small file size like 1KB.
http://blogs.technet.com/b/exchange/archive/2009/05/11/3407435.aspx
CRM Advisor -
How do I call a function in java?
I'm calling a function called lightParse() from the method. But, I'm getting an error:
F:\Data>javac -classpath xerces.jar;xalan.jar;classpath%; Test.java
Test.java:22: lightParse(java.lang.String) in Test cannot be applied to ()
lightParse();
^
The scenario or code portion is :
import javax.swing.*;
import java.awt.*;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
public class Test extends JFrame
JList list;
JScrollPane listContainer;
public Test()
setSize(300, 300);
setVisible(true);
initialize();
lightParse(); // calling the function
public void initialize()
list = new JList(new DefaultListModel()); // Set the initial model
listContainer = new JScrollPane(list);
listContainer.setSize(new Dimension(200, 200));
getContentPane().setLayout(new BorderLayout());
getContentPane().add(listContainer, "Center");
validate(); // Validate the screen
// The function is the following
public void lightParse(String url)
DocumentBuilder parser;
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
try {
parser = factory.newDocumentBuilder();
Document doc = parser.parse(url);
How do I call the function correctly with the right parameter?
Thanks in advance for the answer.u r calling lightParse method without passing the expected "String" argument. There must not be an overloaded method for lightParse without any arguments.
So u should use this:
lightParse(some string here);
Hope this explains.
I'm calling a function called lightParse() from the
method. But, I'm getting an error:
F:\Data>javac -classpath
xerces.jar;xalan.jar;classpath%; Test.java
Test.java:22: lightParse(java.lang.String) in Test
cannot be applied to ()
lightParse();
^
The scenario or code portion is :
import javax.swing.*;
import java.awt.*;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
public class Test extends JFrame
JList list;
JScrollPane listContainer;
public Test()
setSize(300, 300);
setVisible(true);
initialize();
lightParse(); // calling the function
public void initialize()
list = new JList(new DefaultListModel()); // Set the
e initial model
listContainer = new JScrollPane(list);
listContainer.setSize(new Dimension(200, 200));
getContentPane().setLayout(new BorderLayout());
getContentPane().add(listContainer, "Center");
validate(); // Validate the screen
// The function is the following
public void lightParse(String url)
DocumentBuilder parser;
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
try {
parser = factory.newDocumentBuilder();
Document doc = parser.parse(url);
How do I call the function correctly with the right
parameter?
Thanks in advance for the answer. -
How i can call java program in VB2005 ?
Hi members...
Please...please...please...
If any one now how i can call java program in VB.net program and open it ,please i want now the way to do it by details and by examples and step step to do it ,,..
thanks ...If your server does not return to the command prompt, write a java programm which starts your server and returns to the command prompt.
An example for an application like this:
import java.io.IOException;
public class StartApp
public static void main(String[] args)
if (args.length > 0)
StringBuffer cmd = new StringBuffer();
for (int index = 0; index < args.length; index++)
cmd.append(args[index] + " ");
try
Runtime.getRuntime().exec(cmd.toString());
catch (IOException ioe)
System.out.println("Error: command not found: " + cmd.toString());
else
System.out.println("Error: missing arguments");
An example for starting your server with that programm:
/usr/bin/java -jar ./StartApp.jar /usr/bin/java -jar ./myServer.jar
It works. Have fun. -
HELP!!! How I can call to EJB from another EJB??
I have two EJBs, for each EJB I have a jar, how I can call to EJB jar to another???
I have tried the following, in the first EJB I have import the second EJB jar and call it with context, lookup, PortableRemoteObject etc.. but the instruction lookup not find the second EJB reference.
The name in the lookup instruction is the JNDI name of the second EJB but not find a reference to it.
Please help me!!! Thanks!!
The error is:
javax.naming.NameNotFoundException: Missing node. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:34)
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(NotFoundHelper.java:50)
at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:161)
at com.inprise.j2ee.jndi.java.CorbaContext.resolveName(CorbaContext.java:242)
at com.inprise.j2ee.jndi.java.CorbaContext.lookup(CorbaContext.java:261)
at com.inprise.j2ee.jndi.java.javaContext.internal_lookup(javaContext.java:483)
at com.inprise.j2ee.jndi.java.javaContext.internal_lookup(javaContext.java:493)
at com.inprise.j2ee.jndi.java.javaContext.internal_lookup(javaContext.java:493)
at com.inprise.j2ee.jndi.java.javaContext.lookup(javaContext.java:937)
at com.inprise.j2ee.jndi.java.javaContext.lookup(javaContext.java:942)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at ejbclient.EnterpriseClientBean.addition(EnterpriseClientBean.java:115)
at ejbclient.EnterpriseClientBean.actionPerformed(EnterpriseClientBean.java:97)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at avax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstrok.. Here it goes.. I am writing a sample code..
public class EJB1LogBean implements SessionBean {
// test is a method of stateless session beam
public void test ( TestVal val )
throws RemoteException{
try {
EJB2LogHome ejb2Home= (EJB2LogHome)getHome("java:comp/env/ejb/EJB2LogHome",1);
EJB2Log ejb2Log = ejb2LogHome.create ( val );
} catch ( CreateException e ) {
System.out.println("Create Exception occurred ");
e.printStackTrace();
} catch ( RemoteException e ) {
System.out.println( "RemoteException Occured");
e.printStackTrace();
throw new RemoteException () ;
} catch(Exception ee) {
ee.printStackTrace();
private EJBHome getHome(String jndiName,int type) {
try {
Context context = new InitialContext();
Object ref = context.lookup( jndiName );
switch(type)
case 1:
EJB2LogHome ejb2LogHome = ( EJB2LogHome )
PortableRemoteObject.narrow( ref, EJB2LogHome.class );
return ejb2LogHome;
} catch ( Exception e ) {
e.printStackTrace();
return null;
}//EJB1LogBean ends
Here as you can see, EJB1LogBean(session bean) is calling a second EJB, EJB2LogBean (entity bean). TestVal is a sample value object passed. It is plain java class and can vary from app to app and it has got nothing to do with ejbs.
"java:comp/env/ejb" is a J2EE standard and while getting a home interface, you have to append the home interface class name to "java:comp/env/ejb". Here I am passing "java:comp/env/ejb/EJB2LogHome" and "1" to getHome method, whose job is to get a reference to a home interface. getHome method is a local method. "1" is passed just to give a flexibility to getHome method as you can have more ejbs to invoked. In that case, you can go on adding different case statements for 2, 3 etc.
The only thing you have to keep in mind is that your deployment descriptor for EJB1LogBean will contain the entires for both the beans i.e. for EJB1LogBean and EJB2LogBean. This is because EJB2LogBean is wrapped by EJB1LogBean.
Hope this helps.
Please let me know if you need anything more.
- Amit -
How we can call or execute a SHELL script through Oracle forms or Reports
How we can call or execute a SHELL script through Oracle forms or Reports.Its urgent.......
Use HOST command.
-
How i can call an item that the name of the bloc is a param --URGENT--
how i can call an item that the name of the bloc is a param
exp:
DECLARE
B VARCHAR2(20);
begin
B:='BLOC1';
:B.Text1:='Hello'; --- a want thisLooks like your talking 'bout Forms, don't you?
What you're looking for is the copy built-in, syntax is e.g.
COPY ('MY TEXT', 'EMP.ENAME'); -
How do i call a function within the jsp?
Hi,
What i am doing is now allow a user to type in comment and when the user click on "Add" button, it will call my function and write to a txt file.How can i call a custom jsp function within my jsp page or what is the correct way to do this?
[My current codes]
<form name="SubmitEvent" method="post" action="addComment()">
</form>
function addComment()
System.out.println("Entered Add Comment function");
Thanks for your help!You can define a Java Bean (I presume you know the rules to write a Java Bean) and send the read value as parameter to the Bean and then call a function in the Bean from the JSP.
Contact me if you need more help! -
Problem in calling applet function in jsp
When i am trying to load Java applet through jsp, i get this error :
Java Plug-in 1.6.0_02
Using JRE version 1.6.0_02 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\pankajb
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
load: class CAppletDisplay.class not found.
java.lang.ClassNotFoundException: CAppletDisplay.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
<jsp:plugin type="applet" code="CAppletDisplay.class" codebase="." width="857" height="687" align="left">
<jsp:params>
<jsp:param name="machine" value="server" />
<jsp:param name="port" value="1433" />
<jsp:param name="Databasename" value="Timba" />
<jsp:param name="userid" value="sa" />
<jsp:param name="password" value="password"/>
</jsp:params>
<jsp:fallback>There is a problem with your browser ...</jsp:fallback>
</jsp:plugin>load: class CAppletDisplay.class not found.
java.lang.ClassNotFoundException: CAppletDisplay.classthat means that client jre didn't find the CAppletDisplay class.
make sure that you put this class in the right directory.
Maybe you are looking for
-
I have an iPhone 3GS/IOS 6.1.6/iMac Yosemite 10.10/iTunes 12.0.1.26. I have always synced it with my 27 inch iMac with no problems. I recently attempted to install the apps "The Economist Expresso" and "Disconnect." I do NOT have (and have never had
-
I got this iPad as an open box deal on bestbuy, it says the device is no longer eligible for creating a free iCloud account. How do I fix this?
-
Running 2 Instances of Captivate 8 on Mac
I can run 2 instances of Captivate 6 on a PC, but at home I have 8 and I'm on a Mac. When trying to open Captivate again through the Spotlight Search, Captivate would not open again. I did not try opening it through the Applications folder. Is it pos
-
Show row number in Collapsed List
We created one collapsed list, then we use icommond to deploy this view to different enviroment. But after import this view, we found it will show row number in list. For example, if list is empty, it shows "0 rows", if has 3 rows it show "3 rows" an
-
How do I get the GAL in OWA to show up in my Outlook 2007 contacts list?
How do I get the GAL in OWA to show up in my Outlook 2007 contacts list? Is there a directory server address I can use to set up a new address book?