dcsimg
Passing control to a newly compiled servlet
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Gary_Lundie
Posted On:   Tuesday, December 7, 2004 04:44 AM

Hi, I have recently developed a servlet which is activated when a call to a scala servlet page (*.ssp) is made. The servlet converts the servlet page to a scala servlet, compiles it and stores the compiled class in WEB-INF/classes. This is more or less what jasper does in java, but this servlet is for the experimental language scala. Having compiled the page to a class though, I am having trouble passing control to the new servlet. I am using the getResquestDispatcher.forward() method, but the problem is, I need to add entries by hand to the web.xml file in the directory. Is there anyway to bypass this (I have tried using the invoker)? Or, could anyone tell me how I would go about writing a method into my servlet which w   More>>

Hi,


I have recently developed a servlet which is activated when a call to a scala servlet page (*.ssp) is made. The servlet converts the servlet page to a scala servlet, compiles it and stores the compiled class in WEB-INF/classes. This is more or less what jasper does in java, but this servlet is for the experimental language scala.


Having compiled the page to a class though, I am having trouble passing control to the new servlet. I am using the getResquestDispatcher.forward() method, but the problem is, I need to add entries by hand to the web.xml file in the directory.


Is there anyway to bypass this (I have tried using the invoker)? Or, could anyone tell me how I would go about writing a method into my servlet which would add an entry to the web.xml file?


Thanks for the help folks.


Gary

   <<Less

Re: Passing control to a newly compiled servlet

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, December 11, 2004 08:11 AM

Even if you could write to the deployment descriptor file, I think you would also have to update the object representing it in the servlet container, and also stop and redeploy/restart your web application, for changes to take effect.


Some servlet containers/app servers have an admin console which lets you update anything in the web app deployment descriptor on the fly (Weblogic), but others do not (I don't think WebSphere does this, etc.).


I think this is entirely an implementation-dependent thing up to the vendors, not part of the J2EE specs at all? and it can lead to complicated problems anyway, if it allows you to change things that really do need everything to be dumped and reloaded again, with stuff in parent class loaders etc. at issue....
About | Sitemap | Contact