cancel
Showing results for 
Search instead for 
Did you mean: 

iview ComponentType servlet

darrell_merryweather
Active Contributor
0 Kudos

I am trying to create an iview which extends the HttpServlet. I have managed to create and deploy this component to the EP6 SP2 Patch27 portal that I am running, however, when I run it it appears that the path it is trying to connect to is always /sevlet.jsp.

This is a bit silly as I want to be able to call any URL I like in my servlet, as you would do in any servlet.

Has anyone achieved this before or is there some workaround ?

Thanks

Darrell

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Darrell,

sorry, I don't really get your question. You want to write and deploy an ordinary servlet on EP. But when creating your iView based on you PAR, instead of launching the servlet code, it unsucessfully tries to access some "servlet.jsp"? Is this right?

This sound very much like an incorrect configuration of the portalapp.xml deployment descriptor to me. Could you please provide the file and post it here?

Regards,

Dominik

darrell_merryweather
Active Contributor
0 Kudos

This is correct. I have created a very basic servlet which should be able to get the path that was executed, i.e ....../myservlet/myfile.jsp for example. The servlet will then forward the request, via a RequestDispatcher to the relevant JSP page. I don't want to created a jsp-native component as there are many JSP pages that will eventually need to be accessed. When I access my servlet through the portal

/irj/servlet/prt/portal/prtroot/MyServletcomponent.MyServletComponent

I have written the servletPath to the stdout and it returns /servlet.jsp. The full path it appears to be looking for is actually /irj/servlet.jsp, which is even worse as I don't want to put any jsps in the irj root.

The portalapp.xml is as follows

<application>

<application-config/>

<components>

<component name="MyServletComponent">

<component-config>

<property name="ClassName" value="com.sap.sdn.servlet.MyServletComponent"/>

<property name="ComponentType" value="servlet"/>

<property name="SecurityZone" value="com.sap.sdn.servlet/high_value"/>

</component-config>

<component-profile/>

</component>

</components>

<services/>

</application>

Also, do I not need to worry about the web.xml file that you would normally have for a servlet ?

Thanks for your help

D