File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes How embed jsp engine config in websphere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "How embed jsp engine config in websphere" Watch "How embed jsp engine config in websphere" New topic

How embed jsp engine config in websphere

Basil Dsouza

Joined: Jun 30, 2008
Posts: 2

I am using websphere Base, and I need to enable source level of 1.5 for compiling JSPs.

I found the answer to that question on this forum:

However the solution described in this requires it to be performed every single time the application is deployed and on every server that it is deployed on.

Another solution i found was to upgrade the server to and then follow these instructions:

However, that will set the source level to 1.5 on a global scope, thus affecting every single application deployed on that server instance.

So my current question is,
Is there a way to perform the former solution, but embed those files (ibm-web-ext.xmi) into the EAR (or preferably by only using a WAR) ?

I have seen sample applications with these files included, but i have not understood how to do it myself.

Also, i am not using any WebSphere related IDE, and would be creating the EAR by ANT and the config files by hand.

Any help would be appreciated.

Dont Panic !!!<br /> <br />Basil Dsouza<br /> <a href="" target="_blank" rel="nofollow"></a>
Basil Dsouza

Joined: Jun 30, 2008
Posts: 2
I think i found the answer to the problem myself. And am posting here to help any one else who comes across the same problem.

I could find no documentation on how to setup the custom configurations for WebSphere. All of the documentation explains how to modify those settings, after the application/WAR is deployed. Which means it has to be done every time. My assumption is that most of the people targeting WebSphere use a WebSphere specific IDE like RAD or something to do this configuration for them.

Since I donot develop specifically for WebSphere and RAD is rather expensive, I found an alternative in Netbeans.

This is how it works:
(Applicable for Netbeans 6.x and Web Sphere 6.x)
1. Add a WebSphere server to the list of servers in netbeans
2. Create a new Web Project from netbeans and in the server selection screen use the WebSphere server.
3. Netbeans will generate the netbeans specific configuration files (ibm-web-bnd.xmi and ibm-web-ext.xmi)
It will also provide you a GUI to configure their values.
4. Once you have configured their values, copy those 2 files to the WEB-INF folder of your project.
(The names of the 2 projects donot matter, because nowhere in the 2 files is the name of the Web Application mentioned.)
5. To add any JSP attributes or any other parameter in these files. Just make the modifications. The 'ids' need not be in sequence. They just need to be unique
(The reason I mention this is because the way the IBM help files display the help makes it seem like it is required to be in a numerical sequence.)
6. Ensure that they 2 files get packed into the WAR
7. When deploying the WAR in WebSphere ensure that you select "Use Binary Configuration" (It is on the second screen of installing)

Now the configurations should be in effect. In my case i could confirm it becasue my JSPs started compiling with java 1.5 constructs, and i set the source level for JSPs to 1.5 via those config files.

Hope this helps.
I agree. Here's the link:
subject: How embed jsp engine config in websphere
It's not a secret anymore!