Question about cfdiv bind

I'm trying to create a page that displays the results of a query, but will allow you to filter them by date, name, etc. I'm relatively new to this concept, but reading a bit online I found some examples that did what I'm trying to do. I have a few questions and a problem though, if someone is willing to provide a bit of guidance. If it matters, I'm using cf9.
First, can you use a <cfdiv bind to submit multiple url parameters? If so, do I just use a semicolon to separate them like this:
<cfdiv bind="url:mypage.cfm?param1={value1};param2={value2}" />
Second, if you can use this functionality, what's the best way to send dates as url parameters? URLEncodedFormat() and then URLDecode()? All the examples of those tags surround them with # to indicate variables, but since you don't use that notation in a cfdiv bind, do I just put the whole thing inside the {} like this (and then use URLDecode(mydate) on the action page):
<cfdiv bind="url:mypage.cfm?date1={URLEncodedFormat(mydate)} />
Third, I'm having trouble getting the <cfdiv bind to display at all. I have an action page set up (mypage.cfm) that loads fine in a browser, but when I try to add it to another page like this, it doesn't work:
<cfdiv bind="url:mypage.cfm" />
I'm assuming this is because I'm not submitting any parameters on this page to be processed on mypage.cfm, but I don't know if that's true. I'm trying to get the div to display first, then add the dynamic form to filter the results, but maybe it doesn't work that way?
Thanks for any help!
Jeremy

Thank you, I was able to get it mostly working. There was an issue with the server on my system so I had to re-install Coldfusion. It dawned on me that I had cleaned up some files that I was no longer using and might have accidentally gotten rid of something important.
So it's definitely better now. I can change the dates so that I can display records that fall within those date parameters. What I'm trying to do now is be able to sort the records, and I'm having trouble with that. Right now I have a select menu named "sort" with a bunch of values that reference elements in the table: Last Name (Lname), Date Submitted (Reptime), and Date of Absence (Absence_Date). Then in my sql I have "ORDER BY <cfparam value="#url.sort# cfsqltype="cf_sql_varchar">. I don't get any errors or anything, I just don't get any changes to the displayed data. Here's my sql, the commented parts are not in the file, I added those for explanation here:
<!--- There are two radio buttons to toggle between viewing all records and viewing the selected records based on the date parameters. This sets the start and end dates when view all is selected --->
<cfif IsDefined("url.viewAll") AND #url.viewAll# EQ "yes">
  <cfset startDate="01/01/2012">
  <cfset endDate="12/12/2020">
<cfelse>
<!--- This sets the start and end dates based on the items in those fields if view all is not selected, and sets the dates to the view all dates if the date entry fields are empty --->
  <cfif IsDefined("url.startDate") AND #url.startDate# NEQ "">
    <cfset startDate="#url.startDate#">
  <cfelse>
    <cfset startDate="01/01/2012">
  </cfif>
  <cfif IsDefined("url.endDate") AND #url.endDate# NEQ "">
    <cfset endDate="#url.endDate#">
  <cfelse>
    <cfset endDate="12/12/2020">
  </cfif>
</cfif>
<!--- Defines the url.sort parameter and sets the default in the event no selection is made on the page. --->
<cfparam name="url.sort" default="Absence_Date">
<!--- And my query. Pretty self-explanatory, but the ORDER BY portion isn't working. Records are displayed in the order they appear in the database, which is the submit time (Reptime) --->
<cfquery name="absences" datasource="ctband">
  SELECT *
  FROM Absences
  WHERE Absence_Date > <cfqueryparam value="#startDate#" cfsqltype="cf_sql_varchar"> AND Absence_Date < <cfqueryparam value="#endDate#" cfsqltype="cf_sql_varchar">
  ORDER BY <cfqueryparam value="#url.sort#" cfsqltype="cf_sql_varchar">
</cfquery>

