cancel
Showing results for 
Search instead for 
Did you mean: 

cannot find jsp file error

Former Member
0 Kudos

Hello guys,

I was trying some HTMLB examples. I got a portal runtime error

<b>Portal Runtime Error

An exception occurred while processing a request for :

iView : N/A

Component Name : N/A

Cannot find JSP file: button.jsp.

Exception id: 11:48_11/05/06_0013_4374750

See the details for the exception ID in the log file</b>

The log file shows that the jsp file is not been found.

In fact, I have the JSP file in my project, built the project, and uploaded to the portal. Where am I missing?

Thanks in advance.

Vicky

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi vicky

Can you just post the code in your portalapp.xml file.

Have you added the component profile tag in that file.

Regards

Yoga

Former Member
0 Kudos

Hi Yoga, here is the xml file

<b><?xml version="1.0" encoding="utf-8"?>

<application>

<application-config>

<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>

</application-config>

<components>

<component name="ButtonExample">

<component-config>

<property name="ClassName" value="com.xyz.TestExample"/>

<property name="SecurityZone" value="com.uky.ButtonExample/high_safety"/>

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

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

</component-config>

<component-profile/>

</component>

</components>

<services/>

</application></b>

vicky

Former Member
0 Kudos

Hi vicky

Try this code and let me know the results.

<?xml version="1.0" encoding="utf-8"?>

<application>

<application-config>

<property name="SharingReference" value="com.sap.portal.htmlb"/>

</application-config>

<components>

<component name="ButtonExample">

<component-config>

<property name="ClassName" value="com.xyz.TestExample"/>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

</component-profile>

</component>

</components>

<services/>

</application>

Also, add the following code to the jsp file:

<%@ taglib uri="tagLib" prefix="hbj" %>

Regards

Yoga

Message was edited by: Yogalakshmi

Former Member
0 Kudos

Hi Yoga, still the same problem.

If you dont mind, can you give me a working example of JSP dynpage - like Button example ? I have gone through the example of PDK, but it is not working either on my NWDS. So, please test one and give me.

Thanks in advance.

Vicky

Former Member
0 Kudos

Hi Vicky,

The problem is not with the button.jsp.

pls check the following...

1)Pls put the following xml tags under <components> tag

<components>

<component name="Button">

<component-config>

<property name="ClassName" value="<b>Vicky Your Dynpage Name</b>">

</property>

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

</property>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld">

</property>

</component-profile>

</component>

2) In ur dynpage the way u call ur jsp

from doProcessBeforeOutput() method of ur dynpage u should call the jsp as

this.setJspName("button.jsp");

3) The jsp file is kept under dist\PORTAL-INF\pagelet

regards,

Sujesh

Former Member
0 Kudos

Hi Vicky,

The problem is not with the button.jsp.

pls check the following...

1)Pls put the following xml tags under <components> tag

<components>

<component name="Button">

<component-config>

<property name="ClassName" value="<b>Vicky Your Dynpage Name</b>">

</property>

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

</property>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld">

</property>

</component-profile>

</component>

2) In ur dynpage the way u call ur jsp

from doProcessBeforeOutput() method of ur dynpage u should call the jsp as

this.setJspName("button.jsp");

3) The jsp file is kept under dist\PORTAL-INF\pagelet

regards,

Sujesh

Former Member
0 Kudos

Hi vicky

I can send the tested par file to you which is perfectly working for me.Can you give your mail id?

Regards

Yoga

PS:Reward points for useful answers

Former Member
0 Kudos

HI yoga,

pls send to: doll_jolly@yahoo.com

Thanks in advance.

Vicky

Former Member
0 Kudos

Yoga, pls include the source code.

Thanks

Vicky

Former Member
0 Kudos

Hi vicky.

Here is the source code.It worked fine for me.

Button.java

============

package com.button;

import com.sapportals.htmlb.event.Event;

