j2ee

How does one protect a webapp to be accessed only by localhost ?

I am planning to run a java web application and solr in the same java container. I want the web application to be publicly accessible but solr to be accessible only to the other web applications in the same container. Solr should be accessible only as localhost and not from outside. Can we write some rules in the web-xml to achieve this?...

Java wiki engine

There are plenty of java wiki engines http://java-source.net/open-source/wiki-engines I'm currently looking for good lightweight wiki , something like the community wiki on stackoverflow , that can be easily integrated into excising applications. Please write about something that you have used. ...

Fix external library ThreadLocal leak in WebLogic 10

In a web application running in WebLogic, we are using a (commercial) library which doesn't free the ThreadLocal variables it uses. Each time a method in the library API is used, some Kbs of information are leaked in the Thread that processes the request. We are in the way of getting rid of the library but, in the meantime, we would lik...

JSP Page Variable Caching

I've encountered a problem with JSP pages server-side caching. Suppose I have an internal error page which is a custom JSP that will display a unique ID each time it's visited/requested. This unique ID is also logged in the server log for debugging. However, I noticed that if I implement the error ID using: <%!private String <b>abc</b>...

WebLogic 8.1 two-way SSL authentication on a web app full example?

Does anybody has a WebLogic 8.1 two-way SSL full example? I am developing a small web application (1 HTML, 1 Servlet, 1 JSP) to send confidential data. The client could be a web browser. The server is WebLogic 8.1. The information should travel encrypted. Besides, the web application needs to authenticate the client, using more than a ...

How to compile EJB 2.0 programs for Glassfish without IDE?

I am using Sun Glassfish Enterprise Server 9.1. How can I compile EJB 2.0 programs without using any IDE? ...

Eclipse dynamic web project - MappingNotFoundException

I have a Eclipse Dynamic Web Project which host a simple servlet and runs on Tomcat. I use Hibernate within - I have classes that map to database tables and hbm.xml files for them within my project. Everything works fine - I can use Hibernate from Servlet and modify database tables through classes. But now I want to move my "model" (Java...

GWT and Hibernate - NoClassDefFoundError when using Hibernate

In my GWT service on server side I use Hibernate. When creating a SessionFactory I get following error: "java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please see the Google App Engine developer's guide for more details." What could be the reason? ...

RAD doesn't recognize changed MANIFEST.MF files (Rational Application Developer)

Hi All, I am part of a team that is working on a project that is under version control in ClearCase. This project is a single EAR, and 4 WARs as part of the EAR. Since all of the WARs use the same JARs, we store them in the \lib folder of the EAR, and then for each WAR, we reference the JARs in the EAR\lib folder in each WARs MANIFEST.M...

GWT app - deploying on Tomcat or any other servlet container

Hello Is there a plugin for Eclipse GWT or any other method to automatically deploy and run GWT app on Tomcat (or any other Serlvet container)? For the moment the only method I know is copying the compiled classes into WEB-INF directory but this is an arduous work. Additionally you have to configure Apache Tomcat manually. I'd like to h...

SQL Server JDBC Exception

When using ANT to build my Java application I keep getting this error. I have tried multiple times to use SQLJDBC.JAR and SQLJDBC4.JAR but continually receive this error message. I am completely stumpped why this error is received even after upgrading to sqljdbc4.jar. [javadoc] java.lang.UnsupportedOperationException: Java Runtime...

How to create a domain like "http://username.mysite.com" in a J2EE web application ?

Hi, I am a web application developer, just a beginner. I am designing a small J2EE web application (for example, the service name would be like http://www.mysite.com). It uses Apache Tomcat. Spec: When a user sign up into the web application, he will get a custom domain like http://username.mysite.com How can i accomplish this in my ...

How to create custom URL http://mysite.com/username in Glassfish?

I am designing a small J2EE web application (for example, the service name would be like http://www.mysite.com). It uses Glassfish. Spec: When a user sign up into the web application, he will get a custom URL like http://mysite.com/username instead of http://mysite.com?username=username&amp;userId=xxxx things i know is,this a part...

Eclipse J2EE plugin

I want an Eclipse J2EE plugin which I can install directly from Eclipse. I searched about it on Google and found some ones but couldn't figure out how to download them directly from Eclipse. One plugin I found was WTP but couldn't find the location of the WTP repository that I can enter in the Eclipse's Software Update tool. I am usin...

How to deploy a Java Web Application (.war) on tomcat?

I have a .war file of a Java Web Application. Now I want to upload it to my ftp server so that I can execute it. What steps I should perform to run it? The context path of the webapp is /mywebapp Edit: Actually, my ftp server name is ftp://bilgin.ath.cx/ and I have uploaded my "TestWebApp.war" file to this dir: ftp://bilgin.ath.cx/we...

Eclipse JEE IDE not supporting javax.servlet package

I downloaded Eclipse JEE IDE to build Java Web Applications (servlets and jsp pages). But it still not supporting javax.servlet package. Why? What's the reason? Is there any plugin that I need to install? ...

JDBC: Oracle Application Server and "The Network Adapter could not establish the connection" error.

I am getting the error: "The Network Adapter could not establish the connection" from a web application deployed in Oracle Application Server 10g. The database is local, so there shouldn't be any connection issues. First test: I can connect to the DB no problem from SQL plus, run queries, etc. Second test: I can connect to the database...

How does Spring resolve views?

I've been having a little trouble with View Resolution under Spring 2.5.5. Basically I'm just trying to show my view with a message from the controller passed in. The issue comes when the Controller returns the ModelAndView but the DispatcherServelt says it can't find a Handler. All the files seem to be in the correct place. I think the...

iBatis 3 - JNDI configuration example

The iBatis framework has been significantly tweaked between versions 2 & 3, so much that even the config file (now often referred to as MapperConfig.xml) is different. That being said, there are lots of examples online on how to create a JDBC connection pool with iBatis, but I couldn't find one example on how to do it with JNDI. There ...

How exception propogates when EJB2.0 is used on Jboss 4.0.2(windows XP)?

public interface HelloWorldHome extends javax.ejb.EJBHome{ public void create() throws java.rmi.RemoteException, com.MyException; --This is a BMP-- public class HelloWorldBean implements EntityBean{ ----implemented methods---- public HelloWorldEntity ejbCreate() throws com.MyException{ throw new MyException("This is explicitly...