• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

WSAD with external HTTP Server

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have an enterprise application that uses a lot of static content in the form of shtmls. The application's target environment is IBM HTTP server and Websphere. The static content is served by the web server. I use WSAD for the development environment, which is not able to serve shtml content. I want to use IBM HTTP server for the static content in the dev environmnt and have the dynamic content served from WSAD. But I do not know how to configure IBM HTTP server to use the Websphere plugin to connect to WSAD. I have come across some sites which say that WSAD and IBM HTTP server can be used in the same style as we use IBM HTTP server and Websphere application server using WAS plugin. But there is no plugin-cfg.xml file for WSAD
Could someone advice me how to do this.
Thanks
 
author
Posts: 4229
33
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WSAD and WAS are two separate and independent applications (even more so in 6.0 with RAD and WAS), so technically its the WAS test environment you want to configure, not WSAD. WSAD itself does not run a server, it just launches the WAS server which can be configured independently of WSAD (or even with WSAD closed).
 
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can do this in the following way. The overall idea is that http plugin doesn't know whether its a wsad test server or full-blown was runtime that's serving the dynamic content as long as the ports its running on are valid.

Generate the appropriate plugin -

You can export the EAR file from WSAD (without the static content) and deploy it in WAS runtime. This exercise is to generate the plugin for httpserver. Make sure that you have the fileServingEnabled=false in the ibm-web-bnd.xmi file for the webmodule.

Referring to static content from within jsps -

When you refer to the static content in your WAS app, define a staticContentRoot in your web.xml that points to say /xyz/static/htmls/
When you need to refer to static content from your jsps, using ${staticContentRoot}/whatever.html.

HTTPServer config for redirecting urls to serve static content -

We used Alias construct to route the request accordingly.

Hope this helps.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In WebDeployment Descriptor - > Extensions - > File Serving Attributes
Add this.

Name: extendedDocumentRoot
Value: C:/MyApplication/webfiles/ , use it as per your web server static files directory setup.

in Development you can make servlet serving your static files, just like WebServer in production.

hope this helps
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A few notes on the extended document root that may be helpful. This is intended to be used when you want to serve JSPs or static content that are located outside of your Websphere App's root. For example, you may have them located under the web root, or anywhere else in the file system. You set the extendedDocumentRoot settings in the ibm-web-ext.xmi file. See an IBM document like: http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rweb_jspengine.html

What they don't tell you is that you cannot accomplish this by changing the ibm-web-ext.xmi file that is created in the WEB-INF directory of the location that you specified when you deployed your app (assuming that you are adding this feature after you have already deployed the app). You have to go to the location where Websphere has created its own deployed copy of the app in the "cell", and change the file there. Note that at this location, you can also make changes to the web.xml file, and you will not have to redeploy the app. For example, the xmi file on my server was located under:
C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\MyServerNode01Cell\applications\MyApp_war.ear\deployments\MyApp_war\MyApp.war\WEB-INF\
 
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic