j2ee

How to output a binary document based on a HTML document using filters in Java

This may be a little confusing but I having some trouble. My goal is to take an input HTML document and then process that document and use the HTML data to output a image document. For example, a user will request a URL, with some action=png in the querystring and then the filter will get invoked for the URL and output image document. ...

Using Spring Pitchfork to have JEE compliant code that runs in non-JEE container

I am facing the decision to abandon Java EE 5 (JEE) container to use web container instead (with Spring). According to Interface21 Spring Pitchfork allows elements of the JEE programming model to be used in Spring. Thus, I get a subset of JEE annotations inside of Spring container. Since I prefer to maintain compatibility with JEE this l...

How to get started with GRAILS on an existing J2EE app?

I'm new to grails. I'd like to give it a whirl by implementing a new feature or two into an existing J2EE application. The current J2EE app is a fairly standard Spring MVC/Hibernate app running on Tomcat. Looking through the documentation, it looks like I should be able to leverage all of the current business logic that's written in J...

Share static singletons through EJB's

I'm trying to create a cache in a webservice. For this I've created a new Stateless Bean to provide this cache to other Stateless beans. This cache is simply a static ConcurrentMap where MyObject is a POJO. The problem is that it seems as there are different cache objects. One for the client beans, and another locally. -CacheService -Ca...

How can I make Tomcat pre-compile JSPs on startup?

We're using both Apache Tomcat 6.0 and Jetty 6 where I work. We mostly use Jetty for testing (it's great for running embedded in JUnit tests) and Tomcat for production. By default, Tomcat compiles JSPs on-the-fly as users request them. But this results in degraded performance for the first hit. It also highlights bizarre bugs in Tomc...

OC4J EAR file format - support jar files

I've worked with JBoss and WebLogic before, but this is the first job I've been at where we've used OC4J. We're using version 10.1.2.0.2, but using JRE 1.4.2. I'm creating an EAR file, complete with one WAR file and one EJB file. Instead of entity beans, we're using Spring/Hibernate to access the db, so the EJBs are session beans. The qu...

How to access client system in LAN by using JSP?

Hi, I want to get data from a LAN system by using JSP. How can I make the connection between two systems? Thanks in Advance ...

Choosing embedded EJB 3.x container to run JEE 5 app on Tomcat

I am sorry in advance if my question sounds too generic - I am doing all preliminary research myself but nothing substitutes real experience... My goal is to port a legacy JEE application (pre-EJB 3.x) to Tomcat with embedded EJB container. My choices currently stand as follows: JBoss Embeddable EJB Apache OpenEJB OW2 Consortium EasyB...

Simplest way to expose a given method as a web service - result must be runnable in web container under Java 5

I am in a situation where I need to expose a Java method as a web service, and I need to choose the technology to do so and I am basically a bit bewildered. The requirements are: Must be runnable in an IBM Java 5. Must be deployable as a web application inside an embedded Jetty (currently version 6) Must be detachable from an IDE (has...

Best performing way to guarantee data consistency between concurrent web service calls?

Multiple clients are concurrently accessing a JAX-JWS webservice running on Glassfish or some other application server. Persistence is provided by something like Hibernate or OpenJPA. Database is Microsoft SQL Server 2005. The service takes a few input parameters, some "magic" occurs, and then returns what is basically a transformed ver...

Looking for a .NET 3.5 / J2EE architecture concept comparison article/chart

We are thinking about combining .NET technology with Java technology (WCF, JBoss/ESB, MOM, WPF, WF) and I need to have a high-level idea of what are the apples and oranges in the .NET 3.5 and Java worlds. Does anyone know of a good, clear article or better yet a simple chart which answers questions such as: WCF in the Java world is _...

Printer Friendly Pages With a Header on Every Page?

I'm working in a J2EE environment with a web app that displays large amounts of tabular data. We want to be able to print these tables with each page displaying the header and footer. I understand some browsers support this through the thead,tbody,tfooter tags, but the users are using IE6 only. A row is normally only one line but on o...

How to read the web.xml from a WebApp

For WebApps, web.xml can be used to store application settings. How can I read this file. My servlets run in a GlassFish v2 server. ...

Best practices for performance benchmarking test..

I have a J2EE web-application running on Sun hardware with OpenSolaris/Glassfish stack. We're starting our performance benchmarking tests, to prepare for our scalability requirements later. Any guidelines/best practices would be very useful.. ...

Getting struts s:url includeparams to work on jboss when deploying as ROOT.war

I'm working on a webapp that uses struts 2, spring, URL Rewrite Filter and a couple of other dependencies that I'm not sure are relevant to this. One of the url's we construct is constructed as follows: <s:url id="blah" includeParams="get"> This works fine when deploying in jboss as a normal webapp dropped in deploy/. So then all urls...

ADF Custom Components

Where is the best place to find custom compnonents? Ideally a repository, as opposed to finding a few here and there. We are currently about to re-design our look and feel UI for about 200 forms and we were hoping to find a lot of custom components... We were told they were everywhere by the pre-sales architect but even a simple google s...

Glassfish in real world

Are there any companies/web-sites that use Glassfish in production? I am new to J2EE and deploy JRuby on Rails alongside a JAX-WS Metro application in Glassfish v3 Prelude. Sometimes the quirks make me go WTF and rip my hair out. I haven't had experience with Apache Tomcat and was wondering if it makes sense to switch to Tomcat, as Glas...

j2ee development environment?

I'm starting a j2ee project and I was trying to see if it's beneficial (and how to) setup a local j2ee server to test on, much like the .net development server runs. I have a development spot in our enterprise development server, which is where I'll do most of my testing, but I was just curious if there was any benefit to having a local...

How to use a property-file with GlassFish

I'm creating a web service, which run in GlassFish, and I want to have some custom properties. For this I'm using the Properties class. The code I'm using is: Properties p=new Properties(); File f=new File(System.getProperty("user.dir"), "settings.properties"); p.load(new FileInputStream(f)); But how do I get the settings.properties-f...

What are good practices for unit testing J2EE/Web applications

What are the best ways to test servlet oriented web applications. With possibly jdbc backed backends. Front-end = Struts2 and some servlets Back-end = hibernate, some basic jdbc ...