java-ee

How to run Java EE application on CentOS

梦想与她 提交于 2019-12-12 03:58:32
问题 I created an application with EJB and JSF. I'd like to deploy my application to the web, so I got a dedicated server from hostgator. On this server I installed CentOS 6.7, Java 7 and JBoss AS 7.1. I addition to that I have my own domain name. How can I deploy my application to this server and how I can make this application reachable via my domain name? 回答1: Here is information directly from JBoss: [standalone@localhost:9999 /] deploy ~/Desktop/test-application.war 'test-application.war'

Glassfish error: NameNotFoundException so servlet cannot inject EJB

天大地大妈咪最大 提交于 2019-12-12 03:58:13
问题 Where and how should the EJB ConverterBean be located so that ConverterServlet can inject the EJB? Does not: "..with Java EE 6 and newer you can just put all the classes in your WAR file" I'm reading the Java EE 7 tutorial on this topic, of course. the InjectionException from the browser: HTTP Status 500 - Internal Server Error type Exception report messageInternal Server Error descriptionThe server encountered an internal error that prevented it from fulfilling this request. exception javax

Store Interceptor and loose Value stack when redirection

為{幸葍}努か 提交于 2019-12-12 03:57:05
问题 I have 2 actions. First to display form and another to process form. If processAdd action is not validated than redirectAction back to Add action. Store interceptor shows proper errors on the "Add" action but filled in values on the form are lost during redirect action. I loose Value Stack on redirection, I understand that. Is there any solution to this? Don't want to use result param, too much work. <action name="add" class="com.myapp.actions.StudentAction" method="input"> <interceptor-ref

org.apache.jasper.JasperException

守給你的承諾、 提交于 2019-12-12 03:56:31
问题 When i open first time my application its show error like org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.tuckey.web.filters.urlrewrite

Tomee error: javax.persistence.JoinColumn.foreignKey()

为君一笑 提交于 2019-12-12 03:52:03
问题 I was building my first webapp. I am using hibernate, postgresql, and tomee as container. I am using beans and faces. When i try to run my webapp on my tomee localhost everything works as expected. When i load it on my AWS (wich has the same version of tomee installed) i get this error. I'm stick since hours without getting at the solution. Here is my catalina.out May 26, 2016 4:18:24 AM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation INFO: HHH000204: Processing

Getting sql connection via EclipseLink

Deadly 提交于 2019-12-12 03:46:15
问题 I am trying to obtain a reference to sql connection as mentioned in the following question : Getting a JDBC connection from EclipseLink Here is the actual code: Connection con = entityManager.unwrap(Connection.class); This is also mentioned in EclipseLink documentation. I keep getting following error from EclipseIDE: The method unwrap(Class<Connection>) is undefined for the type EntityManager 1 Quickfix Add cast to 'entityManager' If I apply the quickfix suggested by Eclipse, the code looks

java.lang.NoClassDefFoundError: org/eclipse/wst/web/internal/deployables/IFlatDeployable

谁说胖子不能爱 提交于 2019-12-12 03:45:40
问题 Servlet not working in newly created Dynamic Web Project in Eclipse Juno for Java EE. Here is how it goes, from scratch: I downloaded Eclipse EE (Juno), didn't change any of default config I downloaded latest Tomcat (7.0.30) In Preferences > Server > Runtime Environments I added new Apache Tomcat v7.0 I created new Dynamic Web Project called UniBudget (context root: budget ) I added new file ( index.jps with "it works!" inside) At this moment after adding project to server and running it I

How to perform read operations from primary only

馋奶兔 提交于 2019-12-12 03:45:31
问题 We are using Mongo DB for our Java Java EE based application. We are using one primary and two secondary as part of cluster of Mongo DB The Mongo DB is continuously read / Updated / Write as part of our architecture. Due to this we are getting Dirty Reads ( zero values ) When we do a fetch operation from Mongo DB. TO solve this, I am trying to configure it in such a way that the read operation always fetches from primary itself and writes / updates can go to primary / secondary. Please let me

Authentication with Java EE

南笙酒味 提交于 2019-12-12 03:40:32
问题 I want to implement something like facebook as where you enter the page, login (with name and password) and navigate in the other pages once authenticated. But if you are not authenticated you cannot see the other pages (you are redirected to the login page). What's the best way to do this by using Java EE? 回答1: To cite the Oracle documentation: The Sun Java System Application Server security model is based on an authenticated user session. Once a session has been created the application user

JSF Controller, Service and DAO

大城市里の小女人 提交于 2019-12-12 03:37:04
问题 I'm trying to get used to how JSF works with regards to accessing data (coming from a spring background) I'm creating a simple example that maintains a list of users, I have something like <h:dataTable value="#{userListController.userList}" var="u"> <h:column>#{u.userId}</h:column> <h:column>#{u.userName}</h:column> </h:dataTable> Then the "controller" has something like @Named(value = "userListController") @SessionScoped public class UserListController { @EJB private UserListService