Questions tagged [application-variables]

27 questions
67
votes
5 answers

Get ServletContext in JAX-RS resource

I'm playing around with JAX-RS, deploying on Tomcat. It's basically: @Path("/hello") @Produces({"text/plain"}) public class Hellohandler { @GET public String hello() { return "Hello World"; } } Is there any way I can get hold…
leeeroy
  • 10,518
  • 17
  • 48
  • 52
31
votes
10 answers

Set session variable in laravel

I would like to set a variable in the session using laravel this way Session::set('variableName')=$value; but the problem is that I don't know where to put this code, 'cause I would like to set it for one time (when the guest visite the home page…
5
votes
2 answers

Can ASP.NET session live longer than Application

This could be a silly/lame question, especially after working so long with ASP.NET :), but I need to be sure. Is it possible to have session (that is ASP.NET session) outlive the Application (app instance/app domain/Application variable)? In other…
3
votes
4 answers

How to reset an application variable daily

I am writing a program recording service calls and treatment done. We have a number of users who open and close calls and I want to show at all times the total number of calls opened today and the total number closed today and the difference between…
Dov Miller
  • 1,698
  • 4
  • 30
  • 43
2
votes
2 answers

efficiency of application variable?

I have a database from where i need to extract quite a lot of data. Now i get that data when required, i.e. I have made a class that handles database interactions and whenever an activity requires data it will call that class for the data. So at a…
user590849
  • 10,883
  • 25
  • 77
  • 121
2
votes
3 answers

Share an object application-wide in ASP.NET MVC3

I have an ASP.NET MVC3 web application with C# and Razor. Through a form in a View I get the Context.User.Identity.Name submitted to an action method in a Controller A. I would like to have available this variable application-wide (between multiple…
CiccioMiami
  • 7,439
  • 28
  • 82
  • 145
2
votes
2 answers

How to create Application variable in .Net Core 2.0?

I have created website using .Net Core 2.0. Now I want to store some values which are not user specific, I want to make those value shareable across all the users which are logged in. So for that I can use Application Variable. But in .Net Core 2.0…
prog1011
  • 3,157
  • 3
  • 20
  • 49
2
votes
2 answers

Classic ASP Application Variables Not Initialized

Forgive me if this is a dumb question, I'm new to ASP. I have a virtual Windows Server 2012 handling ASP pages, passing them to the host for testing purposes. There is a global.asa file which declares several Application-level variables, though it…
Doug
  • 287
  • 1
  • 9
  • 19
2
votes
2 answers

Updating Application variable at every midnight in classic ASP

I have a classic ASP application which has connection string stored as an application variable and are initialized in Application_OnStart() event. I want to change this connection string every midnight and have it point to other database. I thought…
Agent007
  • 2,596
  • 3
  • 17
  • 24
1
vote
5 answers

How can I avoid using SESSION variables in CFCs when these are used for DataSource and Database Schemas?

I'm trying to refactor all of my CFCs to avoid using SESSION and APPLICATION variables (not an easy task). However, in this application, SESSION variables are used in every database call, since different logged in users may be accessing different…
Eric Belair
  • 10,296
  • 13
  • 70
  • 107
1
vote
6 answers

PHP Caching without messing with file permissions (Also, How to emulate ASP Application variables in PHP)

I'm trying to implement some kind of caching in a PHP script that will go out to many different clients/sites, which will be deployed by fairly non-technical users, using a variety of web hosts. Due to the non-technical nature of the users, I'd…
Tristan Havelick
  • 58,645
  • 19
  • 52
  • 64
1
vote
2 answers

What is the equivalent of Page.Application (in .aspx.cs page) In MVC Controller

I am working on MVC web application, and I am using .Dlls. of some other project. That same .dll is also using in my another Web Application which is made in WebForms (.aspx) pages. Now my question is: some function from that .dll are accepting …
prog1011
  • 3,157
  • 3
  • 20
  • 49
1
vote
5 answers

Is storing List of 1000+ instance of my custom class in session a memory problem?

Is storing a list of 1000 instance of my custom class to the session variable a good approach ? My asp.net web app need multilingual support and i am storing the labels in a table.I will have multiple users who has their own language preference and…
Shyju
  • 197,032
  • 96
  • 389
  • 477
1
vote
0 answers

Why Would Application Variables Require Cookies at the Client Side?

I am updating a classic asp web application and looking at implementing application variables to save resources. in the MS documentation, it mentions that "Application and Session variables require that clients have cookies enabled"…
GWR
  • 1,516
  • 4
  • 20
  • 40
1
vote
1 answer

Classic ASP/ASP.NET Application Variables

We inherited a website that is ~40GB in size (mostly from user-submitted content) that has a mixture of classic ASP, inline .Net and and compiled .Net associated with it. There are technically two sites associated with this and to conserve disk…
Scott Salyer
  • 1,877
  • 6
  • 37
  • 74
1
2