A general design question using servlets

Hello all,
          We have 2 WebLogic app./web servers. Lets call the first one Server A and
          the other Server B. Server A shows a web page to the client/browser and that
          has links to Server B. Now there is some authentication information that
          needs to be passed to Server B too. We were thinking of embedding that
          information in the web page itself. So a link on a page served by Server A
          could look like:
          Login to Server B
          Now the issue with such a solution is that the login token is exposed to the
          browser and the client. This would lead to the token being copied and pasted
          for replay attacks on Server B. I was thinking of better ways to solve this
          issue. PLease let me know if you have faced such issues earlier and a better
          solution using Servlets/JSP etc..
          Thanks.
          

          Either use a cookie by setting its domain name your two servers share, or add very
          short timeout. In later case, you generate the token with very short timeout in
          one server, use redirect to send the request to the second server, then use the
          session objects in both servers to indicate the user login. When you logout, you
          need kill the session objects on both servers.
          "Gaurav Khanna" <[email protected]> wrote:
          >Hello all,
          >
          >We have 2 WebLogic app./web servers. Lets call the first one Server A
          >and
          >the other Server B. Server A shows a web page to the client/browser and
          >that
          >has links to Server B. Now there is some authentication information that
          >needs to be passed to Server B too. We were thinking of embedding that
          >information in the web page itself. So a link on a page served by Server
          >A
          >could look like:
          >Login to Server
          >B
          >
          >Now the issue with such a solution is that the login token is exposed
          >to the
          >browser and the client. This would lead to the token being copied and
          >pasted
          >for replay attacks on Server B. I was thinking of better ways to solve
          >this
          >issue. PLease let me know if you have faced such issues earlier and a
          >better
          >solution using Servlets/JSP etc..
          >
          >
          >Thanks.
          >
          >
          

