java-ee

ClassNotFoundException Error in Tomcat 5.5 and Tomcat 6.0

泪湿孤枕 提交于 2019-12-23 08:37:12
问题 I am having this strange issue with the tomcat 5.5 and tomcat 6.0 servers. I have two web applications which will be installed on tomcat.When tomcat is started these two web applications also get started simultaneously but sometimes one web application fails to initialize because of the init failure in one application another application is getting classnotfoundexception errors while running. In tomcat 7.0 the application is running fine even if the other application failed to initialize.

How to exclude a class from scanning with CDI 1.0

早过忘川 提交于 2019-12-23 07:26:24
问题 I would like to exclude a class from scanning in CDI 1.0. I'm using the default implementation of CDI in WebLogic 12.1.12 (Weld, CDI 1.0). I saw several web sites and docs with CDI 1.1 but not with the previous release . 回答1: With Weld, you can use a custom XML namespace in beans.xml to exclude classes from scanning: <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:weld="http://jboss.org/schema/weld/beans"> <weld:scan> <weld:exclude

How can I integrate Jersey with TomEE / openEJB

被刻印的时光 ゝ 提交于 2019-12-23 07:20:14
问题 I am upgrading a code that uses Jersey JAX-RS to run on an Apache TomEE server. Unfortunately it throws errors when I try to use Jersey with TomEE. I am using eclipse and have the JAX-RS project facet turned on. It points to the Jersey library. I have also moved the Jersey libraries into the /lib/ directory to try to solve the problem to no avail. The server throws the following error: May 14, 2012 6:26:44 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses INFO: Provider classes

Why is PostConstruct not called?

余生颓废 提交于 2019-12-23 07:19:45
问题 I am working on a simple Java EE application. I have class like this: import javax.annotation.PostConstruct; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; @Stateless public class BlogEntryDao { EntityManager em; @PostConstruct public void initialize(){ EntityManagerFactory emf = Persistence.createEntityManagerFactory("Persistence"); em = emf.createEntityManager(); } public void

meaning of this glassfish warning: context path differs from bundle

我是研究僧i 提交于 2019-12-23 07:17:01
问题 I'm not quite sure what this error message is indicating: INFO: visiting unvisited references INFO: visiting unvisited references INFO: visiting unvisited references INFO: visiting unvisited references INFO: EJB5181:Portable JNDI names for EJB Hello: [java:global/SalutationApp/SalutationApp-ejb/Hello, java:global/SalutationApp/SalutationApp-ejb/Hello!ejb.Hello] INFO: Loading application [SalutationApp#SalutationApp-war.war] at [SalutationApp-war] INFO: SalutationApp was successfully deployed

meaning of this glassfish warning: context path differs from bundle

回眸只為那壹抹淺笑 提交于 2019-12-23 07:16:10
问题 I'm not quite sure what this error message is indicating: INFO: visiting unvisited references INFO: visiting unvisited references INFO: visiting unvisited references INFO: visiting unvisited references INFO: EJB5181:Portable JNDI names for EJB Hello: [java:global/SalutationApp/SalutationApp-ejb/Hello, java:global/SalutationApp/SalutationApp-ejb/Hello!ejb.Hello] INFO: Loading application [SalutationApp#SalutationApp-war.war] at [SalutationApp-war] INFO: SalutationApp was successfully deployed

uploading a file using apache streaming API and Google App Engine Virtual File System

只愿长相守 提交于 2019-12-23 06:59:00
问题 To upload a file into my project directory which is there on the google appengine,I am trying to use apache streaming API and Google App Engine Virtual File System. Here is what I have been able to do till now : String path = request.getParameter("Data"); PrintWriter writer = response.getWriter(); try { boolean isMultipart = ServletFileUpload.isMultipartContent(request); if( !isMultipart ) { writer.println("File cannot be uploaded !"); } else { ServletFileUpload upload = new ServletFileUpload

Restrict a user to go to back pages from the browser back button after log out in struts 2 login web application?

徘徊边缘 提交于 2019-12-23 06:58:26
问题 I am making a Struts 2 web app in which after log out one can go to back pages from the browsers back button which i don't want in my app.I also using a custom interceptor before every request to authenticate users.but it also not working in desire way. My code is as follows web.xml <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns

Javascript / jQuery to Servlet communication

拟墨画扇 提交于 2019-12-23 06:16:25
问题 I was searching for this earlier and was little confused by the answer i got around so i felt like writing a complete code for this. This is for my future work and i hope someone get benefited by this. Please see the answer below. 回答1: This can be solve by both js and jquery. but since jquery is easier and shorter so, i am just going to write code for that. In this scenario i will make a ajax call on change of a selection in html / jsp page Jsp page looks like this <select class="target1">

Mysterious NoSuchMethodError & it can't be the classpath…can it?

放肆的年华 提交于 2019-12-23 05:52:13
问题 I've been battling with this bug for 3 hours. I have checked the build path and classpath and they are the same, this is quite a large webapp, running on Tomcat & Geronimo, it has a build file for each component & then one main once that binds them all together, but I've gone over the ant build files & compared them to others in working components that rely on 3rd party libraries and I don't see an differences. <fileset dir="${home.dir}/component/lib" includes="*.jar"/> It all seems to be in