java-ee

Display forwarded JSP with url-pattern “/*”

本秂侑毒 提交于 2019-12-25 06:37:56
问题 To improve my java skills, I'm trying to build a simple j2ee framework (MVC). I built it to handle every request in a FrontServlet. Here is the mapping that I used : web.xml : <servlet> <servlet-name>Front</servlet-name> <servlet-class>test.FrontServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Front</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> My problem is that when I forward the request from the FrontServlet to a JSP, obviously, the JSP request is handle

Exception in thread “main” java.util.ServiceConfigurationError [closed]

狂风中的少年 提交于 2019-12-25 06:34:02
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . This error is occuring with Hibernate 3.2 and resolved by using ServiceRegistryBuilder This is my code: public class HibernateTest { public static void main(String[] args) { UserDetails user = new UserDetails(); user.setUserId(1); user.setUserName("Sam"); SessionFactory sessionFactory = new

EJB Endpoint Interface - Is client 'in VM'?

一曲冷凌霜 提交于 2019-12-25 05:27:31
问题 As a beginner of SLSB EJB, I understand that accessing them locally (through Local Business Interface) is more efficient than remotely. When an EJB is accessed through an Endpoint, is it being accessed remotely or locally? This is in the context of accessing the EJB through JAX-RS. 回答1: A webservice endpoint is neither local nor remote. It is its own client view. That said, the overhead from remote is primarily due to marshalling/demarshalling arguments for pass-by-value semantics of

OpenJPA Webspere 7 Log4j configuration

故事扮演 提交于 2019-12-25 05:23:27
问题 Guys I’m struggling with this one. I am trying to redirect logging from systemout. to a log4j rollingappender file with no success, below is a sample of my persistent.xml <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="R_TEST"

Configure J2EE version on Eclipse

余生长醉 提交于 2019-12-25 05:13:57
问题 My J2EE project needs to be ran under J2EE 1.4 environment. I found there is no option on Eclipse to specify which J2EE version to be used by my J2EE project. However the J2EE project could be deployed to internal Application Servers. May I know if there is anything I am missing? 回答1: Java EE is a large specification, and not all servers implement it in its entirety. Support for it is then broken down into the various specifications that make it up. Most people are interested in the Servlet

connection pooling: retrieve lost DB connection

做~自己de王妃 提交于 2019-12-25 05:12:04
问题 I am implementing 2-phase commit for a distributed transaction(using 2 Databases). I simulate a DB server connection loss by pulling the network cable to my desk Computer and then plugging it back. However, this causes the transaction to fail in executing a "rollback" as the DB connection object is lost. Is there a way that i can retrieve the lost DB connection object or enforce the application to try reconnect to the same connection after a certain timeperiod. I am using DB2 and Websphere 6

Jar packaging and distribution

别来无恙 提交于 2019-12-25 05:09:57
问题 We have some common code laid out in packages as expected. Some of these packages are handler, processor, util, registration etc Common here means these will be re-used across multiple Java / Java EE projects which are unrelated to each other. The question is on packaging for distribution. Each package comprises a different functional units but put together, they are an API. Should we bundle individual functionalities into a JAR and end up with say 8 - 10 jars. eg: handler jar, registration

Display values in drill-down SelectOneMenus (Parent-Child)

无人久伴 提交于 2019-12-25 05:02:07
问题 I have irritating problem when I populate a drill-down selection of two selectOneMenu . The first menu is Sector which controls the other one Categorty . I load the selection for the Category depending on Sector and all of this is working fine. But when I edit a business object that has a Category (has one) Sector attached to it. The Category doesn't get display when first loading the edit.xhtml page. I know the value is correct in the SessionScoped backing bean. If I select another Sector

ClassNotFound: Xerces SAXParserFactoryImpl when running in Wildfly 8.2

左心房为你撑大大i 提交于 2019-12-25 05:00:31
问题 I am running Wildfly 8.2.0 and doing some XML Config file parsing. The idea is that I'll be able to use my bundled xercesImpl.jar to provide the JAXP SAXParserFactoryImpl. When running the logic outside of Wildfly, I am successfully able to parse with the SAXParserFactoryImpl. This factory is found by setting the system property: System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl"); SAXParserFactory factory = javax.xml.parsers

application scoped bean's view is not updated

。_饼干妹妹 提交于 2019-12-25 04:55:44
问题 I have a variable inside an application scoped bean. A user can trigger an update of this variable through a method call. Now the problem is that the user doesn't get an updated view of this variable after refreshing the jsf page. If have tested if the variable is updated properly and it is, so the method for updating is working correctly. Are variables inside an application scoped bean declared as final or what is the problem here? 回答1: That can happen if you used the wrong combination of