HI, there is a context-root tag in our application xml when we make a ear . what i need to do is to take this context root into my jsp and servlets so that if atall one makes a mistake in the application.xml while giving the context root the jsps, servlets or any webApp component can still trace each other.. ~Dee
Joe McGuire
Ranch Hand
Joined: Mar 19, 2001
Posts: 293
posted
0
Deep, I found some info in the BEA docs that may give the answer to what you're trying to do. If you deploy a Web Application as part of an Enterprise Application, you can specify a string that is used in place of the actual name of the Web Application when WebLogic Server resolves a request for the Web Application. You specify the new name with the <context-root> element in the application.xml deployment descriptor for the Enterprise Application. For example, for a Web Application called oranges.war, you would typically request a resource from the oranges Web Application with a URL such as:
http://localhost:7001/oranges/catalog.jsp If the oranges Web Application is packaged in an Enterprise Application, you can specify a value for the <context-root>, such as "fruit," shown in the following example:
HI Joe, thanx..thats exactly what i have done but then on i stumbled onto another problem. MAy be not related to this forum. Whats happening is say take ur example of fruit being the context root. what i do is write the uri in my index.html as /fruit/jsp/Login.jsp. so when i type http://localhost:9001/fruit the login.jsp is called. Then when the user presses on the ok button the submission is made to the login servlet which (after whatever validations reqd. ) forwards the request to a Main.jsp using requestDispatcher("/fruit/jsp/Main.jsp") but when i do this it gives a weird display "HTTP POST mathod not supported by this url"...i have no idea why?? but if use "/jsp/Main.jsp" it works fine...