1 Reply Latest reply on Mar 19, 2004 11:59 PM by Richard Bottoms

    how to display a jsp page using jboss under linux?

    Srikanth Kondeti Newbie

      Hi
      I am a beginner to JBoss
      I am working in linux RedHat 9.
      I have installed jboss3.2.3 as a web server and have saved a my welocme.jsp file in the path:
      ..../jboss-3.2.3/jsp/welcome.jsp
      the code in the welcome.jsp is just:



      <%=out.println("Welcome to JBoss World "); %>




      I run the jboss and then try to open the file in browser by this url:

      http://localhost:8080/jsp/welcome.jsp

      but in the browser I see the error:

      HTTP Status 500 - No Context configured to process this request
      type Status report
      message No Context configured to process this request
      description The server encountered an internal error (No Context configured to process this request) that prevented it from fulfilling this request.

      ----
      please give me an idea where should I place the .jsp file and What Context its not configured?
      Do needful.


      Thanks.
      Srikanth

        • 1. Re: how to display a jsp page using jboss under linux?
          Richard Bottoms Newbie

          Create directories
          c:\app
          c:\app\META-INF
          c:\app\code
          c:\app\code\META-INF


          Create a file c:\app\code\META-INF\web.xml

          This is web.xml:
          <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

          <web-app>
          </web-app>

          Create a file c:\app\code\index.jsp

          This index.jsp:

          <%=out.println("Welcome to JBoss World "); %>

          cd c:\app\code\
          Issue the command:
          jar -cvf c:\app\indexdv.war META-INF/*.xml *.jsp

          cd c:\app
          Create file c:\app\META-INF\application.xml

          This is application.xml:
          <?xml version="1.0" encoding="UTF-8"?>


          <display-name>index</display-name>


          <web-uri>indexdv.war</web-uri>
          <context-root>/</context-root>




          Issue the command:
          jar -cvf indexdv.ear META-INF/*.xml indexdv.war

          Copy indexdv.ear to %JBOSS_HOME\server\default\deploy

          http://localhost:8080/index.jsp now works

          You can add subdirectories, graphics and any other files here:
          c:\app\code

          Be sure to amend the jar command to add those directoris like:
          jar -cvf indexdv.war META-INF/*.xml ce/*.* css/*.* ads robots.txt *.htm *.html *.jsp

          You can also amend the content root to something besides root:
          <context-root>/jsp</context-root>