Help building an object, setting it in a session variable and casting

Hi all,
I have a problem that I hope you can help me with. The application I am working on has a simple MVC design architecture. The problem occurs when a request is made from the application to the controller servlet. The controller servlet looks at the request type and delegates the processing to the appropriate action and model classes. The model class returns an object of a specific class type that is put into the session variable. This session variable is then cast to the appropriate class type in the jsp that renders that class. The problem is that this particular class type has an array of another class type. The array is filled in the class constructor, but is null when returned to the controller.
At run time when accessing the array I get a NullPointerException error. I can't seem to figure this one out. Any help is greatly appreciated.
Here's the code:
Controller DoPost method. The 'Action' objects are defined and initialized in the init() method.
        public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException{
                try {
                        HttpSession session = request.getSession();
                        MemberProfileTbl memProf = (MemberProfileTbl)session.getAttribute("Member");
                        RequestDispatcher rd;
                        if (!validateUser(memProf, session)){
                                session.setAttribute("LoginStatus", "Session Expired");
                                rd = getServletContext().getRequestDispatcher("/LoginFail.jsp");
                                rd.forward(request, response);
                                return;
                        String act = getAction(request);
                        Action action = (Action)actions.get(act);
                        Object result = null;
                        try {
                                result = action.perform(request, memProf);
                        }catch (NullPointerException npx) {
                                npx.printStackTrace();
                        session.setAttribute("currObject", result);
                        rd = getServletContext().getRequestDispatcher("/test/MemberConsole.jsp");
                        rd.forward(request, response);
                catch (Exception ex){
                        ex.printStackTrace();
Action class:
        package accolo.actions;
        import javax.servlet.http.*;
        import accolo.model .*;
        import accolo.view.*;
        import accolo.db.MemberProfileTbl;
        public class ChangeMainView extends Action {
                public String getName() {return "changeMainView";}
                public Object perform(HttpServletRequest request, MemberProfileTbl memProf)
                        throws Exception, ClassNotFoundException, InstantiationException, IllegalAccessException{
                        Object result;
                        HMMainView hmMain = new HMMainView(memProf.email);
                       result = hmMain;
                       return result;
HMMainView.java class
public class HMMainView
        private HMMainViewJob[] jobs;
        public String test;
        public HMMainView(String email)
           HMJobsBean hmJobsBean = new HMJobsBean();
           JobTblDao jobTblDao = new JobTblDao();
           test = "test in constructor";
           try{
             JobTbl[]  hmJobs = jobTblDao.getHMOpenJobs(email);
             for(int j = 0; j < hmJobs.length; j++){
                        this.jobs[j].jobTitle = hmJobs[j].optionalTitle;
                        this.jobs[j].city = hmJobs[j].city;
                        this.jobs[j].state = hmJobsBean.getState(hmJobs[j].zipCode);
                        Hashtable counts = hmJobsBean.getJSCountsByStatus(hmJobs[j].jobId);
                        this.jobs[j].unranked = (String)counts.get("CANUNRANKED");
                        this.jobs[j].interviews = (String)counts.get("HMRI");
                        this.jobs[j].ranked = (String)counts.get("CANRANKED");
                        long closed = Long.parseLong((String)counts.get("HMRNI"));
                        closed += Long.parseLong((String)counts.get("HMCH"));
                        closed += Long.parseLong((String)counts.get("HMNH"));
                        this.jobs[j].closed = Long.toString(closed);
            }catch(Exception ex){
                ex.printStackTrace();
        public HMMainViewJob[] getJobs(){ return jobs; }
HMMainViewJob.java class
package accolo.model;
public class HMMainViewJob
        public long jobId;
        public String jobTitle;
        public String status_id;
        public String city;
        public String state;
        public String unranked;
        public String interviews;
        public String ranked;
        public String closed;
        public HMMainViewJob()
Snippet of JSP that uses the code
  Object result = session.getAttribute("currObject");
  if (result != null){
    String className = result.getClass().getName();
    if (className.equals("accolo.model.HMMainView")){
           header = "HM/HMConsoleHeader.jsp";
           subNav = "HM/HMConsoleSubNav.jsp";
           user = "HM/HMConsoleUser.jsp";
           left = "HM/HMConsoleLeft.jsp";
//           body = "HM/HMConsoleHome.jsp";
           HMMainView hmMain = (HMMainView) result;
           HMMainViewJob[] jobs = hmMain.getJobs();
          for (int i = 0; i < jobs.length; i++){
%>
                Jobs: <%=jobs.jobTitle%>
<%

I have not run this through a debugger yet. I don't have immediate access to a debugger to run it through, most of the development is simply done in vi. I was hoping any problem in the code would jump out at someone. I've been staring at it too long.
I'll try to get a debugger set up.
Thanks

Similar Messages

  • Can i store the Result set values as a Session variable

    hai,
    I want the result set values of a query to be used many times and I want the same resultset between different page calls.
    I want all those records fetched from the database to be available in the next page with out refetching from the database.
    can any one help me out. its very urgent.....
    Thanks and regards,
    Ravikiran
    mail to me at : [email protected]

    "can i store the Result set values as a Session variable "
    Practically Yes u can
    but u want be able to accesses it in other pages
    u can try it and see
    the other thing u can do is store the values from the resultset in a object say vector and put vector in seesion and u can use this any where
    for e.g
    Vector v=new Vector();
    While(rs.next())
    v.addElement(rs.getString(1));
    v.addElement(rs.getString(2));
    session.putValue("myVector",v);
    now where u want to get it do this
    Vector myvec=(Vector)session.getValue("myVector");
    do do futher

  • How to set report output to session variable

    Hi,
    Is there any way to set report output to session variable . If my report returns 1 row and 1 column.
    I have a dashboard prompt where i am selecting Name , but i want to find out the ID of that name .
    that ID i want to pass to a column Fx , to achieve this i created a intermediate report and i got the ID. Now my problem is how do i set this ID in session variable .
    Please help if anyone knows...

    Did you read this:
    how to set session / presentation variable in repository variable
    Dashboard prompt on Month Name but report filter on month ID:
    Re: Dashboard prompt on Month Name but report filter on month ID needed
    If you have dashboard prompt (name) then you may have only one report that is filtered by name but show id or not show id but use id in the function. Or two reports like in the solution in the second link above and the second report has id in the function and filter by id from the first report. You don't need to set this ID in session variable for this example.
    Please close your previous threads if they are answered.
    Regards
    Goran
    http://108obiee.blogspot.com

  • Need help in restriction when Char is used as a variable and still need to

    hi masters,
          As far as i know we cant restrict on the char if it is used as a variable.. But here is the scenario..the version is 3.1C and i need to restrict based on the plant l and they need plant as a variable but still need to restrict by values (2456, 5060). so is there any operation that we can go ahead and restrict the char in the query using the same as a variable..As far as i know its not possible..but please help me if any one have other steps...thanks in advance

    Hi Neel,
             Well, here is the descr... I need to restrict on those two plants ( 2456, 5060) and i dont want to see the data of these two plants completely under 0Plant char. But there is a variable and according to the req the variable should be there and these 2 plants data shouldnt be displayed in the report.. and when i try to restrict and exclude the above two plants i am getting this below error...
    Variable '0S_PLANT' is complex('selection Option' and 'query' type). You can not use any other enties in this selection..
    So my req is there is a variable on 0plant and i need to restrict and exclude the values (2456,5060) and the data shouldnt be visible for these 2 plants.. i tried and i couldnt restrict as of the error when the variable is there...Can any one please help me out this...

  • Help building an e-commerce site using DreamWeaver MX 2004 and Oracle 10G

    I'm new to using Oracle 10G. After reviewing several rdms's I've picked Oracle 10G as my rdms. I'm trying to build an ecommerce site using DreamWeaver MX 2004 and Oracle 10G. The website will be selling hardware and software products. I have a choice in DreamWeaver to go for a .asp or .jsp setup. I have several questions, here goes:
    1. Is there any book/tutorial/whitepaper out there that describes building an ecommerce site using Oracle 10G/9I/8I? Just some examples as how to make the datamodel regarding the shopping basket etc.
    2. I prefer DreamWeaver as it let's me make nice looking css style based pages without throttling too much through the code. Are there Oracle tools which allow me to make an advanced nice looking ecommerce site?
    I hope some of you can help me get started. Any effort is appreciated.
    Cheers

    I'm new to using Oracle 10G. After reviewing several rdms's I've picked Oracle 10G as my rdms. I'm trying to build an ecommerce site using DreamWeaver MX 2004 and Oracle 10G. The website will be selling hardware and software products. I have a choice in DreamWeaver to go for a .asp or .jsp setup. I have several questions, here goes:
    1. Is there any book/tutorial/whitepaper out there that describes building an ecommerce site using Oracle 10G/9I/8I? Just some examples as how to make the datamodel regarding the shopping basket etc.
    2. I prefer DreamWeaver as it let's me make nice looking css style based pages without throttling too much through the code. Are there Oracle tools which allow me to make an advanced nice looking ecommerce site?
    I hope some of you can help me get started. Any effort is appreciated.
    Cheers

  • Plsss help me: how to set default values in html:file and html:radio

    Hai,
    To set default value to text box i use the following code. It works well.
    <html:text property="modifyserverdesc" value="<%= serverDesc%>" styleClass="text" size="38"/>But for file i use the code
    <html:file styleClass="file" property="modifyserverimgfile" value="<%= serverImage%>" size="40"/>It doesn't display value. What is problem here?
    how to set default selection in <html:radio>.

    No it won't help.
    You can't set a value into an <input type="file"> control at all. The user has to put values in themselves.
    The reason behind this is security. If the programmer could put any value they liked in there, you could upload any file at all from a users computer without their intervention. eg C:\windows\system32\passwords.txt
    Bottom line: you can't put a default value into the input type="file" control.
    And a good thing too ;-)

  • HT1277 Hi there,  From time to time all inbox messages just disappear.  Just then they disappeared when I  clicked on " get mail".  Yesterday they js=ust vanished?  Please help.  I have set up as Imap on laptop and iphone.

    HI,
    I have just set up mail and every now and then the entire inbox just vanishes.   This has happened 3 times in 2 days???  Any thoughts? 

    Mac HD says 2.49.72GB and 151.88 used??
    That's impossible. I think you mean to say that your HD capacity is 249.72 GB, and you've used 151.88 GB. You do have enough free space, so that means something else is going on to cause this problem.
    Aside from setting up the Gmail account(s), did you install or update anything just prior to this problem starting? If so, what were those items?
    I didn't mention any extension, so I'm assuming you're referring to seventy one's mention of TM (Time Machine). That is a built-in backup method that you can choose to take advantage of, but I would not do it, since it's not all it's cracked up to be. What you need is to setup and maintain every day a bootable backup of your entire hard drive. You can do that with SuperDuper or Carbon Copy Cloner. You don't need an Airport device for these, nor Time Machine; in fact, I would shy away from using wireless for such things, as it's often more of a problem than a benefit.
    Also, there may be problems with your hard drive, so I would boot your Mac from the install disc, choose your language, then wait about 15 seconds for the menu bar at the top to appear and choose Utilities->Disk Utility and Repair Disk. If it comes back with any errors that can't be fixed, post them in your reply. But if not, then run Repair Permissions, and all you need to concern yourself with is the message at the end that 'Permission repair completed'; ignore anything else as long as you see that message.
    Then reboot your system and restart Mail and setup your account(s) again (assuming it's not there because you deleted the IMAP mail folder and the Envelope Index file. In the future, don't throw things away unless you know the consequences of doing so; you'll end up being unfortunately surprised when you lose critical information.

  • High number of "The connection has timed out" errors. Where do I set the time out period (variable and file name) - windows 7

    I usually use a wireless network at home and have very few time out problems with Firefox.
    I am travelling and using Optus Wireless broadband where the average ping to a site is 700+ms .
    I suspect that this is the cause of the high number of timeouts I am experiencing.
    Optus say there are no problems so I think I will have to set the timeout to a longer period.
    Please advise what variable name/s (and in which file) the timeout is set for LOADING PAGES.
    Thanks in anticipation.
    Greg Atkinson.
    By the way the same is happening in IE8
    and on many sites other than the Yahoo one below.
    ================Full Error Page ==============
    URL is http://au.mg4.mail.yahoo.com/dc/launch?.gx=1&.rand=81jkv757qfdqt
    =========================================
    The connection has timed out
    The server at au.mg4.mail.yahoo.com is taking too long to respond.
    * The site could be temporarily unavailable or too busy. Try again in a few moments.
    * If you are unable to load any pages, check your computer's network connection.
    * If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

    Having the same problem 4 out of 5 times I try to navigate to a new site I get the error "connection has timed out".
    My I phone works fine on the same wireless connection so it must be something to do with the computer. The problem occurs on IE, firefox, and google chrome.
    I too would like to know how to how to either fix this problem or failing that to extend the length of time before the connection times out (which is currently only about 5 seconds).
    Please help!
    Thanks in advance

  • Help Needed in checking session variable

    In a sample site, I am calling a bounded task flow from an unbounded task flow. In the called taskflow the default activity is a router which checks the session variable, and the home page will be loaded only if the session variable is not null. If session variable is null router will lead to a page dispalying 'session expired'. But even after clearing the session if I copy pasted the previous url, the home page is loading. But when I call bounded taskflow from a bounded taskflow, it is working fine. Can anyone suggest any solution? Thanks in advance

    Thanks for the reply. I'm using jdev 11.1.1.5.0.. I'm just trying with a sample example. I have a login page and when the user logins, the user name is stored in session. the loginpage view activity is in adfc config unbounded taskflow. The login credentials is validated in a backing bean and based on the return value, if the login is valid, a bounded taskflow 'hometaskflow' is called. In this bounded taskflow, the default activity is a router wchich checks the username stored in session. If the username is not null it will lead to the 'homepage' view. Else if it is null it will lead to a 'sessionexpired' view.
    In the java class of login page I'm accessing the session variable as shown
    public Username getSessionBean()
    Username username =
    (Username)resolveExpression("#{Username}");
    return username;
    public static Object resolveExpression(String expression)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Application app = facesContext.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesContext.getELContext();
    ValueExpression valueExp =
    elFactory.createValueExpression(elContext, expression,
    Object.class);
    return valueExp.getValue(elContext);
    On login button click the function being executed is as shown
    public String onLoginClick() {
    if(String.valueOf(itUserName.getValue()).equals("admin")
    && String.valueOf(itPassword.getValue()).equals("admin"))
    Username username=getSessionBean();
    username.setUsername(itUserName.getValue().toString());
    return "success";
    else {
    return "invalid";
    And to set username as null on logout, I used this function on logout click
    public void clearSession()
    Username username=getSessionBean();
    username.setUsername(null);
    The EL expression used to check the value of session variable is
    #{sessionScope.Username.username==null} outcome is expired
    #{sessionScope.Username.username!=null} outcome is active
    This worked when I used in a bounded taskflow, which is being called from another bounded taskflow. But not working in this scenario...

  • Setting up the class root directory and choosing class files.

    I made a simple test application as it is proposed at the J2EE 1.4 Tutorial and all worked.
    (Chapter 24 Getting started with Enterprise Beans)
    Than I deleted the ear file to try out the deploy mechanism again.
    And after generating the new application with File-> New application which worked well I also
    tried to use the EJB Wizard feature of the J2EE deployment tool. After I had selected the appropriate EJB classes to add to my jar, I clicked NEXT and I got the following message:
    The class (converter.Converter) could not be loaded:
    Please consult online help for assistance in setting up the class root directory and choosing class files.
    The online helps isnt very usefull for this type of problem.
    Do you have a hint what to do ?

    Hi san-deepu,
    I couldn't reproduce the error you are having when I followed Ch. 24 tutorial in packaging the ear. Is there anymore information in deploytool's logfile? This is in <user_home>/.deploytool/logfile, or you can run in verbose mode: <as_install>/bin/deploytool -v
    When you say you deleted the ear file, did you also close the ear file in deploytool first? You may also want to exit deploytool () , and try deleting the temporary files. Deploytool usually cleans up the temp files automatically upon exit - maybe there are some left behind that it couldn't delete. On windows the temporary files are located by default in C:\Documents and Settings\Administrator\Local Settings\Temp\sun-dt-Administrator. In deploytool go to Edit --> Preferences --> General to find what the temporary directory is set to.
    Which version of the appserver are you using? jdk version? operating system?
    J

  • Help with session variable please - CS5.5 PHP

    Hi all,
    I am needing a little assistance with using a session variable and hope that someone may point me in the right direction.
    I have created a PHP page that uses the Dreamweaver 'User Authentication' feature, and the basics of this works fine, directing a user to the correct pages depending on whether they are or are not a valid user. I would like however to personalise the 'valid user' page with the persons Username as entered in the User Authentication table....a seemingly simple task using a session variable, but one that I just don't seem to be able to get working!
    The code generated for the UA on page 1 is as follows:
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['txtfirst_name'])) {
      $loginUsername=$_POST['txtfirst_name'];
      $password=$_POST['txtsurname'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "member_update.php";
      $MM_redirectLoginFailed = "login.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_panto, $panto);
      $LoginRS__query=sprintf("SELECT firstname, surname FROM web_access WHERE firstname=%s AND surname=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $panto) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
        if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
        //declare two session variables and assign them
       $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;         
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];   
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    Firstly, the text highlighted in red above appears to be setting the session variable that I require. Is This correct?
    If so, what is the code that I need to place in page 2 to use that session variable? or
    Do I need to do something else on page 1 to properly assign the session variable?
    Would really appreciate your expertise
    Mark

    It looks as though you've set the columns incorrectly in the User Authentication server behavior. This is the SQL query that checks the user's credentials:
      $LoginRS__query=sprintf("SELECT firstname, surname FROM web_access WHERE firstname=%s AND surname=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
    You're looking for firstname and surname, whereas you should be looking for the user's login name and password.
    $_SESSION['MM_Username'] is a session variable that stores the user's login name. To use it in a subsequent page, all that's needed is for the page to begin with session_start(). You can then echo the value to display it.
    If you want to display the person's real name, you need to create a recordset in the second page using $_SESSION['MM_Username'] to find the firstname and surname. Alternatively, you can edit the existing code like this (I've copied only part of it):
      $LoginRS__query=sprintf("SELECT firstname, surname FROM web_access WHERE firstname=%s AND password=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $panto) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
        $row = mysql_fetch_assoc($LoginRS);
         $_SESSION['full_name'] = $row['firstname'] . ' ' . $row['surname'];
        if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
        //declare two session variables and assign them
       $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;
    You can then use $_SESSION['full_name'] in a subsequent page that begins with session_start().

  • Login session variable - pls help before i slot myself

    im brand new to this guys and really struggling with logging
    in a member to their particular account as opposed to a general
    members section using dreamweavers login application and some basic
    php coding.
    i just cant seem to figure it out it (im stuck on the session
    variables i think..) and unfortunately my php is very poor at them
    moment!
    pls HELP!!
    below is the dreamweaver generated code from its basic login
    application.
    im using it in a dreamweaver template so im not sure if thats
    the issue but bascially im using 2 SQL tables i constructed to
    achieve this-
    1.) tblaccesslevel
    intLevelID (unsigned + auto increment + primary key)
    txtAccess
    (ive allocated various numerical access levels into
    txtAccess. ie. 1-7
    and
    2.) tblplayeraccount
    intUserID (unsigned + auto increment + primary key)
    txtFirstName
    txtLastName
    txtEmailAddress
    txtPassword
    intAccessLevel
    (ive generated 2 users in the above table tp test)
    in dreameavers server behaviors the recordset generated by
    the login server behavior simply says Log In User
    obviously i need a session variable somewhere to get the
    intUserId....
    also a relationship needs to be generated in the sql
    statement to connect the intAccessLevel but i think i can manage
    that (i think..)
    below is the code this application generated -
    if someone can give me some hints or if they've done
    something similiar pls provide the required code ...it would be a
    huge help!! i dont know what im doing wrong!!!
    <?php require_once('../Connections/Rugby.php'); ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
    session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
    $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['emailaddress'])) {
    $loginUsername=$_POST['emailaddress'];
    $password=$_POST['password'];
    $MM_fldUserAuthorization = "intAccessLevel";
    $MM_redirectLoginSuccess = "../player_home.php";
    $MM_redirectLoginFailed = "../failed.php";
    $MM_redirecttoReferrer = false;
    mysql_select_db($database_Rugby, $Rugby);
    $LoginRS__query=sprintf("SELECT txtEmailAddress, txtPassword,
    intAccessLevel FROM tblplayeraccount WHERE txtEmailAddress='%s' AND
    txtPassword='%s'",
    get_magic_quotes_gpc() ? $loginUsername :
    addslashes($loginUsername), get_magic_quotes_gpc() ? $password :
    addslashes($password));
    $LoginRS = mysql_query($LoginRS__query, $Rugby) or
    die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
    $loginStrGroup = mysql_result($LoginRS,0,'intAccessLevel');
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;
    if (isset($_SESSION['PrevUrl']) && false) {
    $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    header("Location: " . $MM_redirectLoginSuccess );
    else {
    header("Location: ". $MM_redirectLoginFailed );
    ?>

    Are you wanting to redirect them to a specific page based on
    their username or to the same page with dynamic content based on
    their username?

  • Can I set session variables from inside my Javascript?

    hi all,
    i want to set a couple of session variable while i am inside my javascript.
    can I do that?
    m_asu

    No. JavaScript runs on the client and the session is on the server. You can use JavaScript to set parameters that get passed back in the request and can then be put in the session.

  • Application.cfm - Should I use queries or set session variables?

    Hi,
    I have an application that has many users for many different
    companies logged in at the same time using the system. I use the
    application.cfm to call and set a bunch of variables that make the
    system work, such as preferences and things. Would it be better to
    use 5 or 6 queries all pulling one record, or call the queries only
    once at the start of the session and set 30 to 50 session variables
    based on the query results? Which method would bog the system down
    less? It seems that session variables use quite a bit of memory.
    I'm just trying to get the "simple answer" for this, if that's even
    possible.
    Please let me know your thoughts and experience on this.
    Thanks much,
    Jeff W!

    In order to give you a simple "do it this way" answer, more
    information is needed.
    How long does it take to run those 5-6 queries on each
    request? How many users are logged in at peak times? How much data
    would you be storing in the session for each user? How much RAM do
    you have on your server?
    On one application, we've decided to go the session variable
    route. The size for each users' session maxes out at 2.5 KB. We
    have 512 MB dedicated to CF, but can easily scale up on the
    hardware we have to 1.5 GB or more. At 512 MB, 2.5 KB per user
    session, we can handle a little over 200,000 concurrent users
    (assuming all CF memory could be utilized for session variables,
    which isn't true). There are only 6,000 users total in our system,
    so we have quite a bit of headroom.
    Are you on CF8? If so, open up the server monitor, start
    monitoring, profiling, and memory tracking, and log in with a
    couple users (with your code setup to store all that info in the
    session). See how much storage each session takes. Then look at
    your server. How much RAM do you have? what do you currently have
    allocated to ColdFusion? What's your peak concurrent user level? Do
    you have headroom? Also, see if the benefits of storing it in the
    session are even worth it (how long do those 5-6 queries add to
    each requst?)

  • Setting & Retrieving Session Variables

    Hi,
    I’m new at session variables and having trouble
    understanding the basics.
    I have a form with two dropdowns. I want to store the
    selections from both in session variables. Then pass those to
    another page where I want to display the selected values in my
    headline such as “You searched for [value1] and [value2]." I
    can’t get this to work right. I’ve gone through DW Help
    and tutorials and still can’t figure it out.
    Any help would be much appreciated.
    DW CS3, ASP and Access
    Thanks,

    > I?m new at session variables and having trouble
    understanding the basics.
    >
    > I have a form with two dropdowns. I want to store the
    selections from both
    > in
    > session variables. Then pass those to another page where
    I want to display
    > the
    > selected values in my headline such as ?You searched for
    [value1] and
    > [value2]." I can?t get this to work right. I?ve gone
    through DW Help and
    > tutorials and still can?t figure it out.
    >
    > Any help would be much appreciated.
    >
    > DW CS3, ASP and Access
    On your form action page, put this in:
    <%
    Session("varOne") = Request.Form("dropdown1")
    Session("varTwo") = Request.Form("dropdown2")
    %>
    To write the sessions to the page, put this:
    You searched for <%=varOne%> and <%=varTwo%>.

Maybe you are looking for

  • I can't get back to my message list.

    I am new to Thunderbird. I was going through my message list. I would look at a message and delete it and would be returned to the message listing. Suddenly it won't take me back to the listing of my emails and I can't find a way to get back.

  • Advice from professionals to anm amatuer

    Hi everyone I hope you are all had a good Christmas and new years eve. So my profession is civil engineering (Highways, infrastructure, structures etc.) and not software engineering but I have spent years learning java in my own time and passed the S

  • Travel Request Status

    Hi Experts, Please let me know in which table travel request status is stored.settlemet status like "TO BE Settled" "Settled" Trvael stsus like "Request Recorded" "Request approved" "Trip approved" etc. Thanks and Regards Shilpashree Edited by: shilp

  • Database Location using Crystal Report XI

    Crystal Report XI Developers Edition; VB 6 Enterprise Edition Prior to using Crystal Reports, I will create (if not already there) a database in my Visual Basic project file. Via Crystal Report XI, when I designed reports, I used Database Location as

  • Help with slideshow please...

    I created a layer on my webpage and inserted an image. Then I went through all the motions to add more images by modify .. timeline..add keyframe and changing the source image. In all I have 8 pictures all added this way to different frames.... I set