Similar Messages

  • Question: about data binding

    hi :
    I want to know components binding database in UIX . for example :
    Component -- "train" , now , I only get data souce from javaBean ,but the data is static . of course , i know this only .I want to know train how to binding database ,
    get value from database.
    i study uix Shortly , please help me . thanks , in advance . It's better provide a example . Thanks , again.
    Follows is via javaBean, code, like this .
    datapage.uix
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <data name="nodeData">
    <method class="view.NodeBean" method="getTableData"/>
    </data>
    </provider>
    <contents>
    <train value="${bindings.StepSno}">
    <contents childData="${uix.data.nodeData}">
    <link text="${uix.current.text}"/>
    </contents>
    </train>
    </contents>
    NodeBean.java (javaBean)
    static public Object getTableData(RenderingContext context, String namespace, String
    name)
    // The following List is recreated every time this method is called
    // (which is once per page render). A better implementation would
    // move the List creation to a UIX Servlet Event Handler.
    // See the Using a Controller in ADF UIX chapter for more information.
    List list = new ArrayList();
    for (int i = 0; i < 5; i++)
    HashMap row = new HashMap();
    row.put("text", "Row " + i);
    list.add(row);
    return list;
    for this example , i can get data from javaBean as train's value , but the data is
    static , i want to get data from database , but i don't know how to do this . please help me
    thanks very much ,again , in advance .
    Steven

    Hi,
    <train value="${bindings.StepSno}">
    uses Expression Language to bind to the ADf binding object. You can add your own Java bean that accesses the database and reference it in the same way.
    Frank

  • Some basic questions about rmi registry  context  "bind" and "lookup"

    We have more processing to do than can be accomplished with a single computer. To solve the problem I've implemented a distributed computing solution using RMI. (The first time I saw RMI was about 2 weeks ago, so please bear with me!)
    The implementation is a proof of concept not a fully fleshed out system. I have one "Workunit Distributor" computer and any number of "Data Processor" computers all on the same lan segment. "Workunit Distributor" and "Data Processor" computers are both RMI client and server to each other. The "Data Processor" computers are given the ip address and name of the "Data Distributor" on the commandline when they start. They communicate their willingness to receive and process a workunit to the ""Workunit Distributor" via a RMI call. Work units are sent to available "DataProcessors" and results are eventually returned to the "WorkunitDistributor" (minutes or hours later). The model program works quite well, and appears to be capable of doing the processing we need to get done.
    But now that it seems viable, I've been asked to make it a little more scalable, flexible and self configuring. In particular, instead of one "Workunit Distributor", any number of "Workunit Distributors" should be allowed to show up or disappear from the lan at any time and the system should continue to function. I've worked out a good scheme for how this can be done, but I have a couple of questions about the RMI registry (registries?). I'm trying to keep from implementing some functionality that may already be available as a library or subsystem.
    With my current model design, each computer binds to its own registry with a unique name. For instance:
    CRDataProcessorImpl crdpi = new CRDataProcessorImpl(svr);
    Context crDataProcessingContext = new InitialContext();
    crDataProcessingContext.bind("rmi:"+hostName, crdpi);
    Currently the "Data Processors" get the info they need for a Context lookup() of the one and only "Workunit Distributor" from the commandline. And the info the "Workunit Distributor" needs to do a Context lookup() of a "DataProcessor" is passed to it from each "DataProcessor" via a RMI call.
    But in the newer (yet to be implemented) scheme where any and all "Workunit Distributors" show up and disappear whenever they feel like, the naming bootstrapping scheme described above won't work.
    I can imagine a few ways of solving this problem. For instance, having "Workunit Distributors" multicast their contact information on the lan and have a worker thread on each "Data Processor" keep track of the naming information that was multicast. Another alternative (more organized, but more complex) might be to have a dedicated host with a "well known" address and port that "Workunit Distributors" and "Data Processors" could all go to, to register or look up at an application level. Sort of a "domain name service" for RMI. But both these schemes look like a lot of work to implement , debug and maintain.
    The BEST thing would be if there was one plain vanilla RMI registry that was usable by all RMI enabled computers instead of having each computer have its own local name registry. In volume 2 of the Core Java2 book it says that every registry must be local. I'm only hoping there's been progress since the book was published and now a central rmi registry is available.
    If you have any ideas about this I'd like to hear what you know.
    Thanks in advance for any advice.
    Lenny Wintfeld
    ps - I don't believe web services, as full featured as it is, is a useful alternative. I'm moving 100's (in the future possibly 1000's) of megabytes back an forth for processing.

    The local bind/rebind/unbind restriction is still there and it will always be there.
    I would look at
    (a) RMI/IIOP, where you use COSNaming as a registry, which doesn't have that registriction, and which also has location-independent object identifiers
    (b) Jini.

  • Question about session variables and binding

    Hi All,
    I'm a newbie with Application Express. I've gone through several tutorials and a book, and now I'm actually getting started with apex. My first adventure is a tiny little form, where all you do is fill it out and it sends an email. Pretty simple.
    And, i have it working just fine - but I have a question about something I don't quite understand. Basically, I am generating the email text in a page process. And some of the form fields work fine if i reference them as *:ACCT_NAME*, but some give me the dreaded "not all variables bound" error. For the ones that give me the error, I can reference them like V('ACCT_NAME').
    So, as a newbie, I'm a little confused. When is it appropriate to use the V function, and when it is appropriate to use binding? Why would one of the fields work with binding but not another from the same form?
    Thanks for any clarification you can offer,
    Lisa

    Lisa,
    A bind variable is a place holder variable available in an environment.It is used quite frequently(outside Apex Context) in SQL and PLSQL scripts and especially in Dynamic SQL statements.Many times using a bind variable gives better performance. In the Apex environment,page items and many other variables related to the session are available as bind variables and hence their value can be referred in SQL,PLSQL contexts as :VARIABLE_NAME.
    Now V() function is an apex specific function which returns the value of an apex session variable outside the apex environment. So as Machaan pointed out, it is used in
    procedures and triggers that gets called from within an apex session. This is required since the bind variables themselves are not directly available in the SQL environment but their values from the corresponding session can be accessed by this apex built-in function.
    The length of any Bind variable name is limited to 30 characters, this is a limitation inherited from Oracle SQL itself and hence session variables(page or application items) whose name has a length which exceeds 30 characters cannot be used as the :ITEM_NAME format. In such cases you would have to use the v() method again. This might be happening in your case.

  • Two questions about SG300 DHCP server

    Hi,
    I have two questions about the DHCP server on the SG300:
    On the Address Binding page, what does the "Declined" state mean? I have a NAS device that won't pull an address, and I think that the entry with a state of "Declined" corresponds to this device. It was previously pulling an address from a RV180, so the only difference is that it is now connected to the SG300. I worked around this by manually setting the address on the NAS device, but this won't scale if I run into a lot of other devices that can't pull an address.
    I configured a static address binding for a WAP321 and found that instead of pulling the configured address that it pulled a dynamic address. I checked the Address Binding page and see that the dynamic entry that corresponds with the WAP321 has a Client Identifier rather than a MAC address. I changed the static entry for the WAP321 to use the client identifier displayed in the dynamic entry, and now the WAP321 pulls the configured static address. Is this expected behavior?
    Thanks,
    Bob

    With the SX300/500 it is required the client identifier, it doesn't automatically insert it. If static DHCP is made on the switch and you didn't need client identifier, that is more or less fortunate behavior for you
    So to answer this question, the expected behavior is to configure client identifier for static DHCP entry.
    -Tom
    Please mark answered for helpful posts
    http://blogs.cisco.com/smallbusiness/

  • Sql developer: question about exporting data

    Hi,
    we're recently working with sql-developer. i've got a question about how we can export query results to txt/csv files for use in other applications.
    First a problem: if we start a query that looks like this:
    select * from
    select * from A where start_date = &date
    ) a,
    select * from B where start_date = &date
    ) b
    where a.name = b.name
    Sql-developer asks twice to input a value for the variable 'date', although it's the same variable and it's supposed to have the same value.
    We solve this by making a script:
    first we define the variable, then we put the query.
    When we start the script, the query runs ok and sql developer asks to input the value for the variable once.
    But now the result of the query is shown in the script output. The script output seems to be limited in number of lines and difficult to export.
    So my question is: what's the best way to export query results to txt/csv files, avoiding the problem mentioned above?
    i hope there is a solution where we can use a single query or script.
    Thanks in advance!

    Using bind variables like ":date" should solve the problem of being asked twice for the same thing.
    Executing the query normally (F9), gives you the export options you require through the context menu inside the Results grid.
    Regards,
    K.

  • Question about Java's HttpServer: Threading? Backlog?

    Hello,
    I have two questions about Java's HttpServer (com.sun.net.httpserver). From the JavaDoc:
    >
    Management of threads can be done external to this object by providing a Executor object. If none is provided a default implementation is used.
    >
    How can I get information about the default implementation in 1.6.0_13? Do you know the behavior? From my observations, the default implementation uses no Threads, meaning every request is handled in the same Thread, this results in handling the requests to the HttpServer one after another.
    Is this right?
    The second question is about this, also from the JavaDoc:
    >
    When binding to an address and port number, the application can also specify an integer backlog parameter. This represents the maximum number of incoming TCP connections which the system will queue internally. [...]
    >
    When setting the backlog to -1, it uses the systems default backlog. How can I determine the systems default backlog? Can some lines of Java code reveal it (there is no getBeacklog() method)? Or is it up to the Operating System (we use Redhat Linux)?
    Thanks a lot for your help!
    Regards,
    Timo

    How can I determine the systems default backlog?You can't. There is no API for that even at the C level.
    Can some lines of Java code reveal itNo.
    Or is it up to the Operating System (we use Redhat Linux)?Yes. Linux provides a large default. It seems to be at least 50 on most platforms. This is not something you should be worrying about.

  • Question about ports

    Hi,
    I have a clarification question about ports and Java. Assuming all firewalls are disabled on a PC, a Java application can connect to any port via a socket to communicate with other PCs, as long as this port is not used by another application.
    Is the following correct:
    a) Two applications (Java or no) cannot connect to the same port together, ever.
    b) Two Java applications sending and receiving datagram over a given multicast address using the same port can never communicate with each other when ran on the same PC because of a).
    Thanks,
    J.

    Jrm wrote:
    Hi,
    I have a clarification question about ports and Java. Assuming all firewalls are disabled on a PC, a Java application can connect to any port via a socket to communicate with other PCs, as long as this port is not used by another application.You mean bind to a port to act as a server? Yes. As long as that port is not already bound for listening.
    If you mean a client application can connect to any port where a server is listening, then it doesn't matter if another client is talking to the server on that port, as long as the server is written to handle concurrent connections.
    >
    Is the following correct:
    a) Two applications (Java or no) cannot connect to the same port together, ever. No, see above. Unless by "connect" you mean "bind". (Even that may be incorrect terminology.)
    b) Two Java applications sending and receiving datagram over a given multicast address using the same port can never communicate with each other when ran on the same PC because of a).Not sure exactly what you're saying here.
    Really, though, why not just write some code and try it?

  • Question about document/literal web service

    Hello every body.
    I have some question about document/literal web service.
    I’ve been working with Axis before.
    Axis has four valid signatures for your message-style service methods:
    public Element [] method(Element [] bodies);
    public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
    public Document method(Document body);
    public void method(SOAPEnvelope req, SOAPEnvelope resp);
    The same I am trying to do with WebLogic API for webservices.
    But when I am trying to test web service (public Document method (Document body); )
    I have serialized exceptions for org.w3c.dom.Document.
    Do I have to write a custom class for org.w3c.dom.Document serialization?
    If yes can you give me some idea or example?
    The all idea behind this web service is. I have just one web service and mane classes for XML processing. Depends what xml document will be during runtime, web service will be using different class for xml processing. It works fine with Axis, but in case of WebLogic I have some problem.
    One more question… How I have to call this web service from java client?
    I have seen this example http://www.manojc.com/?sample31 ,
    but this web service looks like (Document helloDom()). I need to send Document.
    This example works for Dynamic Proxy, but does not work for static call.
    Any ideas?? Thank in advance.

    Hi,
    I am getting a similar issue. I created a Document-style/literal webservice and deployed on Weblogic 9.2 . Then I generated client stubs using clientgen. I get the following exception stack trace:
    java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SOAPException:
    failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException: type mapping lookup failure on
    class=class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl TypeMapping=TYPEMAPPING SIZE=3
    ENTRY 1:
    class: java.lang.Object
    xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocumentResponse
    ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@1125127
    deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@18dfef8
    ENTRY 2:
    class: java.lang.Object
    xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocument
    ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@15e83f9
    deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@2a5330
    ENTRY 3:
    class: java.lang.Object
    xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
    ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@bb7465
    deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@d6c16c

  • Doubt about Component binding....

    I have a doubt about component binding because I am also using component binding in my application, in my application each page has more than 20 components and each page is session scope, at one point I am getting message like perm space(this is because of lack of memory, actually I have 4gb ram). So my is
    "does the jsf creates new object for every reload, because of that my jvm filling with all the objects?".
    Another question is "what is the difference between value binding and component bindings?, and drawbacks of each other" please tell me the differences between them up to the very low level(up to memory usage for each approach).
    Please clarify this doubt...........

    JNaveen wrote:
    I have a doubt about component binding because I am also using component binding in my application, in my application each page has more than 20 components and each page is session scope, at one point I am getting message like perm space(this is because of lack of memory, actually I have 4gb ram). So my is
    "does the jsf creates new object for every reload, because of that my jvm filling with all the objects?".This is regardless of the component binding. JSF creates a component tree and stores it in the session. With component binding you can link between the backing bean and the component without the need for UIViewRoot#findComponent().
    Think your problem lies somewhere else. Use a profiler.
    Another question is "what is the difference between value binding and component bindings?, and drawbacks of each other" please tell me the differences between them up to the very low level(up to memory usage for each approach).With the component binding you can get hold of the whole component from the tree in the backing bean. Useful if you want to do a bit more than only holding the component's value, with which you usually do with the value binding.

  • A question about tutorial fligh_list

    Hi, i have a question about web dynpro in java. I´m doing the tutorial fligh_list, but i have a doubt in this part:
    public void wdDoInit()
    //@@begin wdDoInit()
    // Create a new element in the Bapi_Flight_Getlist_Input node
    Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
    wdContext.nodeBapi_Flight_Getlist_Input().bind(input);
    // Create new elements in the Destination_From and Destination_To nodes
    input.setDestination_From(new
    Bapisfldst());
    input.setDestination_To(new Bapisfldst());//@@end
    What is Bapisfldst?
    I´m doing a simple application, only have an input field and the output is two textview... what have i write in the previous method instead of Bapisfldst?
    Thanks,

    Thanks, but i continuo with my doubt... i don´t know what write in my simple application...
    I post an image
    !http://img141.imageshack.us/img141/3236/aplicacionto9.th.jpg|alt=Free Image Hosting at www.ImageShack.us|src=http://img141.imageshack.us/img141/3236/aplicacionto9.th.jpg|border=0!
    My doubst are in the red circle, i´m not sure about these... The application consists in write a code of material and appear the lots in a list. I di the steps that appear in the tutorial... Is it good?
    Thanks,

  • A question about DNS subdomain

    This is a question about DNS subdomain.
    The DNS server for the parent DNS domain is dns1.ours.com.
    The DNS server for the child/sub DNS domain is bee.child.ours.com.
    Configurations on dns1.ours.com:
    File: db.ours.com�F
    @IN SOA dns1.ours.com. postmaster.ours.com. (
    10051215 ; sn
    86400 ;refresh
    7100 ;retry
    777600 ;expire
    126000 ) ;min
    @ IN NS dns1.ours.com.
    dns1 IN A 210.x.x.15
    �c
    [color=Blue]child.ours.com. IN NS bee.child.ours.com.
    bee.child.ours.com. IN A 210.x.x.10[color]
    I did not changed anything in named.conf.
    Configurations on bee.child.ours.com:
    File db.child.ours.com:
    @ IN SOA bee.child.ours.com. test.child.ours.com (
    10051215 ; sn
    86400 ;refresh
    7100 ;retry
    777600 ;expire
    126000 ) ;min
    @ IN NS bee.child.ours.com.
    bee IN A 210.x.x.10
    test IN A 210.x.x.x
    File named.conf:
    options {
    directory "/var/named";
    zone "." {
    type hint;
    file "master/db.cache";
    zone "0.0.127.in-addr.arpa" {
    type master;
    file "master/db.0.0.127";
    zone "x.x.210.in-addr.arpa" {
    type master;
    file "master/db.child.ours.com.rev";
    zone "child.ours.com" {
    type master;
    file "master/db.child.ours.com";
    #nslookup
    Default Server: 210.x.x.10
    Address: 210.x.x.10
    // bee.child.ours.com: the DNS server for the child/sub DNS domain: child.ours.com
    www.ours.comServer: 210.x.x.10
    Address: 210.x.x.10
    *** localhost can't find www.ours.com: No response from server
    //failed to resolve A records in the parent domain, but can resolve A records in its own domain and other domains on the Internet.
    set type=ns
    ours.comServer: 210.x.x.10
    Address: 210.x.x.10
    Non-authoritative answer:
    ours.com nameserver = dns1.ours.com
    Authoritative answers can be found from:
    dns1.ours.com internet address = 210.x.x.15
    //find the DNS server for the parent domain
    > server 210.x.x.15
    // dns1.ours.com: the DNS server for the parent DNS domain: ours.com
    Default Server: dns1.ours.com
    Address: 210.x.x.15
    test.child.ours.comServer: dns1.ours.com
    Address: 210.x.x.15
    *** dns1.ours.com can't find test.child.ours.com: No response from server
    //failed to resolve A records in the child domain, but can resolve A records in its own domain and other domains on the Internet.
    set type=ns
    child.ours.comServer: dns1.ours.com
    Address: 210.x.x.15
    Non-authoritative answer:
    child.ours.com nameserver = bee.child.ours.com
    Authoritative answers can be found from:
    bee.child.ours.com internet address = 210.x.x.10
    //find the DNS server for the child domain
    > server 210.x.x.100
    // a public DNS server on the Internet
    Default Server: [210.x.x.100]
    Address: 210.x.x.100
    set type=a
    www.ours.comServer: [210.x.x.100]
    Address: 210.x.x.100
    Non-authoritative answer:
    Name: www.ours.com
    Address: 210.x.x.72
    //find the A record in the parent domain
    test.child.ours.comServer: [210.x.x.100]
    Address: 210.x.x.100
    Non-authoritative answer:
    Name: test.child.ours.com
    Address: 210.x.x.x
    //find the A record in the child domain
    I wonder why. It is BIND v8.2.2.
    Thanks.

    Hi AAnotherUser_,
    Based on your description, the internal domain name is different from the external domain name, and the web server is hosted internally. And the goal is that the internal user can
    access the web server by using an URL which include the MyCorp.com.
    In this scenario, internet users access your domain name by connecting to the WAN IP address of your router. However, to make the internal users access the website, you would need
    to create the external domain name as a zone on your internal DNS server.
    After creating the DNS zone, right click the zone you created, choose New Host Record.
    Type in the hostname, such as ‘www’, and provide the internal private IP address of your internal web server.
    For more details, please refer to Ace’s blog below, the
    Scenario 2: Different Internal and External but you are hosting the webserver internally
    http://blogs.msmvps.com/acefekay/2009/09/03/split-zone-or-no-split-zone-can-t-access-internal-website-with-external-name/
    Best Regards,
    Tina

  • I hava a question about RMI,please help me!

    Ladys and Gentleman,I hava a question about RMI.I wirte four little programs in java that is about RMI on my PC.
    import java.rmi.*;
    public interface AddServerIntf extends Remote{
    double add(double d1,double d2) throws RemoteException;
    import java.rmi.*;
    import java.rmi.server.*;
    public class AddServerImpl extends UnicastRemoteObject implements AddServerIntf{
    public AddServerImpl() throws RemoteException{
    public double add(double d1,double d2)throws RemoteException{
    return d1+d2;
    import java.net.*;
    import java.rmi.*;
    public class AddServer{
    public static void main(String args[]){
    try{
    AddServerImpl addServerImpl=new AddServerImpl();
    Naming.rebind("AddServer",addServerImpl);
    }catch(Exception e){
    e.printStackTrace();
    import java.rmi.*;
    public class AddClient
         public static void main(String args[]){
         try{
         String addServerURL="rmi://"+args[0]+"/AddServer";
         AddServerIntf addServerIntf=(AddServerIntf) Naming.lookup(addServerURL);
         System.out.println("The first number is: "+args[1]);
         double d1=Double.valueOf(args[1]).doubleValue();
         System.out.println("The second number is: "+args[2]);
         double d2=Double.valueOf(args[2]).doubleValue();
         System.out.print("The sum is: "+addServerIntf.add(d1,d2));
         }catch(Exception e){
         System.out.println("Exception: "+e);
    And I compiled these files,so I got 4 class files(AddServer.class,AddServerIntf.class,AddServerImpl.class,AddServerClient.class).Then I use "rmic AddServerImpl" got another two files(AddServerImpl_Skel.class and AddServerImpl_Stub.class).Then I input command:rmiregistry,in another window,I input command:java AddServer,I got some exceptions,I was confused by these exceptions.The exception is:
    D:\MyJava\rmi_3>java AddServer
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: AddServerImpl_Stub
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: AddServerImpl_Stub
    java.lang.ClassNotFoundException: AddServerImpl_Stub
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Unknown Source)
    at AddServer.main(AddServer.java:8)
    But some times this exception will not appeared.Who can give me answer or suggestion,thanks a lot.
    By the way,when I run shutdown.bat in tomcat_root\bin,I can get some exceptions:
    C:\Tomcat\bin>shutdown
    Using CATALINA_BASE: ..
    Using CATALINA_HOME: ..
    Using CATALINA_TMPDIR: ..\temp
    Using JAVA_HOME: C:\JDK
    Catalina.stop: java.net.ConnectException: Connection refused: connect
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124)
    at java.net.Socket.<init>(Socket.java:268)
    at java.net.Socket.<init>(Socket.java:95)
    at org.apache.catalina.startup.Catalina.stop(Catalina.java:579)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
    at java.lang.reflect.Method.invoke(Native Method)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
    I use Windows server 2000+JDK 1.3.1_04+tomcat 4.1.7

    Maybe I am off base here but it seems to me the problem is the way in which you bind your server. The server must be bound to the same address and you are looking up from, i.e. "rmi://" host "/AddServer"
    so
    Naming.rebind("AddServer",addServerImpl);should be
    Naming.rebind("rmi://127.0.0.1/AddServer", addServerImpl);to match
    String addServerURL="rmi://"+args[0]+"/AddServer";
    AddServerIntf addServerIntf=(AddServerIntf)
    Naming.lookup(addServerURL);Hopefully this will solve your problem, if not it is a problem with your classpath. An easy way to make sure it can see your files is to set the java.rmi.server.codebase to point to where your classes are, e.g.
    java -Djava.rmi.server.codebase=file:"c:\\cygwin\\home\\tweak\\keck_folder\\cmsi401\\RMIGalaxySleuth\\classes\\" AddServer
    I had to set the codebas for my rmi stuff to work no matter how much I messed with the classpath.
    Hope this helps,
    Will

  • Questions about your new HP Products? HP Expert Day: January 14th, 2015

    Thank you for coming to Expert Day! The event has now concluded.
    To find out about future events, please visit this page.
    On behalf of the Experts, I would like to thank you for coming to the Forum to connect with us.  We hope you will return to the boards to share your experiences, both good and bad.
     We will be holding more of these Expert Days on different topics in the months to come.  We hope to see you then!
     If you still have questions to ask, feel free to post them on the Forum – we always have experts online to help you out.
    So, what is HP Expert Day?
    Expert Day is an online event when HP employees join our Support Forums to answer questions about your HP products. And it’s FREE.
    Ok, how do I get started?
    It’s easy. Come out to the HP Support Forums, post your question, and wait for a response! We’ll have experts online covering our Notebook boards, Desktop boards, Tablet boards, and Printer and all-in-one boards.
    We’ll also be covering the commercial products on the HP Enterprise Business Community. We’ll have experts online covering select boards on the Printing and Digital Imaging and Desktops and Workstations categories.
    What if I need more information?
    For more information and a complete schedule of previous events, check out this post on the forums.
    Is Expert Day an English-only event?
    No. This time we’ll have experts and volunteers online across the globe, answering questions on the English, Simplified Chinese, and Korean forums. Here’s the information:
    Enterprise Business Forum: January 14th 7:00am to 12:00pm and 6:00pm to 11:00pm Pacific Time
    Korean Forum: January 15th 10am to 6pm Korea Time
    Simplified Chinese Forum: January 15th 10am to 6pm China Time
    Looking forward to seeing you on January 14th!
    I am an HP employee.

    My HP, purchased in June 2012, died on Saturday.  I was working in recently installed Photoshop, walked away from my computer to answer the phone and when I came back the screen was blank.  When I turned it on, I got a Windows Error Recovery message.  The computer was locked and wouldn't let me move the arrow keys up or down and hitting f8 didn't do anything. 
    I'm not happy with HP.  Any suggestions?

  • Have questions about your Creative Cloud or Subscription Membership?

    You can find answers to several questions regarding membership to our subscription services.  Please see Membership troubleshooting | Creative Cloud - http://helpx.adobe.com/x-productkb/policy-pricing/membership-subscription-troubleshooting- creative-cloud.html for additional information.  You can find information on such topics as:
    I need help completeing my new purchase or upgrade.
    I want to change the credit card on my account.
    I have a question about my membership price or statement charges.
    I want to change my membership: upgrade, renew, or restart.
    I want to cancel my membership.
    How do I access my account information or change update notifications?

    Branching to new discussion.
    Christym16625842 you are welcome to utilize the process listed in Creative Cloud Help | Install, update, or uninstall apps to install and evaluate the applications included with a Creative Cloud Membership.  The software is fully supported on recent Mac computers.  You can find the system requirements for the Creative Cloud at System requirements | Creative Cloud.

Maybe you are looking for