|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
how to allow jsp and applet to access common class instance
how can a jsp file and an applet in that jsp file both access the get/set method of an instance of one particular class ?
problems 1. where do i store the applet class, and the accessor class, can i use codebase and store applet class also in WEB-INF/classes where the accessor class is currently ? if yes how ? (i tried using codebase="../WEB-INF/classes" but it does not work 2. suppose class name is Bid, first jsp creates instance Bid b = new Bid() and sets some property but then applet class will create another instance Bid b = new Bid() but this will not get the same value since a new isntance is created .. is the only solution using static method ?? thanks |
|
#2
|
|||
|
|||
|
You cannot have an applet get a reference to an object created by a jsp. One is client side and one is server side. They are running in completely different environments. The most you could do is have the applet connect to a servlet/jsp on the same server and have it send over an object via an ObjectStream.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > how to allow jsp and applet to access common class instance |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|