context

jsf context creation

Hi folks, I'm here facing a problem with a Java web project. The project I'm working on has been made with standard jsp mixed up with jsf pages. The main page of the application, called main.jsp is a standard jsp page that needs to access a managed bean with session scope created within a servlet filter used to check the authentication o...

jsf sevlet-mapping for *.jsp

Is there a way I can tell my application to let every single page (let's say .jsp pages) to go under faces context? In my web.xml I easly can do a servlet-mapping similar to: <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Faces...

How to retrieve JSON via ASP.Net context.Request

var OrderInfo = { "ProductID": "ProductIDValue", "ProductName": "ProductName", "Quantity": 1, "Amount": 9999, "SLQuantity": 9999, "SLDate": "08/03/2010" }; var DTO = { 'OrderInfo': OrderInfo...

How to pass Object context to jQuery.ajax JSONP callback?

I run into problems to pass a javascript object context into the callback handler of a JSONP ajax request, when the ajax provider predefines its callback. (Flickr is the service provider). I'll give a simplified example: function Person(anId) { this.name; this.id = anId; var self = this; this.loadName = function() { $.ajax({ ...

The assembly with display name 'VJSharpCodeProvider' failed to load - Cloud App

Hi I have MVC 2 project which I need to deploy to the cloud. I have a cloud app which has a web role associated with this mvc project. When trying to start a new instance of the cloud project in the dev fabric, i get the following error: The assembly with display name 'VJSharpCodeProvider' failed to load in the 'LoadFrom' binding conte...

Access DBEntities in enhancement of partial EDMX class (.NET 4.0)

Building a little test application using ADO.NET Entity Framework, I've extended my auto-generated edmx data model classes. In particular, I've added a partial class to my Actors model Partial Public Class Actors Implements IEquatable(Of Actors) .... Public Sub refreshCountse() Dim q = (From p In Movies Where p.ac...

Importing module with context

I have a module named module.py, which checks a global variable in context. module.py: ---------- if 'FOO' in globals(): print 'FOO in globals' else: print 'nah' in python shell: ---------------- In [1]: FOO = True In [2]: import module nah how can i import modules with existing context? ...

how to get authenticated user id from wcf in nhibernate

Hi I have implemented NHibernate custom context (ICurrentSessionContext). In this context I inject the NHibernate session so I have Session per call pattern setup. Ok, now I have made an interceptor that takes userId of the current logged user. Now I do this: public ISession CurrentSession() { // Get the WCF InstanceContext: var con...

jquery: get parent element from ajax call

How to make this code work? I don't see how i can reach div from within $.get callback. $("<div/>", { text: "some text", click: function (e) { $.get("bar.php", function(data) { $(this).text(data); // doesn't work }); } }).appendTo("body"); ...

Templating and trying to reference context path from inside a CSS file

I'm working with JSF and XHTML templates, I'm using a CSS file in the templates, the background images being called like: background-image: url("../../images/imageFile.jpg"); Because I'm using templates I found out that I must keep same depth for both pages and styles/images to pages apply styles correctly, but the project had change...

Associating Context based on Caller Id

I want to create an Android application that will allow me to associate context / look up caller-relevant information when a caller from my Contacts List makes a call (e.g. look up meetings scheduled with this person) ...

Launching service from class without a Context

I'm trying to figure out how to launch a Service from a singleton class I've created. According to the Android documentation, startService is a method of Context. So, in the method call I am making to the singleton class, I figured I would pass on the application Context as a parameter. Easy enough. However, when I try to use that co...

Get calling context in a service

So I'm working on a service that will handle requests to send data to a socket. I've done socket programming in a service before, but only within the same application. I'd like this to just sit and do nothing until any application wants to give it data to send. That's all well and good. I have register an intent filter and the usual st...

JBoss AS 5.1: Overriding context parameters when deploying a Servlet webapp

Is there any way to OVERRIDE a webapp's context parameters (already defined inside its WEB-INF/web.xml with default values) when the webapp.WAR is being deployed to the JBoss AS 5.1? Apache Tomcat has a nice feature whereby if a webapp WAR file is being deployed using the Tomcat Manager, you have the option of supplying an XML configura...

How do I pass the this context to a function?

I thought this would be something I could easily google, but maybe I'm not asking the right question... How do I set whatever "this" refers to in a given javascript function? for example, like with most of jQuery's functions such as: $(selector).each(function() { //$(this) gives me access to whatever selector we're on }); How d...

New Activity nullpointerexception Problem

Hello, I have a noob problem. Here is my situation: I want to start a new activity from the main activity. The code to launch the new activity is found in a separate class file. I seem to be passing the wrong arguments and I am ending up in a nullpointerexception when trying to launch the new activity. The new activity launches fine whe...

Accessing the Java application without context path

Hi guys - we need to have a context path to deploy the Java application and access it through the browser. We have nearly 10 applications on Oracle Application server. We would like to work our applications without context path. i.e.; we would like the application server to look at the corresponding application based on the domain name. ...

Android: Application context, force root intent to show upon launch

Hi, I am writing an Android app in which I've extended the Application class in order to hold some global variables. I initialize these global vars in my root Activity (the first screen that the user sees). My application contains a number of Activities containing ListViews full of selectable items. When the user selects an item, a new...

Is WebServiceContext injection thread-safe?

Hi, I have a web service(Netbeans 6.9.1,Glassfish 3.0.1) with webservicecontext injection. I want to know if this class is thread-safe if I use @Singleton annotation. @WebService() @Singleton() public class Proves { @Resource WebServiceContext wsContext; @WebMethod(operationName = "feralgo") public String feralgo(@WebParam...

How to get Context when servet/jsp is not used? Only plain class files.

My existing web application gets database pooling parameters from context. Now, I'm developing a new web service to be deployed as a separate application, but using the previous database. In this new web service application, I am not using any servlet, as well as JSPs. They'll just be a collection of service classes. In such a case, how...