j2ee

Configuring container-based authentication with alternative digest methods

Following up on a prior question, I'm trying to figure out how to set up container-based authentication for a J2EE application. Specifically, I need to be able to apply a password digest algorithm other than the ones supported by the java.security.MessageDigest (which are SHA, MD2, or MD5 - here's where I think that limitation is documen...

JMS message to remote server

I need to send a message to a remote server's queue (running "JBoss MQ") so that it can process the message and act on it. Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces"); p...

tell me a clear differnece between EAR WAR and JAR

i need to know a clear difference between WAR,JAR and EAR- ...

Using a custom Servlet oriented framework, too many servlets, is this an issue

In our application, we structure different web applications by Servlet. There are many, many Servlets and Filters in our applications. We already use different frameworks but not for this particular legacy web application. One issue is that one application/servlet is completely separate from another. If you were to redesign your appl...

Using log4j with Web container (part of the J2EE server).

When our application throws errors that we catch, we put the message and stacktrace in a log file created specifically for our application (myapp.log). For example: public class SomeClass { OurLogger log = OurLogger.getLogger ("myapp", SomeClass.class); public void someMethod { try { //code } catch (DataAcce...

How to optimize activemq

I'm using ActiveMQ on a simulation of overloading servers in Java. And mainly it goes ok, but when I get over 600 requests the thing just go WTF! I think the bottleneck is my Master Server which is this guy below. I'm already reusing the connection and creating various sessions to consume messages from clients. Like I said, I'm using a...

attributeRemoved not being called after session.invalidate

I have a object that implements the HttpSessionAttributeListener, and as you'd expect it does some work when certain objects are added, replaced and removed from the session. I thought that the if the session is ended [session.invalidate()], each object from that session is removed from the session as so the attributeRemoved() method ...

How to add Points and Markers Dynamically to Google Maps from JSF

I have an app in J2EE with a couple of projects. Got my .war project that communicates with a EJB business project which has access to some Data. I have an entity which has some information about places, and I want to show a collection of those places in a single map on a JSF page. I have a Collection of coordinates to be assigned as ...

j2ee project flow

I need a project flow (If project developed with jsp , servlets ,struts , hibernate) Like... Request->controller->dao->dto-> db ...

When is Spring + Tomcat not powerful enough?

I've been reading/learning more about Spring lately, and how one would use Spring in combination with other open-source tools like Tomcat and Hibernate. I'm evaluating whether or not Spring MVC could be a possible replacement technology for the project I work on, which uses WebLogic and a LOT of custom-rolled J2EE code. The thing is, I'v...

Java AJAX webapp security

I'm experimenting with creating a simple AJAX Java webapp. I'd like to use the container managed security provided by the Servlet container, but having investigated it have a feeling that it isn't going to work how I'd like it to. Basically I'd like to be able to have a login prompt on the main page, without the user having to navigate...

CLASSPATH, Java Buld Path (eclipse), and WEB-INF\LIB : what to use, when, and why?

Hello all, I recently switched to J2EE from .NET, and am confused about where to put JAR files. I know that the CLASSPATH, WEB-INF, and Eclipse's Java Web Path are all places where JARs can be stored, but I'm confused about which folder to use, when, and why. First off, we have the CLASSPATH. I usually set this by going into "Environ...

Some questions for j2me

Dear all, I do have some questions which always confuse me a lot. (1) Why when we install j2me, we have to install jdk first? [for my understanding, they are independent 2 versions, one is of embedded, another is for desktop application] (2) How to install the j2me environment into the phone or embedded device? Do we need to install t...

J2EE war file redeployment changes not reflected

Hi all, I created the the file index.jsp as below <form action="" method="POST"><br> First Name: <input type="text" name="firstName" size="20"><br> Surname: <input type="text" name="surname" size="20"><br> <input type="submit" value="Submit"><br> </form> I export it to .war and everything works fine. Then later I modified...

How to Write Ant Scripts?

Hi Experts, Can anyone tell me how to write Ant script (if i want to create my own) mean is there any kind of tutorial available? Eclipse/Netbeans provide Ant script automatically but can it be possible to edit and customize them as per requirement? If yes then how to do this and how to customize the workspace which is provided by IDE...

How to use Quartz with EJB3 ?

Hello everyone. I want to be able to : define different jobs and triggers. modify the expirations dates and intervals on demand pause or cancel an execution (trigger) the jobs would be ejbs or call ejbs and i would want to manage everything from the website (the user will have to define the executions) So i looked at the timerservi...

Modifying AMF response at runtime - How to?

I have built a simple flex application (using BlazeDS) which displays "Person" details by invoking a java service using flex remoting. So, my Person class looks something like this: class Person { public int age; public String name; } As a java developer, here is my understanding: When I run the front flex app in my webapp, an RPC c...

error marshalling return;

I am getting the following exception when I tried to execute one my service in my server which is deployed as EJB2.0 stateless session bean. Error executing services::error marshalling return; nested exception is: java.io.NotSerializableException: xxx.xxx.xxx.PmsService here xxx.xxx.xxx.PmsService is my class which is already implem...

java session management

I am working on a small webapp for fun, using just Java Servlets at the moment. I have two pages, test1 and test2. At the moment I am creating a new session in test1 like this: HttpSession session = request.getSession(true); if (session.isNew() == false) { session.invalidate(); session = request.getSession (true)...

XSS security issue

When using Cross Site Scripting - XSS in a J2EE struts 2.0.9 application . When I put <Script> tag in the URL it is executing the JavaScript which is a security threat. Is there any solution to overcome this problem apart from moviing to higher version of Struts. ...