I have a .jsp that contains an IFrame with a page that has some embedded JavaScript. This JavaScript accesses some DOM elements in the parent page (the one containing the IFrame).
The embedded page is going to be on a seperate sub-domain from the parent page, and I realize that there are some security implications. My impression is that...
I'll be interviewing for a J2EE job using the Spring Framework next week. I've used Spring in my last couple of positions, but I probably want to brush up on it.
What should I keep in mind, and what web sites should look at, to brush up?
...
Hi Friends,
We are currently in the process of migrating our application from our production environment to a brand new data center.
Current Production Environment : Java 1.4, Java EE 3, WAS 5.1, JSF 2.1
New Data Center Environment: Java 1.5, Java EE 5, WAS 6.1, JSF 2.1
Our application is built on JSF 2.1 and contains the code below ...
I'm working with a bit of a legacy component in which we interact with a SOAP web service (a technology which I absolutely, positively abhor) using some client code built using the JAXRPC-RI (reference implementation) library.
I'm interested in being able to set a timeout with the stubs so that in case the web services server does not r...
Hi,
I am getting a bit confused here. In our application we are having a few servlets defined. Here is the excerpt from the web.xml for one of the servlets:
<servlet>
<servlet-name>AxisServlet</servlet-name>
<display-name>Apache-Axis Servlet</display-name>
<servlet-class>com.cisco.framework.axis2.http.FrameworkServl...
One of the goals of the MVC approach to web development is to separate out the model, view, controller.
Lets say in a J2EE Struts like environment, you associate the Struts Action with the controller, a Java bean with the model, and JSP and/or ActionForm with the View.
My question, where do you tend to perform any logic to populate dat...
Here's another issues that we are facing while migrating our application from current production environment to the new data center environment (see details below)
Current Production Environment : Java 1.4, Java EE 3, WAS 5.1, JSF 2.1
New Environment: Java 1.5, Java EE 5, WAS 6.1, JSF 2.1
Here we have a third party jar file with the ...
Hi,
I need a very simple process that listens on a directory and
does some operation when a new file is created on that directory.
I guess I need a thread pool that does that.
This is very easy to implement using the spring framework, which I normally use but I can't use it now.
I can only use tomcat, How can I implement it? what is ...
I'm looking for an easy way to extend existing JPA mapping. The idea is as follows:
I have an EAR project with EJB3+JPA module which has ClassA annotated and mapped to table class_a. But I want some other module (another EJB module) to have ClassB which adds more properties to ClassA (extend?).
One way that I though about, is just to a...
I'd like for Netbeans to deploy directly into an exploded ear in JBoss, instead of the current process of deploying a whole .ear file. Development would be much quicker if it were possible to edit .jsps and backing beans without a redeploy after each change.
Is this possible?
...
Thank you all for your help. A number of you posted (as I should have expected) answers indicating my whole approach was wrong, or that low-level code should never have to know whether or not it is running in a container. I would tend to agree. However, I'm dealing with a complex legacy application and do not have the option of doing a...
I have a MDB (Message driven bean) that receives messages with String which represent a word. Also I have a table in the database. The MDB should store in the table, the words and the number of times each word was received (counter).
The problem is that to get better performance the MDB started in many instances and when the same new wo...
In the j2ee applications I plan on standardizing the exception handling strategy. No more swallowing exceptions and basically converting all checked exceptions into unchecked (except for some that actually can be recovered from. The standard will be that all Exception will be thrown back up to the container (eg: http://www.onjava.com/pub...
I want to create a JSP page or servlet that will work in 2 ways.
A user visits their own profile page:
http//something.com/profile/
Or they visit their friends page:
http://something.com/profile/FriendsName
They could also visit their own page through an explicit URL like:
http://something.com/profile/YourName
I have a servlet-mapp...
I am trying to create a custom realm in Tomcat. My problem is that there is a SessionAttributeListener as part of the framework which checks to see if any object added to the session is serializable, and if it isn't it causes problems... like invalidating the session.
Because org.apache.catalina.realm.GenericPrincipal is not serializab...
User selects the number of files (could be in 100s or 100s)
User clicks on the Download link.
User is presented a popup to provide the path on the client machine where the files are to be copied.
After providing the path, user clicks on Save button on the popup.
All the files would be copied from the server to the specified path on th...
I need to design a web service layer on top of an existing application. Really, I'm most interested in WS-Security and JMS support, possibly JTA.
What is the best server to use for this? Would it be a wise decision to go with lightweight Tomcat (which I'm experienced with), or would I be better off with a server that implements the ...
Hi,
Lately I have been trying my hands on Eclipse IDE for java development. I am mostly a novice to java programming. I am trying a servlet project, using Tomcat5.5 as container. I am getting issues when I give import javax.servlet.* statement in my class files, as Eclipse complains that it cannot find that particular package. I am work...
Using NetBeans, I do the following in the class containing main(), and it works:
import javax.ejb.EJB;
public class Master {
@EJB
TestBeanARemote x;
public static void main(String[] args) {
Master m = new Master();
m.doStuff();
}
//doStuff includes x, but it works, so who cares.
...
If I do that in a ...
The standard data source configuration in JBoss requires the username and password of the database user to be in the xxx-ds.xml file. If I define my data source as a c3p0 mbean I encounter the same issue.
Is there a standard way to have the user and password encrypted? What is a good place to save the key?
This of course relevant to to...