import com.sapportals.htmlb.page.DynPage;

import com.sapportals.htmlb.page.PageException;

import com.sapportals.portal.htmlb.page.JSPDynPage;

import com.sapportals.portal.htmlb.page.PageProcessorComponent;

import com.sapportals.portal.prt.component.IPortalComponentResponse;

public class Button extends PageProcessorComponent {

public DynPage getPage(){

return new ButtonDynPage();

}

public static class ButtonDynPage extends JSPDynPage{

public void doInitialization(){

}

public void doProcessAfterInput() throws PageException {

}

public void doProcessBeforeOutput() throws PageException {

this.setJspName("button.jsp");

}

public void onSubmit(Event e)throws PageException {

IPortalComponentResponse resp = (IPortalComponentResponse)this.getResponse();

resp.write("button has been created successfully");

}

}

}

button.jsp

===========

<%@ taglib uri="tagLib" prefix="hbj" %>

<hbj:content id="myContext" >

<hbj:page title="PageTitle">

<hbj:form id="myFormId" >

<hbj:button

id="button"

text="Click"

width="125px"

tooltip="Click here"

onClick="onSubmit"

design="STANDARD"

/>

</hbj:form>

</hbj:page>

</hbj:content>

portalapp.xml

==============

<?xml version="1.0" encoding="utf-8"?>

<application>

<application-config>

<property name="SharingReference" value="com.sap.portal.htmlb"/>

</application-config>

<components>

<component name="Button">

<component-config>

<property name="ClassName" value="com.button.Button"/>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

</component-profile>

</component>

</components>

<services/>

</application>

Regards

Yoga

Former Member
0 Kudos

Hi Yoga, I am unfortunate that it is not working for me.

The same kind of error:

<b>Portal Runtime Error

An exception occurred while processing a request for :

iView : ButtonTest.Button

Component Name : ButtonTest.Button

Cannot find JSP file: button.jsp.

Exception id: 02:19_12/05/06_0027_4374750

See the details for the exception ID in the log file</b>

Moreover, you have included

<b><component-config>

<property name="ClassName" value="com.cts.form.form"/>

</component-config></b>

What is it all about ?

- Vicky

Former Member
0 Kudos

Hi vicky

I havent included anything as you said.

Check it once again.

That code works fine for me.

Anyhow,i will send the par file to your id.

Regards

Yoga

Former Member
0 Kudos

Yeah, I cant see that part now. But, it came when I copied. Strange though.

Please send me the .par file.

Thanks in advance.

Vicky

Former Member
0 Kudos

Hi vicky

I have send the par file.

Check it and let me know the results.

Regards

Yoga

Former Member
0 Kudos

Hi Yoga, thanks a lot for your help so far. Here are the points for you.

Regards,

Vicky

detlev_beutner
Active Contributor
0 Kudos

Hi Vicky,

in the project you sent to me there simply was no JSP inside the PAR - and the JSP within the project was at the wrong place (it was to be found under /private/pagelet but it must be /dist/PORTAL-INF/pagelet (as already mentioned before in this thread).

Whereas the entry <i><property name="JSP" value="pagelet/button.jsp"></property></i> which is mentioned in this thread is absolutely superflous, for this is a property only used for JSPNative components.

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

Thanks a million. It did the magic. Yeah, the jsp file was at wrong place. I did place it under dist/PORTAL-INF/pagelet folder, and it is working fine now.

Regards,

Vicky

Answers (1)

Answers (1)

Former Member
0 Kudos

This has already been solved, but I had the same issue.

However, the JSP file was in the correct location.

The solution:

1. CLEAN the application from the portal (System administration --> Support --> portal Runtime --> "Portal Anywhere" Admin Tools --> Administration Console --> Archive Remover).

2. Upload the par file again.

That did the trick.

I just add this here, because I searched for the answer and this thread popped up. So other people who search for a solution for this issue can try this.

Cheers,

Edwin.