wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "How embed jsp engine config in websphere" Watch "How embed jsp engine config in websphere" New topic
Author

How embed jsp engine config in websphere

Basil Dsouza
Greenhorn

Joined: Jun 30, 2008
Posts: 2
Hello,

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

I found the answer to that question on this forum:
http://www.coderanch.com/t/78974/Websphere/only-available-if-source-level

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 6.1.0.15 and then follow these instructions:
http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg1PK55810

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="http://www.basildsouza.com" target="_blank" rel="nofollow">http://www.basildsouza.com</a>
Basil Dsouza
Greenhorn

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.
 
 
subject: How embed jsp engine config in websphere
 
Similar Threads
error code 500 and java.lang exceptions in WebSphere
Cannot start Websphere Portal
Websphere 6.0, JSP include, JSP taglib
Websphere 6.0.0 Fix Pack 2
WAS 6 upgrade and new jsp errors!!