Accessing a servlet from a DSP

Hi,

I have a scenario where i am trying to access a servlet that is cotained as part of the custom webapplication (deployed using wMTomcat) from a DSP which is present in the same package. If i invoke a servlet from a JSP everything seems to work fine, however nothing seems to happen if i invoke the same servlet from the DSP. Since it is in same package i dont want to use the entire URL i.e. http://hostname:port/web/packageName/servletName . If i access the servlet directly as servletName from a JSP, it works fine.

I don’t believe this is possible. A DSP doesn’t access servlets. The only thing they can do is invoke IS services. DSPs use a different processing engine than JSPs.

Thanks Reamon. I was just hoping that there would be some means of accessing a servlet direclty from a DSP.

You can very well invoke a Servlet from DSP … Reply back if you are still looking for the solution… as this post seems to be a bit older …

Can you provide details?

Below is the tag syntax(.with example) in the DSP page from where you are going to invoke servlet… …

<FORM name="form1" 
method="GET" action="/web/MY_ENTERPRISE_MONITOR/DownloadFile?FILE_PATH=%value Filepath%&FILE_NAME=%value filename%">

Where “DownloadFile” is the servlet name and “MY_ENTERPRISE_MONITOR” is the packagename … As usual , servlet class file will be copied into “\web\WEB-INF\classes” folder in package level …and configure web.xml file …

"filepath" and  "filename" are the variable values we are passing to Servlet and in servlet, we retrieve them using    request.getParameter("FILE_PATH");

 My "DownloadFile"  servlet has code to  download the file from the path that we pass as a parameter from DSP ...

  So when we hit on submit button in the dsp , it will invoke the given servlet, as mentioned in the action variable of <FORM> tag, passing filename and filepath as parameters and will download the file......