Similar Messages

  • General Design Questions

    Hello,
    I am developing a web application and could use some architectural advice. I've done lots of reading already, but could use some direction from those who have more experience in multi-tier development and administration than I. You'll find my proposed solution listed below and then I have some questions at the bottom. I think my architecture is fairly standard and simple to understand--I probably wrote more than necessary for you to understand it. I'd really appreciate some feedback and practical insights. Here is a description of the system:
    Presentation Layer
    So far, the presentation tier consists of an Apache Tomcat Server to run Servlets and generate one HTML page. The HTML page contains an embedded MDI style Applet with inner frames, etc.; hence, the solution is Applet-centric rather than HTML-centric. The low volume of HTML is why I decided against JSPs for now.
    Business Tier
    I am planning to use the J2EE 1.4 Application Server that is included with the J2EE distribution. All database transactions would be handled by Entity Beans and for computations I'll use Session Beans. The most resource intensive computational process will be a linear optimization program that can compute large matrices.
    Enterprise Tier
    I?ll probably use MySql, although we have an Oracle 8 database at our disposal. Disadvantage of MySql is that it won't have triggers until next release, but maybe I can find a work-around for now. Advantage is that an eventual migration to Linux will be easier on the wallet.
    Additional Information
    We plan to use the system within our company at first, with probably about 5 or less simultaneous users. Our field engineer will also have access from his laptop. That means he'll download the Applet-embedded HTML page from our server via the Internet. Once loaded, all navigation will be Applet-centered. Data transfer from the Applet to Servlet will be via standard HTTP.
    Eventually we would like to give access of our system to a client firm. In other words, we would be acting as an application service provider and they would access our application via the Internet. The Applet-embedded HTML page would load onto their system. The volume would be low--5 simultaneous users max. All users are well-defined in advance. Again, low volume HTML generation--Applet-centric.
    My Questions
    1). Is the J2EE 1.4 Application Server a good production solution for the conditions that I described above? Or is it better to invest in a commercial product like Sun Java System Application Server 7 ? Or should I forget the application server concept completely?
    2). If I use the J2EE Application Server, is this a good platform for running computational programs (via Session Beans)? Or is it too slow for that? How would it compare with using a standalone Java application--perhaps accessed from the Servlet via RMI? I guess using JNI with C++ in a standalone application would be the fastest, though a bit more complex to develop. I know it is a difficult question, but what is the most practical solution that strikes a balance between ease-of-programming and speed?
    3). Can the J2EE 1.4 Application Server be used for running the presentation tier (Servlets and HTML) internally on our intranet? According to my testing, it seems to work, but is it a practical solution to use it this way?
    4). I am running Tomcat between our inner and outer firewalls. The database would of course be completely inside both firewalls. Should the J2EE (or other) Application Server also be in the so-called 'dmz' with Tomcat? Should it be on the same physical server machine as Tomcat?
    5). Can Tomcat be used externally without the Apache Web Server? Remember, our solution is based on Servlets and a single Applet-embedded HTML page, so high volume HTML generation isn't necessary. Are there any pros/cons or security issues with running a standalone Tomcat?
    So far I've got Tomcat and the J2EE Application Server running and have tested my small Servlet /Applet test solution on both. Both servers work fine, although I haven't tested any Enterprise Beans on the application server yet. I'd really appreciate if anyone more experienced than I can comment on my design, answer some of my questions, and/or give me some advice or insights before I start full-scale development. Thanks for your help,
    Regards,
    Itchy

    I can give my opinion on some of these questions and a resource for the others.
    <question>
    1). Is the J2EE 1.4 Application Server a good production solution for the conditions that I described
    Or is it better to invest in a commercial product like Sun Java System Application Server 7 ? Or should I forget the application server concept completely?
    </question>
    Yes, the J2EE 1.4 app server is a good solution for these conditions. Specifically, I would use SJSAS PE 8.0 version or the J2EE SDK. They are free version that will meet your needs. You get the latest J2EE 1.4 platform features. As your needs grow you can transition to an enterprise version of the appserver (SE/EE). If you choose to go commercial please note that SJSAS 7.0 is a J2EE 1.3 platform.
    <question>
    2). If I use the J2EE Application Server, is this a good platform for running computational programs (via Session Beans)? Or is it too slow for that? How would it compare with using a standalone Java application--perhaps accessed from the Servlet via RMI? I guess using JNI with C++ in a standalone application would be the fastest, though a bit more complex to develop. I know it is a difficult question, but
    what is the most practical solution that strikes a balance between ease-of-programming and speed?
    </question>
    I guess you will not know for sure unless you perform some bench mark tests. But my opinion is the ease of development features you gain by using an app server far out weigh any performance increases you may get using a native soluton. Also, it is not clear that a native solution would actually be faster, with the latest JIT compilers Java performance is comparable to C++, your milage may vary depending on your application.
    <question>
    3). Can the J2EE 1.4 Application Server be used for running the presentation tier (Servlets and HTML) internally on our intranet? According to my testing, it seems to work, but is it a practical solution to use it this way?
    </question>
    Yes I would use the app server for both your presentation tier and business tier.
    As for the other issues you may want to look at the Java Enterprise Blue Prints located at: http://java.sun.com/j2ee/1.4/download.html#blueprints

  • Website design question using DW MX

    Hello,
    Relative rookie here looking for some info. Will dreamweaver
    Mx allow me to build a site such as www.ada.net ?
    Also and more importantly are there any good site for
    templates? I am basically try to build the site listed above of
    course using different names, colors and products.
    Thank you,
    Tyler

    The real question is "will your skill with HTML and CSS allow
    you to use DMX
    to build a site like that"? An inexperienced user using DMX
    can only build
    sites that would look like they were built by an
    inexperienced user, doncha
    know? But - can DMX allow you to build a site like that?
    Certainly.
    Good sites for templates? Try Google.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Europeancardriver" <[email protected]>
    wrote in message
    news:gh1tdi$lea$[email protected]..
    > Hello,
    >
    > Relative rookie here looking for some info. Will
    dreamweaver Mx allow me
    > to
    > build a site such as www.ada.net ?
    >
    > Also and more importantly are there any good site for
    templates? I am
    > basically try to build the site listed above of course
    using different
    > names,
    > colors and products.
    >
    > Thank you,
    >
    > Tyler
    >

  • System Design Question using BPEL

    Our group is currently in the early design phases of a new order extraction and billing process. What we would like to do is to an extraction of order data occur at a time specified on an Extraction Profile (which is defined by the users in a template - the profiles are built at midnight for the next day) Is there any way to have BPEL use these times (defined in the table) as the start point of when to begin the processing? The extractions are mutliple times each day and could be different day to day. We would like to have BPEL orchestrate the processes involved.

    I guess polling is a option you can try.
    You can write a polling process in BPEL to act as triggering point form the table.
    Perform logical compare for the times and terminate the poller if the time does not match.
    If the time match then start the business process and this could act as the triggering point to run the business process.
    You might like to perform a logical delete using a status flag in the table.
    If you do not like to touch the original table, you could create a dummy table to hold the bits that could be joined with the original table for the polling.
    Polling interval could be set based on how much diff you could allow from the scheduled time for triggering the process.
    Every Little Helps
    Kalidass Mookkaiah
    http://oraclebpelindepth.blogspot.com/

  • Design question -using struts

    have String array's which have values in them.
    dbValues[]
    newValues[]
    Have an object Customer which is the row obj in a table in jsp page. This row obj basically has
    dbValues[0] , newValues[0] ...... etc.
    In Prepare Action.
    Creating the list of Customer obj's that is put in the form-bean.
    struts-config.
    <form-bean name="Form" type="org.apache.struts.validator.DynaValidatorForm" dynamic="true">
    <form-property name="custs" type="java.util.ArrayList"/>
    </form-bean>
    jsp:
    the customers are shown in the jsp in a table.
    I have to check if it's new customer then have to ask user if they want to put dbValues in the newValues. If the user presses 'yes' then have to put the dbValues in newValues and then create the rowObjects(i.e Customer Objects) and display them in jsp.
    Not sure how to do this. Before asking the user if they want to replace newValues, the rowsObjects are created. somehow have to create new rowObjects again. Using LookupDispatchAction. when the user presses 'yes' how is the user values 'yes' will be passed as i am using LookupDispatchAction which method gets executed?
    How to do this? Thanks.

    I am giving how to work with LookDispatchAction.
    It gives the solution for ur problem.
    ->firtst it get the value from the button.
    -> That value is used to identify the key from the resource bundle.
    ->That key is used to get the method name from getKeyMethodMap()of
    lookdispatchaction.
    that's why we say that it looks in reverse manner.
    What I said above is theretical.
    From this u can understood how to do it.
    Cheers
    Sudha.

  • Design question about when to use inner classes for models

    This is a general design question about when to use inner classes or separate classes when dealing with table models and such. Typically I'd want to have everything related to a table within one classes, but looking at some tutorials that teach how to add a button to a table I'm finding that you have to implement quite a sophisticated tablemodel which, if nothing else, is somewhat unweildy to put as an inner class.
    The tutorial I'm following in particular is this one:
    http://www.devx.com/getHelpOn/10MinuteSolution/20425
    I was just wondering if somebody can give me their personal opinion as to when they would place that abstracttablemodel into a separate class and when they would just have it as an inner class. I guess re-usability is one consideration, but just wanted to get some good design suggestions.

    It's funny that you mention that because I was comparing how the example I linked to above creates a usable button in the table and how you implemented it in another thread where you used a ButtonColumn object. I was trying to compare both implementations, but being a newbie at this, they seemed entirely different from each other. The way I understand it with the example above is that it creates a TableRenderer which should be able to render any component object, then it sets the defaultRenderer to the default and JButton.Class' renderer to that custom renderer. I don't totally understand your design in the thread
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=680674
    quite yet, but it's implemented in quite a bit different way. Like I was saying the buttonClass that you created seem to be creating an object of which function I don't quite see. It looks more like a method, but I'm still trying to see how you did it, since it obviously worked.
    Man adding a button to a table is much more difficult than I imagined.
    Message was edited by:
    deadseasquirrels

  • Design question: Scheduling a Variable-timeslot Resource

    I originally posted this in general java programming, because this seemed like a more high-level design descussion. But now I see some class design questions. Please excuse me if this thread does not belong here (this is my first time using the forum, save answering a couple questions).
    Forum,
    I am having trouble determining a data structure and applicable algorithm (actually, even more general than the data structure -- the general design to use) for holding a modifiable (but more heavily read/queried than updated), variable-timeslot schedule for a given resource. Here's the situation:
    Let's, for explanation purposes, say we're scheduling a school. The school has many resources. A resource is anything that can be reserved for a given event: classroom, gym, basketball, teacher, janitor, etc.
    Ok, so maybe the school deal isn't the best example. Let's assume, for the sake of explanation, that classes can be any amount of time in length: 50 minutes, 127 minutes, 4 hours, 3 seconds, etc.
    Now, the school has a base operation schedule, e.g. they're open from 8am to 5pm MTWRF and 10am to 2pm on saturday and sunday. Events in the school can only occur during these times, obviously.
    Then, each resource has its own base operation schedule, e.g. the gym is open from noon to 5pm MTWRF and noon to 2pm on sat. and sun. The default base operation schedule for any resource is the school which "owns" the resource.
    But then there are exceptions to the base operation schedule. The school (and therefore all its resources) are closed on holidays. The gym is closed on the third friday of every month for maintenance, or something like that. There are also exceptions to the available schedule due to reservations. I've implemented reservations as exceptions with a different status code to simplify things a little bit: because the basic idea is that an exception is either an addition to or removal from the scheduleable times of that resource. Each exception (reservation, closed for maintenance, etc) can be an (effectively) unrestricted amount of time.
    Ok, enough set up. Somehow I need to be able to "flatten" all this information into a schedule that I can display to the user, query against, and update.
    The issue is complicated more by recurring events, but I think I have that handled already and can make a recurring event be transparent from the application point of view. I just need to figure out how to represent this.
    This is my current idea, and I don't like it at all:
    A TimeSlot object, holding a beginning date and ending date. A data structure that holds list of TimeSlot objects in order by date. I'd probably also hold an index of some sort that maps some constant span of time to a general area in the data structure where times around there can be found, so I avoid O(n) time searching for a given time to find whether or not it is open.
    I don't like this idea, because it requires me to call getBeginningDate() and getEndDate() for every single time slot I search.
    Anyone have any ideas?

    If I am correct, your requirement is to display a schedule, showing the occupancy of a resource (open/closed/used/free and other kind of information) on a time line.
    I do not say that your design is incorrect. What I state below is strictly my views and should be treated that way.
    I would not go by time-slot, instead, I would go by resource, for instance the gym, the class rooms (identified accordingly), the swimming pool etc. are all resources. Therefore (for the requirements you have specified), I would create a class, lets say "Resource" to represent all the resources. I would recommend two attributes at this stage ("name" & "identifier").
    The primary attribute of interest in this case would be a date (starting at 00:00hrs and ending at 24:00hrs.), a span of 24hrs broken to the smallest unit of a minute (seconds really are not very practical here).
    I would next encapsulate the availability factor, which represents the concept of availability in a class, for instance "AvailabilityStatus". The recommended attributes would be "date" and "status".
    You have mentioned different status, for instance, available, booked, closed, under-maintainance etc. Each of these is a category. Let us say, numbered from 0 to n (where n<128).
    The "date" attribute could be a java.util.Date object, representing a date. The "status", is byte array of 1440 elements (one element for each minute of the day). Each element of the byte array is populated by the number designation of the status (i.e, 0,1,2...n etc.), where the numbers represent the status of the minute.
    The "Resource" class would carry an attribute of "resourceStatus", an ordered vector of "ResourceStatus" objects.
    The object (all the objects) could be populated manually at any time, or the entire process could be automated (that is a separate area).
    The problem of representation is over. You could add any number of resources as well as any number of status categories.
    This is a simple solution, I do not address the issues of querying this information and rendering the actual schedule, which I believe is straight forward enough.
    It is recognized that there are scope for optimizations/design rationalization here, however, this is a simple and effective enough solution.
    regards
    [email protected]

  • Design question: methods returning objects

    I have a general design question. When, in general (and why), should you have a method alter an object via it's methods but not return the object as opposed to doing the same operation in a method and then return it.
    Consider the two below methods which do basically the same thing. When is one desireable over the other, and why?
    Cheers--
    public void setMyIntField(SomeObject pObj){
    pObj.setSomeInt(5);
    public SomeObject setMyIntField(SomeObject pObj){
    pObj.setSomeInt(5);
    return pObj;
    }

    Let me give a better example:
    class FruitWorker{
      private void someMethod(){
        HashMap myCitrus = new HashMap();
        HashMap myTropicals = new Hashmap();
        // use my no return obj method
        addFruitProps1(myCitrus,
                       "tartnes",
                       new FruitProperty("very!" ));
        // use my return object method
        myTropicals =  addFruitProps2(myCitrus,
                                      "sweetness",
                                       new FruitProperty("little bit" ));
      }// end method
      private void addFruitProperties1(HashMap pFruitProps,
                                       String pProp
                                       FruitProperty pVal){
        pFruitProps.add( pProp,pVal);
      }// end method
      private HashMap addFruitProperties2(HashMap pFruitProps,
                                       String pProp
                                       FruitProperty pVal){
        pFruitProps.add( pProp,pVal);
        return pFruitProps;
      }// end method
    }// end class

  • Design questions on using JMX

    I have been reading about JMX and trying to understand it
    I have some specific design realted questions and wanted some opinions to validate my understanding
    Assume a simple j2ee application that exposes 2 webservices .
    I would like to find out how many times each service is called and the total number of success/faults/errors
    encountered for each service along with params like starttime etc
    From what I have understood , I will have to first create a Bean , say "StatsCollector"
    and then creae a StatsCollectorMBean interface.
    The StatsCollector will provide the methods to set/update the above values and those will also be exposed by the StatsCollectorMBean interface
    1) I have trouble understanding how to create and maintain the MBean Resource...
    Shouldnt there be always 1 instance of this resource ? ie shouldnt there be only one StatsCollector ?
    Most of the examples create a simple class "Hello implements HelloMBean" and that makes it a MBean
    but they create Hello hello = new Hello() and then register it with the MBean server
    What if we create multiple objects of Hello? Wouldnt that defeat the porpose of the MBean ?
    I think that we need to make sure that this resource is always created once only.
    Is that correct ?
    2) Is it the right practice to separate your MBean and your "managed" resource ?
    ie in the above case , should there be a Singleton StatsCollector POJO that stores the Appliction
    statistics and another StatsMBean that will be the MBean that will access the POJO ? This makes sure that your Resource does not have
    dependency management classes.
    3) How does the application update the values in the MBean ?
    In the above example , how do you update the success and failure counts in the MBean from the application ?
    Can I update the singleton StatsCollector directly or do I have to go through the MBean Server to update
    any value in the MBean ?
    If I update them directly , will they be "visible" thru the MBean server ?
    4) Assuming that the above app gets deployed in a appserver like WebSphere and in a Clustered environment ,
    how to ensure that statisitcs are collected for all the services on all servers cummulativly ?
    Is this something that the appserver should provide ? Do we register the MBean with the Appserver
    MBean server ?
    Any ideas/suggestions will be helpful !
    thanks
    Pat

    Hello pat,
    very interesting questions. You are covering the main JMX design questions there.
    You should have a look (if you not already did) to the JMX best practices : http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/best-practices.jsp
    This document summarize common JMX design patterns.
    Answers to your questions:
    1) The resources you want to manage/monitor are Web Services. The life cycle of these services is handled by the J2EE container itself. As you say, the tricky part is to link the WebService resource life cycle to the MBean resource
    The MBean leaves inside its own container, the MBeanServer.
    You should identify an initialization phase in which you create your MBeans and register them inside the MBeanServer once.
    In your case, you can go for a single collector that monitors the 2 Web Services or a collector per Web Service. It seems that you want to track each service independently. Having 2 MBeans should offer a more flexible solution.
    If you go for 1 MBean, you should name it "<your management domain>:type=StatsCollector". This name identify an MBean for which you have a single instance. Once the collector registered with this name, the MBeanServer will guarantee that no MBean with the same name can be registered.
    If you go for 2 MBeans, you should add the Web Service name to each MBean ObjectName. For example:
    MBean 1 : "<your management domain>:type=StatsCollector,name=MyWebService1"
    MBean 2 : "<your management domain>:type=StatsCollector,name=MyWebService2"
    Example of MBean creation and registration code :
    StatsCollector collector1 = new StatsCollector();
    ManagementFactory.getPlatformMBeanServer().registerMBean(collector1,
    new ObjectName("com.foo.bar:type=StatsCollector,name=WebService1");
    At this point you have an MBean registered inside the platform MBeanServer.
    2) A Standard MBean is formed of a java interface and a class. Generally the interface and the class are not separated. They could be but I don't see a strong reason in your case to have the POJO and interface not being the same object.
    3) You shouldn't expose the methods to set the values in your MBean interface. Only getters should be visible. It means that you will have to keep a direct reference to the collectors to update the statistics. During your initialization phase, you could use JNDI to register the collector instances. The WebServices will then use JNDI to retrieve the collectors.
    An example of a simplified StatsCollector class and StatsCollectorMBean interface
    public interface StatsCollectorMBean {
    public int getNumRequests();
    public class StatsCollector implements StatsCollectorMBean {
    private int numRequests.
    public int getNumRequests() {
    return average;
    public serviceCalled() {
    numRequests++;
    In the above example, serviceCalled is not part of the management interface and is called by the Web Service.
    4) Difficult question for which I can't provide you with a reply. JMX doesn't offer such cumulative service in a standard way. In some appserver (glassfish for instance), MBeans are cascaded inside the domain server. There is no cumulative representation offered, but you could implement your own by defining new MBeans linked to the StatsCollector ones.
    To conclude, Appservers are offering some "out of the box" management and monitoring features . For example glassfish relies on the AMX framework (that is JMX based) . AMX (https://glassfish.dev.java.net/javaee5/amx/) allows you to monitor and manage your services. A possible solution would be to rely on this infrastructure to build your own management and monitoring.
    Hope this help.
    Regards.
    Jean-Francois Denise

  • General JSP Questions

    Hi,
    I work at a marketing company and here we still use Classic ASP, and now we're starting to learn and implement JSP on our projects.
    We managed to get things working just like we do in ASP, however with just that I don't see any advantage at all, it's just that we currently are doing exactly the same thing we do with ASP, a form sends the user input to a code-page, we get all the parameters, insert/delete/update the DB, and return the user to another page. Everything's the same, except the language syntax that changed.
    So this is what I'd like to ask, what are some common "best practices" of using the JSP technology?
    As someone who's just started on JSP from ASP, what are the practical advantages?
    (One of the advantages - or actually the only one I can think that really saves some time are the Beans)
    Any sources/tutorials are welcome.
    Thanks,
    Daniel

    DanCoelho wrote:
    As someone who's just started on JSP from ASP, what are the practical advantages?
    (One of the advantages - or actually the only one I can think that really saves some time are the Beans)None. JSP on its own is pretty useless.
    The real power lies in the fact that you have a JVM available to you - in other words you can write and execute Java code. The trick is learning how to do this efficiently so that the web part isn't a bother, and that is where JSPs partly come into play.
    The simplest of the simplest form of Java web development that is at least somewhat of a clean design is to combine Servlet and JSP technology. Servlets are simple java classes that can serve HTTP requests - generally you will use them to handle the business logic side of a request. Database queries, complex calculations and any other kind of data manipulation is done at this point - generally you'll write specific classes to actually do all the work, and you use those classes in your servlets.
    What you do not want to do in Servlets is generate the view - the content sent back to the browser that the user will actually see. Generally this is HTML or XHTML content, but it could be something else entirely. JSPs, in combination with for example JSTL, are far better suited to fulfill this task. JSPs represent simple templates to massage data into page content, and the rule of thumb is that they are only correct when they contain absolutely no java code at all.
    So the general flow of this is:
    - user goes to your website or clicks on a link or a button. This will trigger a servlet.
    - the servlet handles all the business logic that is required
    - when the servlet is done, it forwards control to a JSP
    - the JSP generates the view, based on data that was generated in the servlet
    This may seem like a lot of work, but it really isn't once you get the hang of it. And there are still plenty of ways to make your life even easier still, using specific frameworks that exist such as Spring MVC or JavaServer faces.
    Whatever choices you make, there is one thing that is true for all of them: before you can do anything in the Java web development world, you'll need to know core Java. Intimately.

  • EvDRE: Design Questions

    A couple of "best practices" questions regarding for a simple EVDRE report.
    1. Whis is a better design for performance:
    A. Five single DREs on one worksheet, or
    B. One DRE on one worksheet that uses five pipes (|)?
    2. I have a 1x1 report where column IDs need to be dynamically updated and rows are static. Which is better:
    A. Use a dynamic EVDRE with column expansion for column IDs and data, or
    B. Use an EVEXP for the column IDs and a static EVDRE for the data.

    I'll answer your questions using your numbering after covering the basic difference betwee EVDRE & the legacy queries.
    EVDRE is superior for performance and scalability over other legacy query functions (EVGET,EVGTS,EVSEN,EVSND) for a number of reasons:
          - EVDRE executes as a single query.  Legacy functions execute as individual queries.  So, if you have a 10x10 data area you'll have 1 query
              to populate the cells wtih EVDRE and 100 queries to populate with the other functions.
          - EVDRE can query either the relational database or the OLAP cube depending on which is most efficent for the given request.
               The other functions can only access the OLAP database.
          - EVDRE is the only function that will be enhanced in future releases.  Others are only for backwards support.  This would include all supporting functions such as EVEXP,EVNXP, etc.
         - The EVDRE data range only contains values that get populated by the query versus actual functions so you have more flexibility if you need to put XLS functions within the range and also cannot run into issues if someone into the data cell.
    1. It depends on the query.  If you have various specific combinations of data that you're querying, you're generally better off to split them into separate EVDRE's.  For example, if you have two blocks of data: Actuals/ 2008, Budget/2007.  You're better off making these separate because of the query that would be formed.  If you do it as a single EVDRE,  your query would be selecting the categories Budget & Actual and the years 2007 & 2008.  this means you'd get Budget 2007 & 2008 and Acutal 2007 & 2008.  Then after all that data is returned the values for Actuals/2007 & Budget 2008 would be discarded.  But by breaking them into two EVDRE's (that would execute in series) you would only query the data you actuall want.  Separate example, you want Actuals 2007 & 2008 and Budget 2008.  You would want to have two EVDRE's in one of two (equally performing) setups: Actuals/2007 & 2008, Budget 2008 or Actuals & Budget/2008, Actuals 2007.  I would probably use the first just for clarity.
    2.  Use the EVDRE to perform the column expansion.  It is poor practic to mix EVDRE and the legacy functions.  You can get both performance issues and execution ordering issues if you mix them.

  • A general OOP question

    Hi
    I have a general OOP design question, and am wondering if someone could relate an answer to the following design?
    I have a class called MediaFolderImport(); - it's designed to build a window with various editing tools in it.
    Within it's constructor, I'm calling a bunch of functions to build the window...
       createTitle();
       createInstructions();
       createToolPanel();
       createDataGrid ();
       createOpen();
       createSave();
    In my document class, I instantiate it...
    public var File_Folder_Import:MediaFolderImport=new MediaFolderImport();
    and then...
    addChild(File_Folder_Import);
    Voila! - the window appears. I WAS very proud of myself.
    Now I want to access something inside the window.  Specifically, there's a radio button that was created in createToolPanel(); - I want to update it to be selected or not selected when I receieve the user's preference from an xml settings file at start up (xml is loaded into the doc class).
    General question:
    What is the best practice, smart way to have designed this?
    - call createToolPanel(); from the doc class instead of within MediaFolderImport();, and somehow (magically) have access to the radio button?
    - leave the design as is, but add some sort of listener within MediaFolderImport that listens for changes to the xml in the doc class, and updates accordingly?
    - do it the way I'm trying to, ie try to access the radio button directly from the doc class (which isn't working):
    File_Folder_Import.myRadioButton.selected = true;
    - a better way someone can briefly explain the concept of?
    Another way to explain my design is...
    - a bunch of different windows, each created by a different class
    - xml file loads preferences, which need to be applied to different tools (radio buttons, check boxes, text fields etc) in the different windows
    I read a lot of posts that talk about how public vars are mostly bad practice.  So if you are making your class vars private, what is the best way to do the kind of inter-class communicating I'm talking about here?
    I think someone throwing light on this will help me solidify my understanding of OOP.
    Thank you for your time and help.

    You're already very used to using properties for the built-in AS classes and that's the best practice means of configuring your class. It's a "state" that you want to simply expose. The get/set method moccamaximum mentioned is the ideal route.
    The main reason you want to use get/set functions is validation. You want your class to act properly if you send an invalid value. Especially if anyone else besides yourself is going to use the class. Plan for the worst.
    The general concept is, make a private variable for any 'state' you want to remember using an underscore in the variable name to easily identify it as a private var, then make get/set functions with the same name with any required validation without the underscore.
    e.g.
    package
         public class MyClass
              // property called 'mode' to track something with an int
               private var _mode:int = 0;
              public function MyClass() {} // empty constructor
              // get (type enforced)
              public function get mode():int { return mode; }
              // set, requiring a value
              public function set isChecked(modeVal:int):void
                   // if no value is sent, ignore
                   if (!modeVal) { return; }
                   _mode = modeVal;
    Your validation will go a long way to easily debugging your classes as they grow in size. Eventually they should throw exceptions and errors if they're not valid. Then you will be best practice. Do note that if your validation requires quite a bit of logic it's common to upgrade the property to a public method. get/set should be reserved for simple properties.

  • Upload an excel file using servlet

    want to upload an excel file read it and do some updates and then again build an excel sheet
    step 1: display an Excel sheet inside the browser
    step 2: edit the sheet
    step 3: send the sheet data to a Servlet to read it.
    i am using POI to read an excel file and use POIFS
    when i upload an excel file and get servletinputstream it gives the header+data+tailor
    stand alon i have done it but using servlet i failed
    can anybody give me an simple example to upload an excel file and shoe it
    plz help me

    Surprise! Look what the forum says...
    BEFORE YOU POST A TOPIC HERE: Please be sure your topic is related to features or functionality of this site. This forum is not for general technology questions. Not sure which forum to use? Try searching for your topic in the "Search Forums" element on the left panel.Please post your question on http://forum.java.sun.com/forum.jspa?forumID=33
    Do not reply here.

  • General dreamwevaer question

    hello dreamweavers.
    im a newbie going to use dreamweaver from next week and beyond,so id like to ask the following:
    should i design the website in photoshop and then import it into dreamwevaer,in order to code it?
    is dreamwevaer flexible in design point of view,or is it mostly getting finished designs such as headers,footers,flash banners,
    and then building up the site where things so and such.
    thank you.

    Hello Nancy.
    seems like an informative website,i can see it is easy to understand the
    basics.
    Στις 23 Μαρτίου 2012 4:29 π.μ., ο χρήστης Nancy O. <[email protected]>έγραψε:
       Re: general dreamwevaer question  created by Nancy O.<http://forums.adobe.com/people/Nancy+O.>in
    Dreamweaver - View the full discussion<http://forums.adobe.com/message/4283588#4283588

  • Architecture/Design Question with best practices ?

    Architecture/Design Question with best practices ?
    Should I have separate webserver, weblogic for application and for IAM ?
    If yes than how this both will communicate, for example should I have webgate at both the server which will communicate each other?
    Any reference which help in deciding how to design and if I have separate weblogic one for application and one for IAM than how session management will occur etc
    How is general design happens in IAM Project ?
    Help Appreciated.

    The standard answer: it depends!
    From a technical point of view, it sounds better to use the same "midleware infrastructure", BUT then the challenge is to find the lastest weblogic version that is certified by both the IAM applications and the enterprise applications. This will pull down the version of weblogic, since the IAM application stack is certified with older version of weblogic.
    From a security point of view (access, availability): do you have the same security policy for the enterprise applications and the IAM applications (component of your security architecture)?
    From a organisation point of view: who is the owner of weblogic, enterprise applications and IAM applications. In one of my customer, application and infrastructure/security are in to different departments. Having a common weblogic domain didn't feet in the organization.
    My short answer would be: keep it separated, this will save you a lot of technical and political challenges.
    Didier.

Maybe you are looking for