java-ee

How to deploy a JSF 2.1 webapp in Oracle Weblogic 12.1?

╄→尐↘猪︶ㄣ 提交于 2019-12-21 16:58:08
问题 I am trying to deploy a JSF 2.1 webapplication to a Weblogic 12.1 application server, but the deployment fails with the following exception <javax.enterprise.resource.webcontainer.jsf.config> <BEA-000000> <Critical error during deployment: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! com.oracle.injection.integration.jsf.WeblogicFacesConfigResourceProvider cannot be cast to com.sun.faces.spi.ConfigurationResourceProvider at com.sun.faces.config.ConfigManager.initialize

How useful is a 'pure' MVC implementation?

╄→尐↘猪︶ㄣ 提交于 2019-12-21 16:17:50
问题 I work at a company that provides custom made 'CRM'-like software. We are currently redesigning/redeveloping the software with the hopes that it will look more modern and be easier to develop and customize for future clients. Currently it takes a long time to customize each new application. There is a presumption that the reason it takes so long is because of the amount of business logic that is present in the 'view' layer. To some extent I can vouch for this being true, but symptoms don't

Wildfly / Undertow : Multiple aliases for one host

喜欢而已 提交于 2019-12-21 13:43:12
问题 In standalone/configuration/standalone-full.xml , I've declared the following host, that works <host name="webhost" alias="gateway.example.com" /> When I try to add another alias, I'm given Error 404. <host name="webhost" alias="gateway.example.com www.gateway.example.com"/> The DOCUMENTATION says list of aliases is whitespace separated. 回答1: There was a bug in documentation. It is comma separated list of hosts not white space separated. example would be <host name="default-host" alias=

Inject Bean into CDI Context programmatically?

感情迁移 提交于 2019-12-21 13:05:10
问题 Is it possible to manually Inject a bean into a CDI context? With the JBoss Seam framework, I could always do something like Contexts.getConversationContext().set("foo", bar); and the Bean would become part of that context. Is it possible to do something like this in Java EE 6 CDI? 回答1: There is no way to do this in an implementation agnostic way. You'd have to dig into the implementation, find the scope objects, pull them out via a BeanManager and figure out how to add them. Not all of them

Eclipse: Have multiple Dynamic web projects contribute to a single war file?

强颜欢笑 提交于 2019-12-21 12:55:39
问题 I am in a situation where I basically want to be able to have a web project in Eclipse where the WebContents folder is merged from multiple projects instead of only a single dynamic web project. If I have "a.jsp" in project A, and "b.jsp" in project B, I would like to end up with a single web application in the web container where "a.jsp" and "b.jsp" sit next to each other in the same folder. It would be perfect if all files, not just the jsp-files, could be merged like this. This is to be

Warning: JACC: For the URL pattern xxx, all but the following methods were uncovered: POST, GET

限于喜欢 提交于 2019-12-21 12:41:19
问题 In javax.faces.webapp.FacesServlet docs, it is mentioned, Allowable HTTP Methods The JSF specification only requires the use of the GET and POST http methods. If your web application does not require any other http methods, such as PUT and DELETE, please consider restricting the allowable http methods using the <http-method> and <http-method-omission> elements. Please see the Security of the Java Servlet Specification for more information the use of these elements. My application indeed does

@Query returning Object instead of entity

邮差的信 提交于 2019-12-21 12:27:16
问题 When I use @Query annotation with select fields, I dont get the entity object back. How can I get the entity object back? public interface CreditCenterRepository extends JpaRepository<CreditCenter, Long> { @Query("SELECT CC.id, CC.loanId, CC.clientId FROM CreditCenter CC") List<CreditCenter> findAllIds(); } When I call this method from my controller, it does not throw any error, but, when I try to iterate it throws classcastexception List<CreditCenter> objects = findAllIds(); for

Why do we wrap HttpServletRequest ? The api provides an HttpServletRequestWrapper but what do we gain from wrapping the request?

非 Y 不嫁゛ 提交于 2019-12-21 12:22:49
问题 What is the purpose of wrapping an HttpServletRequest using an HttpServletRequestWrapper ? What benefits do we gain from doing this ? 回答1: HttpServletRequest is an interface for a HTTP specific servlet request. Typically you get instances of this interface in servlet filters or servlets. Sometimes you want to adjust the original request at some point. With a HttpServletRequestWrapper you can wrap the original request and overwrite some methods so that it behaves slightly different. Example:

Top reason not to use EJB 3.0 again?

让人想犯罪 __ 提交于 2019-12-21 12:06:42
问题 The scenario You have developed a webapp using EJBs version 3. The system is deployed, delivered and is used by the customer. If you would have to rewrite the system from scratch, would you use EJBs again? Yes : Don't answer this question, answer this one instead. No : Provide the top reason for not using EJBs again, based on your personal experience. Let the answer contain just one reason. This will let other readers vote up the number one reason to stay away from EJB 3. 回答1: The project did

Can CDI be lessened towards Java SE?

China☆狼群 提交于 2019-12-21 11:28:35
问题 JSR-330 dependency injection can be applied to both Java SE and Java EE environments, while JSR-299 is titled "Contexts and Dependency Injection for the Java EE platform". Except strictly Java EE-oriented features, what CDI features make sense on Java SE as well? Any examples available? Thanks! [Revised] Here's Weld on JSE. 回答1: Except strictly Java EE-oriented features, what CDI features make sense on Java SE as well? Any examples available? Thanks! Well, the one mentioned in the Weld