java-ee

Enable hot deploy for web pages in jboss-as-7.1.1.Final

我的未来我决定 提交于 2019-12-14 03:45:22
问题 i am new to jboss, and i want to enable the hot deploy feature as in tomcat. right now when making any change to the xhtml page, i rebuild the application then redeploy the whole war, which is too much. but in tomcat the war file was extracted, and then i replace the change xhtml file only and see the change immediately. i was wondering how to accomplish same behavior for jboss-as-7.1.1.Final, and not in eclipse. please advise how to do that, thanks. 回答1: You can do the same thing in JBoss as

how to detect whether request is coming from browser or smartphone? [duplicate]

人盡茶涼 提交于 2019-12-14 03:28:10
问题 This question already has answers here : Detecting Device Type in a web application (7 answers) Closed 6 years ago . I am having a web application , which works fine . now there is a particular page which gets bulky when i access the application from smartphone browser , so I wanted a situation like if(request comes from computer browser client ) forward to bulky page in web application else if (request comes from smartphone ) forward to some other light page . please put your suggestion how

Maven clean install issue: Failed to configure plugin parameters

混江龙づ霸主 提交于 2019-12-14 03:16:16
问题 I'm trying to made a clean install for a Maven project but I found a problem. The console displays this error: [INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:maven-enforcer-plugin:1.0 Cause: Class 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot be instantiated It's the same error for the command line: mvn release:prepare -Dresume=false This is the pom of all the project: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0

Application-Managed entityManager work, but Container-Managed Entity Manager doesn't. Why?

橙三吉。 提交于 2019-12-14 03:04:57
问题 I develop client-server application with JavaEE. I have a stateless bean AuthenticateEJB . It works fine, database entry refreshs when I use Application-Managed Entity Manager (package and import statements omitted for simplifying): @PersistenceUnit(unitName = "horses_unit") EntityManager em; user.setToken("PapaToken"); EntityManagerFactory emf = Persistence.createEntityManagerFactory("horses_unit"); EntityManager em = emf.createEntityManager(); EntityTransaction tx = em.getTransaction(); tx

hibernate one to many query using mappings

眉间皱痕 提交于 2019-12-14 02:26:58
问题 I have 3 classes with the corresponding relationship parent child on them: //SigTcContraloriaObjetivos, SigTcContraloriaIniciativas, SigTcContraloriaAcciones <class dynamic-insert="false" dynamic-update="true" mutable="true" name="org.citi.tablero.contraloria.planes.model.db.hibernate.dto.SigTcContraloriaObjetivos" optimistic-lock="version" polymorphism="implicit" select-before-update="false" table="SIG_TC_CONTRALORIA_OBJETIVOS"> <id column="ID_OBJETIVO" name="idObjetivo"> <generator class=

How to insert using hibernate 4.1.10.Final?

孤街醉人 提交于 2019-12-14 02:20:46
问题 I am using hibernate 4.1.10.Final to insert data into database, but it throws the following exception, I have three tables, development and address . Development has an object of address in itself. INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final} INFO: HHH000412: Hibernate Core {4.1.10.Final} INFO: HHH000206: hibernate.properties not found INFO: HHH000021: Bytecode provider name : javassist INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml INFO: HHH000040:

How to set a bean qualifier name at run time in Spring

感情迁移 提交于 2019-12-14 01:43:38
问题 We can set qualifier names for a bean (for example @Qualifier(value="myBeanQualifiedName") ) . but I want to know how to set a Qualifier name at run time in a @Configuration class. Assume based on a application logic I want to give a name to a bean as a qualifier in a configuration file. EDITED: ConcreteBean is a child class of MyAbstractBean. @Configuration public class MyBeanFactory { @Bean public MyAbstractBean getMySpecifiedBean(String condition){ String QUALIFIER_NAME="QulifierName"

How to write a Spring/JavaEE/web application installer?

天涯浪子 提交于 2019-12-14 00:27:10
问题 I am in the process of converting a legacy system into a Spring JavaEE application and have gotten stuck trying to design the install process. Basically when the application starts up, it needs to check whether the database schema exists and other settings and prompt the user to set them step-by-step until everything is setup. (User is assumed to be entirely non technical). This process doesn't really fit with a Spring MVC style webapp and I think their Webflow might be utter overkill (and

issues with clone and for loop

两盒软妹~` 提交于 2019-12-14 00:07:10
问题 private void buildDeck(ArrayList<Card> Monsters, ArrayList<Card> Spells) { int monstersQouta = 15; int spellsQouta = 5; Random r = new Random(); for (; monstersQouta > 0; monstersQouta--) { int randomIndex = r.nextInt(monsters.size()); MonsterCard monster = (MonsterCard) monsters.get(randomIndex); MonsterCard clone = new MonsterCard(monster.getName(), monster.getDescription(), monster.getLevel(), monster.getAttackPoints(), monster.getDefensePoints()); clone.setMode(monster.getMode()); clone

Servlet not being mapped, java web.xml not being overridden in target folder

╄→гoц情女王★ 提交于 2019-12-13 21:07:48
问题 I have 2 servlets in a web project (Maven) : ServletA created in a earlier version of my project (Maven project), works just fine. ServletB that I've just created after I add (in the properties /Project Facets/Dynamic Web Module 2.4 so it can be recognized as a web project in eclipse)I'm choosing 2.4 beacuse of application server restrictions. However when I create my servlet I can see the web.xml being mapped with it, but when I execute mvn clean compile package the web.xml in the target