Struts Actions
5 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, November 24, 2004 10:32 PM

How do I implement a RMI callback with Java 1.5/5.0? I always thought Java 5 would relieve me of using the rmic tool. Works fine without callbacks. As soon as I am trying to implement a callback, I get java.lang.ClassNotFoundException: Client_Stub, Stub class not found: Client_Stub; If I use rmic for Client.java, everything works fine. Did I get sth wrong in my code (it is attached, but simplified)? Or is there any proper example for callbacks with Java 5? Thanks very much, really appreciate every help! //IClient extends Remote public class Client implements IClient { ... //the method called by the original server public void notify(...) throws RemoteException {    More>>

How do I implement a RMI callback with Java 1.5/5.0?



I always thought Java 5 would relieve me of using the rmic tool. Works fine without callbacks. As soon as I am trying to implement a callback, I get java.lang.ClassNotFoundException: Client_Stub, Stub class not found: Client_Stub;
If I use rmic for Client.java, everything works fine. Did I get sth wrong in my code (it is attached, but simplified)?
Or is there any proper example for callbacks with Java 5?

Thanks very much, really appreciate every help!


		
//IClient extends Remote
public class Client implements IClient {
...
//the method called by the original server
public void notify(...) throws RemoteException {
try {
//do sth
} catch (RemoteException e) {
}

}
...
public static void main(String[] args) {
IClient client = new Client("MrSuperImportant");
try {
UnicastRemoteObject.exportObject(client);
...//this is where exception occurs
} catch (MalformedURLException e) {
...
}
}
}

//the server, IAccountManager extends Remote
public class AccountManager extends UnicastRemoteObject implements IAccountManager {

private IClient client;
private String name;

public AccountManager(String name) throws RemoteException{
this.name=name;
}

public void registerInterest(IClient iclient)
throws RemoteException {
client = iclient;
}


public void notifyClient()
throws RemoteException {
client.notify(...);
}

public static void main(String[] args){
try {
//Create and install a security manager
System.setSecurityManager(new RMISecurityManager());
//Construct remote object
//After this call, it is listening for connections
IAccountManager obj = new AccountManager("UBSManager");
//Binds the URL "msgBoard" to the object
Naming.rebind("accManager", obj);
logger.info("AccountManager bound to name 'accManager'");
} catch (RemoteException e) {
...//and other exceptions
}
}

}



I am getting a problem with action classs when I want to display simple data. When ever I click a link I want to display a bulk data.But it is reporting a error no input attribute for mapping path /action name



Could u please help me




   <<Less

Re: Struts Actions

Posted By:   nith_ps  
Posted On:   Tuesday, December 21, 2004 09:00 PM

If u r using struts Validator for error checking purpose
then U have to create anotherUrl (actionmapping)in struts_config.xml for validation.

Re: Struts Actions

Posted By:   venkat_Burri  
Posted On:   Tuesday, December 14, 2004 07:45 AM

There is an attribute input for action tag in struts-config.xml.



Provide the input attribute.

Re: Struts Actions

Posted By:   nith_ps  
Posted On:   Monday, November 29, 2004 09:43 PM

I am also get the sample problem.
actually, validation is starting to check from first page .
so, U put some value in your text field instead of null value.

Re: Struts Actions

Posted By:   nith_ps  
Posted On:   Monday, November 29, 2004 09:43 PM

I am also get the sample problem.
actually, validation is starting to check from first page .
so, U put some value in your text field instead of null value.

Re: Struts Actions

Posted By:   Amir_Pashazadeh  
Posted On:   Thursday, November 25, 2004 10:14 AM

mmm, I'm not sure, but it seems some validation problem occures before entering your aciton's execute() method. Check you validate() method on form beans, or rules you defined in validator configuration files.

About | Sitemap | Contact