ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Running the web app locally

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running the web app locally

    Hello All,
    I am new to using Websphere Development Studio Client for iSeries. I have just created a web application and would like to run locally. I just followed the instructions as follows:
    • Right-click the file you want to run and select Run As > Run on server.
    • [If this is the first time you are doing this, select Manually define a new server.
    • If you want this server to be the default, select the Set server as project default check box.
    • Select the server you want to use or define.
    • Click Finish to configure the test environment and launch the server.


    My web application has just a single index.jsp printing Hello WDSC! When I run it like this:



    it throws an exception like this:

    JSPG0036E: Failed to find resource /webapp/index.jsp

    Any idea what might have caused this?


    Thanks.
    TR
    Last edited by T Rai; September 22, 2009, 08:59 AM.

  • #2
    Re: Running the web app locally

    That link implies there is a folder called webapp with the index.jsp in but the error message implies that a servlet is forwarding onto index.jsp found in a folder called agiawebrnd?

    You need to check the web.xml document for the context root and check the directory structure. You also need to check that any forwarding is doing so to the correct locations.

    It's the kind of thing that as a beginner you have to fiddle with a bit to gain an understanding.
    Ben

    Comment


    • #3
      Re: Running the web app locally

      Thanks for the reply Ben.
      The agiawebrnd is a typo.

      I have not created a servlet yet. Just plain simple JSP to test that the deployement works. Here's what my web.xml looks like:

      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
      <web-app id="WebApp_ID">
      	<display-name>webapp</display-name>
      	<welcome-file-list>
      		<welcome-file>index.html</welcome-file>
      		<welcome-file>index.htm</welcome-file>
      		<welcome-file>index.jsp</welcome-file>
      		<welcome-file>default.html</welcome-file>
      		<welcome-file>default.htm</welcome-file>
      		<welcome-file>default.jsp</welcome-file>
      	</welcome-file-list>
      </web-app>
      It should be just as easy as running a web app in Eclipse or any other IDE. Not sure what the deal with WDSC. Do you think there are other more configuration that needs to be done?

      Thanks.

      Comment


      • #4
        Re: Running the web app locally

        WSDC basically is eclipse. The Java perspectives should be the same. I've only used the tomcat server so I can't really comment about the websphere server. It's always seemed overkill for what I wanted.

        Check which folder you created the JSP page in. It should be in the WebRoot folder.

        Check the projects context root. You set this up when you create the project.

        Must dash.
        Ben

        Comment

        Working...
        X