java-ee

Groovy, Netbeans and Java EE

Hello everyone, I want to develop a web application (no frameworks) mixing java with groovy. I am using the IDE Netbeans with the plugin. If I start a new Java SE project and add a groovy class, it works with no problems.. but when I create a new java EE project and add a groovy class it can't compile and shows me the following error: ...

Project architecture/organization on Java EE application with EJB 3.0, JPA, Dynamic web projects on JBoss

I have a webapp with different Dynamic Web Projects, each of them generally containing an EJB Project. We want to keep them interacting, as in using beans and classes from each other's EJBs through JNDI, sharing the same database or using their own. But we also want to be able to keep different projects on different servers. What would ...

Calling stored procedure from web application on UNIX throwing error on xp_cmdshell

Hey all, I'm pulling my hair out on this one. I've checked all my permissions, on both the database server (SQL Server 2000) and the file system to ensure that what I am trying to do should be possible. Here's the situation: I have a Java EE web application running on a Tomcat server on my company's intranet. Long story short, this app...

How to provoke a timer trigger in glassfish?

We need some consistency in our functional test cases. The best we can do currently is to wait for an estimated time before the JEE timers in the product should have been triggered. It would be much more predictable if the test cases could trigger the timers programmatically, probably with JMX. How can this be done? Is there a JMX inter...

JEE6 release date

JEE 6 looks exciting. It will include the Servlet 3.0 spec, EJB3.1 Lite, Profiles, JSF2.0 Restful API, JPA2.0 and the WebBeans. I tried to google the scheduled release date for the platform but could not find anything official. Anyone? Or is it just the way it works? As soon as all the JCP expert groups finish the specs will it be offici...

What is the standard way to handle url-mapping for JavaServer Faces?

All the tutorials I have seen seem to use *.jsf, *.faces, or /<directory_name>/* for the url-pattern in the Java Server faces servlet mapping. Is there some official sun-recommended naming convention or de-facto standard? ...

How do you measure/estimate size of XML programming effort?

To set the scene - I work in one of those industries that loves estimating and tracking pretty much everything. One of our key metrics is SLOC (source lines of code - declarative and executable statements). We use it for project size and cost estimation, project planning, and many other things. We try to use it to compare apples to ap...

URL Pattern for servlet mapping in web.xml

I need a workaround with this URL mapping in web.xml to create URLs with a letter, followed by a "_" followed by any combination of alphanumeric characters. I want to map a servlet to something like this: /something_* Instead of: /something/* Using different "somethings" for different JSP's. Example: /search_Something-I-searched...

sun-appserver-ee8.1_02 java.lang.StackOverflowError

I encounter this error after deployment of the java web application (.war). If i remove the server.policy file. I will not encounter this error however it means that there will be no security. I realize that the error will occur if i include the following in server.policy which by default is included permission java.lang.RuntimePermissio...

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...

Where exactly did you get the ServletUtils class in StaticServlet?

What exactly is the package location of the ServletUtils class in StaticServlet and what does it do? ...

Is the SCWCD still worthwhile, and if so, how to prepare?

If you have taken the Sun Certified Web Component Developer certification, or otherwise know a lot about it, how would you rate its usefulness? How does it compare with SCJP or SCJD, for example? (Note: SCJP specific discussion can be found e.g. here and here.) As someone considering taking the SCWCD, I'd hope it would improve my unders...

Basic question about servlet mapping

Hi, I am new to J2EE and related stuff in general. I am trying to move a particular web application from a Sun One server deployment on to JBoss. The application is filled with a lot of servlets where each one re-directs to another. There are way too many servlets for me to enter a mapping between each of these servlet class to a URL-ma...

Servlet long processing cancelation when browser closes.

Hi, I have a servlet which processes a request for a long time. It suppose to keep doing stuff in the loop inside doPost and send data through response's out writer. Effectively that continuously appends data in the clients browser . But the problems accures when client just closes the browser. Inspite of the broken connection the respo...

Error deploying an app to JBoss 5 that was working fine on JBoss 4.2

Im trying to deploy an application (.ear file) to JBoss 5, and I'm receiving the following error. The app deploys fine under 4.2.2. 15:31:33,172 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/ASE/ext/jboss-5.0.0.GA/server/all/dep loy/UGC-WS.ear state=PreReal mode=Manual requiredState=Real org.jboss.deployers....

Do I have to include libs in every tile within Apache Tiles?

I am using Tiles within my web-application. I have a standard-layout (standard.jsp) within the tiles are used. On top of the standard.jsp are a lot of includes, concerning tag-libraries and such. Let's do a simplified example. standard.jsp: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ inc...

Pausing in between Retries of Network Connections

Im am writing an application for the JBOSS JEE-Server. I would like to have the DB-access code quite robust. Thus I have created retry loops so that the request won't fail because of temporary network problems. Now I would like the execution of the request to pause in between retries. The server thread has been spawned by a request to a...

Why does getRealPath() return null when deployed with a .war file?

Hi, getRealPath() is returning the actual path in the local system, but returns null when deployed with a .war file. <%@ page import="java.io.*" %> <%@ page contentType="text/html;charset=ISO-8859-1" %> <% int iLf = 10; char cLf = (char)iLf; String a= application.getResource("/"); //String myfile = application.getRealPath("/")+ "gener...

Java Security Framework

Security always tends to take the last place in a new project. Or you use a framework like Spring where security is already build-in and can be switched on easily. I try to find an open security framework that can be plugged-in to both Swing and Web applications (and JavaFX?), maybe easy to digest. I looked at plain JAAS, JGuard and JSec...

javaEE application layout

I've been tasked with writing a new webapp in javaEE, which will be a first for me. I'm familar with the java language, but all of my previous projects have been in .net. So I've downloaded netbeans and I'll probably be using Hibernate, and started digging in. My question is, what's the best way to lay out a javaEE app? Should all da...