java-ee

'Use custom context root' does not work for deployment EAR application to GlassFish in IntelliJ IDEA Server Run Configuration

孤者浪人 提交于 2019-12-13 05:10:14
问题 I changed the context root for the ear artifact. I opened the 'Deployment' tab of the Server Run Configuration, check 'Use custom context root' and enter the desired value into the field: /T4000_Enterprise But the Application Name in GlassFish stayed equal to the name of Output directory(or the Package name): T4000_Enterprise-3.08.HEAD-SNAPSHOT What is wrong? Can I fix it? GlassFish Server Open Source Edition 4.1 (build 13) IntelliJ IDEA 2018.2 EAP (Ultimate Edition) Build #IU-182.3569.1,

p:commandButton or p:button with actionListener and outcome?

北慕城南 提交于 2019-12-13 05:01:24
问题 I'm using PrimeFaces and have a Save button, basically a maintenanceTask is sent to my page, I edit it within here, then press Save and it should be saved to the database and then redirected to the original page. I have a working Save method, but can't seem to get both the navigation and method to fire off. <p:commandButton value="#{message.commonButtonSave}" title="#{message.commonSaveTooltip}" rendered="#{maintenanceTaskEnquiryBean.screenMode == 'editTasks'}" disabled="#

How to send multiple JMS messages in blocks (each in a new transaction)

99封情书 提交于 2019-12-13 04:57:45
问题 My Java EE 6 Web application has reached the maximum number of JMS messages that can be sent in a single transaction and I need to do it in several transactions. What would be the best way of doing this when transactions are managed by the container? Is it OK to use the same MessageProducer across different transactions (using an EJB method annotated with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) ) I'm using Glassfish v3 and OpenMQ. The problem with the maximum number of

In Struts1, How to access ActionMapping parameter in JSP

主宰稳场 提交于 2019-12-13 04:47:45
问题 Proceeding from the question In Struts1, how to use set-property tag inside action tag? When set-property tag is used, its value is mapped to property in extended ActionMapping class. Is there any way to access this property in JSP ? 回答1: You can make use of the bean:struts tag: <bean:struts id="myActionMapping" mapping="/myAction" /> Once defined, you can access the properties straight on the myActionMapping JSP bean: <bean:write name="myActionMapping" property="task" /> Or, using EL: $

Java EE - Show page based on internal business logic

风流意气都作罢 提交于 2019-12-13 04:47:30
问题 I'm implementing an enterprise application with Java EE on Glassfish server. I need to my application to execute some logic to show the proper output for a specific subset of URLs. Problem description: My web pages folder has this structure: Web Pages Protected - CorrectPage.xhtml - A.xhtml - B.xhtml - Index.xhtml I want the user to access the URL: /Protected/CorrectPage.xhtml But the user must not be able to access the following URLs: /Protected/A.xhtml /Protected/B.xhtml When the URL

Injected EJB Reference Lost in ViewScoped JSF Bean

帅比萌擦擦* 提交于 2019-12-13 04:46:09
问题 I've seen quite a bit of discussion on the injection of EJBs into ViewScoped JSF-managed beans. It seems acceptable practice to do so. I'm attempting to change one of the beans in my application from RequestScoped to ViewScoped to add some additional needed functionality. I've modified the EJB classes to ensure that everything is serializable. When my JSF bean is created, the EJBs are initially accessible. However, when a user action fires a method in the bean that tries to invoke an EJB

Hibernate Mapping : Repeated column in mapping for entity

感情迁移 提交于 2019-12-13 04:45:51
问题 I have two classes Employee and Application. Employee has an employeeId(PK). Application has two fields employeeId(fk) managerId(fk). Both employeeId and managerId should refer to employeeId of class Employee. So i have following mappings in the respective hbm.xml files: Employee.hbm.xml <hibernate-mapping package="com.quinnox.resignation2.0.model"> <class name="Employee" table="Employee"> <id name="employeeId" type="int"> <generator class="native"></generator> </id> </class> <hibernate

get server name and port number of JSP page for HTTPS

烂漫一生 提交于 2019-12-13 04:43:28
问题 i need to make the URL for my form action but the form should be submitted under https currently the underlying system running on 9002 port for the HTTPS.I can not use the following option in my JSP page <form:form action="${request.contextPath}/springSecurity/login" method="post" commandName="loginForm" target="guestFrame"> since when in HTTP the context path is coming as HTTP and the system will throw an exception as form should be submitted by HTTPS. i can not hard code the action URL as

Integration of JSF and Ext GWT

£可爱£侵袭症+ 提交于 2019-12-13 04:41:31
问题 I am enhancing an existing JSF app. There I need to add ExtGWT component to the existing JSF based GUI. Is it possible to integrate JSF and Ext GWT? If not do I have any alternatives? 回答1: It should be possible ExtJS GWT with JSF?(haven't tried myself..) INMO if you want to enrich you current JSF application you better look at JSF Component library's like PrimeFaces <- this is example of their table... also there is this project Integrating the Google Web Toolkit with JSF using G4jsf , not

“SEVERE: Error starting static Resources ” in catalina.log

◇◆丶佛笑我妖孽 提交于 2019-12-13 04:41:19
问题 I am getting the following Exception in Catalina.log file when I try to start tomcat 6. I looked for similar queries but could not find a solution mentioned to it.Please note that I have my app inside the tomcat webapp and I am not using eclipse to run it. Jun 14, 2012 12:33:45 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: ............