2 Replies Latest reply on Mar 30, 2006 11:33 AM by sylobsa

    Problem to define the base URL of my web app

      Hi all,

      I use JBoss 3.2.6 + Struts.
      I deployed a web app MyWebApp

      To use it I have to type the URL :
      http://localhost:8080/MyWebApp/start.do

      Does anybody knows which files I have to configure and how to have the URL :
      http://localhost:8080/

      Regards

        • 1. Re: Problem to define the base URL of my web app


          Complements :

          I modified
          MyApp.ear/META-INF/application.xml
          ==>


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



          MyApp.ear/MyWebApp.war/index.jsp
          ==> line added
          <logic:forward name="welcome"/>

          MyApp.ear/MyWebApp.war/WEB-INF/struts-config.xml
          ==>
          <global-forwards>

          </global-forwards>


          Now I get the following error message :



          HTTP Status 500 -

          --------------------------------------------------------------------------------

          type Exception report

          message

          description The server encountered an internal error () that prevented it from fulfilling this request.

          exception

          javax.servlet.ServletException: Exception redirecting for name welcome: java.lang.IllegalStateException
          org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
          org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
          org.apache.jsp.index_jsp._jspService(Unknown Source)
          org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


          root cause

          javax.servlet.jsp.JspException: Exception redirecting for name welcome: java.lang.IllegalStateException
          org.apache.struts.taglib.logic.ForwardTag.doRedirect(ForwardTag.java:152)
          org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:103)
          org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(Unknown Source)
          org.apache.jsp.index_jsp._jspService(Unknown Source)
          org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


          note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

          Any idea ?
          Did I miss a file ?

          Regards

          • 2. Re: Problem to define the base URL of my web app

            Argh !!! All xml excerpt have disappeared. Sorry for this mistake.

            Here is the complete message :

            I modified
            MyApp.ear/META-INF/application.xml
            ==>

            <module id="myeclipse.1110128383921">
             <web>
             <web-uri>MyWebApp.war</web-uri>
             <context-root>/</context-root>
             </web>
             </module>
            



            MyApp.ear/MyWebApp.war/index.jsp
            ==> line added
            <logic:forward name="welcome"/>
            

            MyApp.ear/MyWebApp.war/WEB-INF/struts-config.xml
            ==>
            <global-forwards>
             <forward name="welcome" path="/start.do" redirect="true" />
             </global-forwards>
            

            Now I get the following error message :



            HTTP Status 500 -

            --------------------------------------------------------------------------------

            type Exception report

            message

            description The server encountered an internal error () that prevented it from fulfilling this request.

            exception

            javax.servlet.ServletException: Exception redirecting for name welcome: java.lang.IllegalStateException
            org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
            org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
            org.apache.jsp.index_jsp._jspService(Unknown Source)
            org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


            root cause

            javax.servlet.jsp.JspException: Exception redirecting for name welcome: java.lang.IllegalStateException
            org.apache.struts.taglib.logic.ForwardTag.doRedirect(ForwardTag.java:152)
            org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:103)
            org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(Unknown Source)
            org.apache.jsp.index_jsp._jspService(Unknown Source)
            org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


            note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

            Any idea ?
            Did I miss a file ?

            Regards