tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TO_Val...@BelPost.by
Subject RE: can servlet interact with html file in someplace other than c urrent servlet context?
Date Tue, 25 Feb 2003 06:35:04 GMT
Morning!

Your code wouldn't work. 

Servlet should before to get context of the another webapp.

.............
ServletContext webapp2context =
this.getServletContext().getContext(uri_path_to_wevapp2);

webapp2context.getRequestDispather("some_target_in_webapp2").forward(request
,response);
.............

Hope it help you.
============================================
BeSt ReGaRdS level0 icq#155042687
-----Original Message-----
From: Xiongfei Wang [mailto:wangxf@arches.uga.edu] 
Sent: Tuesday, February 25, 2003 5:46 AM
To: Tomcat Users List
Subject: can servlet interact with html file in someplace other than current
servlet context?

My current servlet context is in
/home/jp/reg
I have a login(login.java) servlet in this context
In login.java i have code like 
------------------------------------------------------------
 private static final String TARGET_FILE="/var/www/index.html";
 if(  )
{
 (req.getRequestDispatcher(target)).forward(req,res);
        return;
}
----------------------------------------------------------------
t
his code does not work because index.html is outside /home/jp/reg

Is there a way i can let login servlet interact with index.html?

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message