aspose file tools
The moose likes Websphere and the fly likes WSAD with external HTTP Server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Websphere
Reply Bookmark "WSAD with external HTTP Server" Watch "WSAD with external HTTP Server" New topic
Author

WSAD with external HTTP Server

Bondu Sam
Greenhorn

Joined: Jan 24, 2003
Posts: 8
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
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3652

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


My Blog: Down Home Country Coding with Scott Selikoff
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 645
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.
Jsoft Developer
Greenhorn

Joined: Dec 05, 2005
Posts: 2
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
Patrick Finnegan
Ranch Hand

Joined: Mar 05, 2002
Posts: 179
If those solutions don't work try this.

http://groups.google.com/group/ibm.software.websphere.studio.application-site-developer/browse_thread/thread/86def3bda261b8db/2af0ddaed5b2092b?lnk=st&q=group%3A*websphere*+author%3Afinnegan&rnum=28&hl=en#2af0ddaed5b2092b
Greg Burdett
Greenhorn

Joined: Jan 23, 2003
Posts: 4
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\
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: WSAD with external HTTP Server
 
Similar Threads
Problem of Serving static content
Unable to upload files to websphere.
static content separation
MVC question
Can't update web server plugin in WSAD 5.1