inject « Development « JSP-Servlet Q&A





1. Is there any way to inject custom controls into JSPs using a servlet?    stackoverflow.com

I am new to JSPs and Servlets - I am wondering if there is any way for a JSP of delegating to a servlet the generation of given areas of the ...

2. How to obtain OSGi service references from a Servlet that is registered in OSGi HttpService?    stackoverflow.com

It seems natural that a HttpServlet running in OSGi environment (i.e. registered in OSGi HttpService) would want to call some OSGi services to accomplish it's tasks. The question is ...

3. Constructor dependency injection with Servlet 3.0?    stackoverflow.com

Since Servlet 3.0 it is possible to register Servlet instances programmatically with javax.servlet.ServletContext#addServlet. This class has also a createServlet method which analyses some annotations and performs dependency injection. I wonder if ...

4. Inject dependency into static field    stackoverflow.com

I want to make template engine available in servlets. The concrete template engine implementation should be changeable behind the TemplateEngine interface. With usual dependency injection it could look like this:

public abstract ...

5. Can a plain servlet be configured as a seam component?    stackoverflow.com

I created a plain servlet within a seam-gen (2.1.2) application, now I would like to use injection. Thus I annotated it with @Name and it's recognized as component:

    ...

6. Seam - @In Identity identity not injecting & throws nullpointer exception    stackoverflow.com

I am using Seam 2.0 and I have an instance variable inside my bean as

@In Identity identity 
and when I use identity.getUserName() it throws NullPointerException. Can anyone tell me please ...

7. Inject inaccessible properties using Guice    stackoverflow.com

How can I inject a property to a class I don't have access to using Guice? I only have access to the .jar that contains that class. Also, I need the injected ...

8. Injection in my quartz job    stackoverflow.com

I would like to know how can I use injection in my job using guice. As I can't use @Inject on the default constructor may I use it directly on the attribute ...

9. Guice inject in servlet    stackoverflow.com

I'm fresh new in Google Guice framework and i have a question regarding injecting in guice servlet and using RequestScope. Ok let me give some example from my code just to ...





10. Wicket auth-role : inject external user credential from JSP    stackoverflow.com

I am doing an incremental JSP --> Wicket migration. I had kept the JSP appliation and doing page by page migration. I gan go and return from JSP <--> wicket pages.But ...

11. Dependency injection in ServerletContextListener    stackoverflow.com

i'm working with a Weblogib BEA 10.0 app-server. I want to inject a StatelessSessionBean into a ServletContextListener. All this bean should do is start a periodic timer for clean up tasks. My project ...

12. CDI injection in a JSP    stackoverflow.com

Within a JSP it is possible to use CDI managed beans using EL expressions such as ${myBean.myAttribute}. No problem here. I would like to use "regular injection" (i.e. without using EL expressions) ...

13. Guice Injection into Business Layer of Java Web App    stackoverflow.com

I have sucessfully used Guice to Inject Providers into the servlet portion of an existing java web application, however, I can't access the injectors through the business layer (non-servlet java classes) ...

14. How do J2EE applications scale compared to MVC Servlet/JSP applications?    stackoverflow.com

Hi guys : I've used JSP/Servlet frameworks pretty broadly, generally picking up J2EE tricks when necessary (for example, when my data access code get complicated, I usually adopt Ibatis/Hibernate ; or ...

15. Simple Example with Guice Servlets    stackoverflow.com

I don't know how to proceed with a simple guice example. After reading the documentation I've done the following:

  • setup the guiceFilter
  • created an injector and instantiated a new ServletModule in a GuiceServletContextListener ...

16. Inject HttpServletRequest    seamframework.org





17. Regression for "@Inject HttpServletRequest"    seamframework.org

18. How to prevent Java Script Injection ?    coderanch.com

20. Dependency injection    coderanch.com

22. injecting @PersitenceContext    coderanch.com

23. delegation of injected depencies    coderanch.com

24. java.lang.RuntimeException: - error    coderanch.com

27. Dependency Injection    coderanch.com

30. Mocking injected Dependencies    coderanch.com

32. Different ways of dependency injection    coderanch.com

33. connectionFactory Injection    coderanch.com

34. @PersistenceContext - overriding injection using configuation file.    coderanch.com

Hi: I thought that you should be able to override @PersistenceContext annotation using ejb-jar.xml file. Either I am doing something wrong or there is another issue that I am not aware of. Simple concept: to learn innards of EJB I created a very simple eCommerce app. The store has two diffrent sources of inventory (let say we can sell shoes and ...

35. CDI injection across jars    coderanch.com

36. Injection and extend    coderanch.com

37. EAR packaging - @Persistence Unit injection fails    coderanch.com

Hi, everybody, I have a simple web application using GlassFish 2.1 (with NB 7.0) with one web module and one ejb module. When deploying both modules everything is fine. Now I created a new EAR project, added the two modules and deployed that to GF... APP APP-ejb.jar APP-war.war ...

38. Customizing EntityManager injection for multi-tenancy    coderanch.com

So, we are building an application that requires multi-tenancy support. There is one application that has to support multiple clients. Basically, we have the data hosted in 2 huge Oracle databases. For security reasons (and also to improve scalability), each client's data is stored in it's own schema within the Oracle database. When the user logs in to the application the ...

40. setter injection in servlet    java.net

41. inject or read a value to/from pojo that implements servlet endpoint    java.net

I haven't figured out how I can inject or read a value (like an env entry) to/from a pojo that implements the servlet endpoint of a web service. I was reading something like injecting a webservicecontext and getting the servlet context from it, but that seems to be too much dependency and complexity given that I only need to read a ...