java-ee

How to display notification with welcome message when logged in?

心不动则不痛 提交于 2019-12-21 20:23:24
问题 I want to use a primefaces tool called Notification bar to display a message that says welcome, when the user logs in. The problem is that i don't know how to trigger it, only if the login is successful(if wrong password should not be displayed) and also to be displayed even if i am redirected to another page. This is how my loggin page looks like: <ui:composition template="WEB-INF/templates/BasicTemplate.xhtml"> <!-- THE REGISTRATION FORM --> <ui:define name="loginForm"> <h2>Login page</h2>

Spring Autowired in Web Service not working

别来无恙 提交于 2019-12-21 20:18:34
问题 I must be missing something simple, but I'm having trouble getting an Autowired property to be assigned to a bean. All similar answers posted here seem to revolve around one of three solutions: extend SpringBeanAutowiringSupport use <context:component-scan base-package="..." /> in applicationContext.xml use <context:annotation-config /> in applicationContext.xml I tried to make a minimalist bean to represent my DAO and inject it into a Web Service. DAO interface: package wb; public interface

Using @Transactional with EJBs

房东的猫 提交于 2019-12-21 20:04:38
问题 Is it ok to use @Transactional with EJBs? Is there any difference between using @TransactionAttribute ? I found already here Difference between @Transactional and @TransactionAttribute that @Transactional is for POJO. I've used it accidently for EJB in Wildfly and there were no errors. I wonder whether the behaviour would be the same or if there are some differences. Or maybe @Transactional would be just ignored and default level of @TransactionAttribute would be used? I've search in the spec

How to force jboss to load classes from jars in webapp's lib

*爱你&永不变心* 提交于 2019-12-21 19:43:33
问题 I am trying to deploy my web application on jboss-6.0.0Final , which is currently deployed on apache tomcat . I have two jars one that contains same package which is org.apache.axis . I am putting one jar in <Jboss-home>/server/default/lib & another jar in <my-app-war>WEB-INF/lib . It is required to put both jars in the class path. No way to remove one of the jar. So I need to keep both jars. & It is giving me following error java.lang.ClassCastException: org.apache.axis.attachments

How to do dynamic URL Rewriting in J2EE

萝らか妹 提交于 2019-12-21 19:10:41
问题 Back in my ASP.NET days, I used URLRewriter.NET to do dynamic URL Rewrites. Basically, it's an HTTPModule that intercepts page requests and rewrites the URLs according to rules that you define, very similar to MOD_REWRITE. However, it also lets you define a "Custom Transform," a class with a single method that does URL translations for you on-the-fly. You can have this method hit the DB, access the Application[] collection, pretty much do anything your heart desires. Is there any equivalent

JBoss 7 NOT Java EE6 Certified

此生再无相见时 提交于 2019-12-21 18:39:20
问题 I am really wonder what this actually means? Can I use JBoss 7 in development and also in production with all EE 6 features (I need JMS, EJB 3.1, JSF 2.1, CDI...) or I have to wait for later releases of JBoss 7? If not, what is the option since JBoss 6.x is only Web Profile certified and what is explanation for "only Web Profile certified"? Thanks 回答1: An application server is only Java EE 6 "Full Profile" certified if it implements all aspects of the huge Java EE API. An application server

Hot Deploy for JBoss on Eclipse 3.4: Ganymede

醉酒当歌 提交于 2019-12-21 17:44:03
问题 I am using Ganymede (Eclipse 3.4) to do some Java EE based web development targeting a JBoss 4.2 application server. I have always liked Eclipse very much for a Java editor. The thing is, for Java EE is not as useful as one might think. It's buggy, deployment and debugging is very slow, and you have to re-deploy your Java EE application every time you make a little change. That makes development unbearable. My question is: Is there a plugin that will make my life easier by adding HOT DEPLOY

Enabling full documentation for Java EE in eclipse

牧云@^-^@ 提交于 2019-12-21 17:36:30
问题 I'm new to Eclipse and am using it currently to play with Java EE. When using Ctrl+Space for types/functions from the regular Java libraries I get a full description (i.e. general description of the type, what are the arguments of the method for, etc.). However I don't get the same for Java EE types. For example, when using Ctrl+Space on methods of the HttpSession class I get only names like "arg0" or "obj" and no description. How can I remedy this? 回答1: I'd suggest downloading the javadocs

how to do single-sign-on (SSO) between two web apps, PHP and Java EE?

限于喜欢 提交于 2019-12-21 17:36:04
问题 I have an existing Java EE web application running on GlassFish 3.1. Sign in works fine through the jdbcRealm configured in GlassFish 3.1. Someone on another team is developing a separate web application in PHP, the boss doesn't want the user of the apps to have to sign in twice. That is, when they are signed in to the Java web app and they click a link that takes them to the PHP app, they should already be signed in to that app as well. (And vice-versa.) Not sure how to implement this. I was

What's the difference between the various JSTL libraries out there and which to use?

南楼画角 提交于 2019-12-21 17:18:43
问题 I'm puzzled because of build and run errors that mislead me. From them, I can't quite figure out what the distinction is between the various JavaServer Page Standard Tag Libraries. For instance, I see: jstl.jar (in Apache Tomcat) jstl-1.2.jar (in Tomahawk examples) jstl-impl.jar (in GlassFish) In times past, I've used (and recently recovered and have stored privately against disaster) from javax.servlet.jsp.jstl jstl-api-1.2.jar jstl-impl-1.2.jar These latter are the only ones I seem to be