[jboss-user] [Beginners Corner] - Forwarding to myapp.war from JBoss wellcome page

mablaev do-not-reply at jboss.com
Tue Feb 3 06:04:17 EST 2009


Hi all!

I newbie in JBoss and use 4.2.3 GA version.

How I can forward all request that comes to JBoss Wellcome page to myapp.war?

I try to use index.jsp in JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war in order to switch to myapp context by using following code:

  | <%@ page language="java" contentType="text/html; charset=UTF-8"
  |     pageEncoding="ISO-8859-1"%>
  | 
  | <% ServletContext ctx = application.getContext("/myapp");
  |        if(ctx != null){
  |           RequestDispatcher rdpt = ctx.getRequestDispatcher("/index.html");
  |           if(rdpt != null){
  |             rdpt.forward(request, response);
  |           }
  |         }
  | %>
  | 
  | 

Instead forwarding to myapp/index.html it show me page with error 404:

The requested resource (/myapp/index.html) is not available.

Where my problem?

Thanks a lot.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206488#4206488

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206488



More information about the jboss-user mailing list