Hi,
I want to generate a random number of 14 positive digits only and i use the below function for it:
public void random()
{
Random number = new Random();
long l = number.nextLong();
number.setSeed(System.currentTimeMillis());
long num = Math.abs(number.nextInt())%999 + (l/100000); // problematic line
mTextBox.setString...
Hello,
I've been programming using RichFaces and JSF for quite some time now, and like the features that Facelets offer (especially as part of JSF 2), but haven't used it yet. Are there any gotchas to watch out for or incompatibilities between RichFaces and Facelets? I use A4J ajax functionality a lot as part of RichFaces, so I am con...
Hi
What are these in Java EE
.Presentation Tier
.Business Tier
.Integration Tier
I like to know what are these patterns with example
...
I was going through Questions every good .Net developer should be able to answer and was highly impressed with the content and approach of this question, and so in the same spirit, I am asking this question for Java/J2EE Developer.
What questions do you think should a good Java/J2EE programmer be able to answer?
I am marking this quest...
I need to detect information about the Application Server my EJBs are running in.
The System.properties contain a lot of information about Java and the Operating system, but I need to know what type of application server and if possible even the version.
Is there a way to get this information in an application independent way (JMX maybe...
Hello,
I'm developing a standalone client that invokes some EJB methods on Glassfish v3. This works well until I'm integrating the client into an Eclipse plugin for running in our RCP application. In this setting there seems to be a classloader problem on initializing the naming context and I get the exception listed below. (The client ...
Hello,
i start with the programming of a JSF Website. At the moment all files have the .xhtml ending. When i go to http://localhost:8080/myProject/start.jsf everything is all right. But when i rename the file from start.xhtml to start.jsf i became a NoClassDefFound Error.
What is my mistake?
<servlet-name>Faces Servlet</servlet-name>...
I have been able to use Jquery with ASP.NET because I know where to drop the JQuery Library, but I am trying to integrate JQuery with Java Web Applications using JSP's,Servlets, etc.
It seems like a trivial question, but for some reason I am unable to figure out where to drop the JQuery Javascript file.
...
Hello,
In a Java method, I'd like to use a Jersey client object to do a POST operation on a RESTful web service (also written using Jersey) but am not sure how to use the client to send the values that will be used as FormParam's on the server. I'm able to send query params just fine.
Thanks in advance.
...
Hi,
My organization has had a hard time dealing with some stubborn JMS issues. We have several JBoss instances running on a network, and occassionally have to restart JBoss instances that are acting as JMS clients (using durable subscriptions). The problem is that the clients are not disconnecting properly, so when they try to connect,...
Hello,
I haven't used Spring, but it sounds like it is fairly popular. I heard that it provides alternate ways of doing things, such as being able to consume RESTful web services. Does anyone know if provides similar features as those introduced by JSF 2, or would I be comparing apples to oranges?
Edit:
Thanks for the information. ...
I am trying to get a simple helloworld test project going so I can build upon it. I am using Java EE with maven in Eclipse and am getting a Requested reseource is not available error from tomcat in my web browser.
Right now all I have is a test jsp page to print Hello World which is all I am trying to get working. I created a maven pro...
I have some properties file in WEB-INF. And I want to load it as a bundle. Is there any way to do that?
...
Hello,
I try to send an email using a jee app. The exact same code is working on a console application. When I use this code on a jee project and I test it using glassfish v3, i get a
Unable to find valid certification path to requested target. I don't want to import any certificate. I just want to send my mail even if there is a cert ...
Here is my company's current process for moving changes from our development server to our production server:
Files that need updated are brought down from production, to ensure no changes were made in production only (no it shouldn't happen; but yes, it does happen). Old development files are given a ~ prefix as a sort of "backup".
De...
I have an EJB Project with a @Singleton EJB defined as:
@LocalBean
@Singleton
@Startup
public class DataModelBean implements DataModelBeanLocal {
I then have another EJB Project with another EJB:
@LocalBean
@Singleton
@Startup
@EJB(beanInterface=DataModelBeanLocal.class,name="DataModelBeanLocal")
@DependsOn("DataModelBeanLocal")
pu...
We have a Java EE app which vendor does not exist anymore (due to bankruptcy). Unfortunately we have to make some changes to the functionality of the app, and this means reverse engineering the JavaEE app.
We use JD-GUI to reverse-engineer about 70% of the app/classes, and then tweak them manually to build in Eclipse.
However the rest...
I have the following form setup:
<html>
<head></head>
<body>
<form method="post" enctype="multipart/form-data" action="FileUpload">
<table>
<th>WEX SI Online Validation</th>
<tr>
<td>Step 1: Select File for Validation: </td>
<td><input name="filename" type="file"/></td>
</tr>
...
We are having issues with multiple Struts2 applicaiton WAR's installed to a GlassFishV2 server. These multiple apps all share the common Struts2.jar and few other core jars.
Issue we are having is that at times the global resource files are getting lost for some application when another application deploys a new build.
Global Resource...
I am using Java EE with Spring framework. I have been setting up a test project (everything is working so far) and I currently have the following line in the controller to simply load up a view called index.jsp:
return new ModelAndView("index");
This is just a test project so I'm not worried about syntax or anything like that. I am ...