Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with a jsp script

Hi everybody,

I'm trying to write a JSP script, that redirects to a website depending on a given parameter (Language). Therefore I made an abstract portal component with the developer Studio and exported this as a par-file.

The problem is that I always getting an this error when I'm testing the script:

Error occurs during the rendering of jsp component.

This is my jsp-code:

<%

String lang = (String) request.getParameter("lang");
String url;

if ("de".equals(lang))
{
    url = "http://www.google.de";  
    response.sendRequest(url);
}
else
{
    if ("en".equals(lang))
    {
        url = "http://www.google.com";
        response.sendRequest(url);
    }
    else
    {
        url = "http://www.google.es";
        response.sendRequest(url);
    }	
}

%>

and this is my portalapp.xml:

<application>

<application-config>

<property name="ServicesReference" value="" />

<property name="releasable" value="true" />

</application-config>

<components>

<component name="Redirect">

<component-config>

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

<property name="JSP" value="pagelet/redirect.jsp" />

<property name="SafetyLevel" vaule="low_safety" />

</component-config>

</component>

</components>

<services />

</application>

I'd really appreciate it if anyone could help me out.

Thank you very much in advance

Regrads

Norbert

Former Member
Not what you were looking for? View more on this topic or Ask a question