cancel
Showing results for 
Search instead for 
Did you mean: 

problem in rendering jsp component in SP 16

Former Member
0 Kudos

Hai

I am new to portal. I am developing JSPdynpages with sp16. I had done with a simple example on NWDS with a simple JSP.

In prtalapp.xml i had added taglib related stuff. i had done acording to procedure.I had created component like this in NWDS .

Then

Project-- rebuild project

File exprot- PAR files second ( my project name )- include the source code for portal application--à finish

After this I had gone to portal app.xml and clicked RUN.

Then it is showing the error like that.

ERRORS OCCURED DURING THE RENDERING OF JSP COMPONENT

Pls can anybody help me in this issue.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hai, Bhaskaran u had asked for par files. ididnt know ur personal id . pls can u send a test mail to nbyreddy@gmail . So that i can forward.

Former Member
0 Kudos

Hi Pratap,

As it is if i run yor application i get a same error as you mentioned.

When i see your page3.jsp,as bobby pointed out there is a space between <% and @.

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

when i modified this line

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

it works fine.

you correct this line and upload to your SDM and run.If still problem persists then start your log viewer

C:\usr\sap\J2E\JC00\j2ee\admin\logviewer-standalone\logviewer.bat

open the server node

open \usr\sap node

open j2e\jc00

open j2ee\cluster\server0

open log

there you will see defaulttrace.trc

here you can see your error message.

Former Member
0 Kudos

Hai bobby,

i hope the problem is not with code. why bcz i had tried with u r solution also. And also i had tried with simple declarative statement <! hello > THen also it is showing the same error.

we had installed EP 6.0 on SP16. As we are new to this we may go wrong some where in installation. IF any one send installation procedure of EP 6.0 with SP 16. I will re install and check with this prob.

Dont forget if prob solved both of us get benifited. THANKS IN ADVACE FOR ALL WHO HAD GIVEN / WILL GIVE VALUBLE SUGGESTION

Former Member
0 Kudos

pratap,

send me your par file .i shall try to use it here.

Former Member
0 Kudos

pratap:

take out the following two lines from your portalapp.xml file and try again:

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

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

Former Member
0 Kudos

I am sending my code . pls look at this.

page3.jsp

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

<hbj:content id="myContext" >

<hbj:page title="PageTitle">

<hbj:form id="myFormId" >

<hbj:textView id="tv1" text="Enter the Name" design="EMPHASIZED" />

<hbj:inputField id="inf1" type="string" maxlength="100" value="Your name here"/><br>

<hbj:textView id="tv2" text="Enter the Dob" design="EMPHASIZED" />

<hbj:inputField id="inf2" type="string" /><br>

<hbj:button id="b1" text="Click" onClick="onButtonClicked" />

</hbj:form>

</hbj:page>

</hbj:content>

portalapp.xml

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

<application>

<application-config>

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

</application-config>

<components>

<component name="sec">

<component-config>

<property name="ClassName" value="com.second.sec"/>

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

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

</component-config>

<component-profile>

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

</component-profile>

</component>

</components>

<services/>

</application>

dynpage

package com.second;

import com.sapportals.htmlb.*;

import com.sapportals.htmlb.enum.*;

import com.sapportals.htmlb.event.*;

import com.sapportals.htmlb.page.*;

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

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

public class sec extends PageProcessorComponent {

public DynPage getPage(){

return new secDynPage();

}

public static class secDynPage extends JSPDynPage{

String name;

String dob;

IPortalComponentResponse res;

int state =0;

public void doInitialization(){

}

public void doProcessAfterInput() throws PageException {

res = (IPortalComponentResponse) getResponse();

InputField fName = (InputField)this.getComponentByName("inf1");

InputField fDob = (InputField)this.getComponentByName("inf2");

name = fName.getValueAsDataType().toString();

dob = fDob.getValueAsDataType().toString();

}

public void doProcessBeforeOutput() throws PageException {

if( state == 0)

//this.setJspName("page3.jsp");

this.setJspName("page3.jsp");

}

public void onButtonClicked(Event event)

{ res.write("<br> Name = " + name);

res.write("<br> Date of Birth = " + dob);

state =1;

}

}

}

Former Member
0 Kudos

Hi Pratap,

i havent tried myself.your code look okay excepty that

<hbj:inputField id="inf1" type="string"

try <hbj:inputField id="inf1" type="STRING"

see the manual here

http://help.sap.com/saphelp_nw04/helpdata/en/53/9d0e41a346ef6fe10000000a1550b0/content.htm

Former Member
0 Kudos

You'll be wondered if i say the solution to you...

It is the space between <% and @ in the first line of jsp. Remove it and there you go..

Cheer up..

Bobby

Former Member
0 Kudos

Hi,

I think Bobby is right.I have just tried it myself.

Regarding my earlier suggestion type as "string" doesnt give any problem.

Thanks bobby.

regards

Senthivel

Former Member
0 Kudos

Best way to know where it went wrong is , remove the whole code in JSP(probably put a "Hello" display) and see if it works.

It that works, then put statememt by statement and run and see if it works.

Sure this seems like a JSP error.You might be using some tags or code that the JSP renderer is unable to understand.

Let me know if this helps.

-Sudheer

Former Member
0 Kudos

The errors must have occured due to your code only. You can see this and other log messages in the logviewer.

goto System Administration->support->SAP Web AS System Information->SAP Web AS LogViewer ( look for default.trc here)

Former Member
0 Kudos

please post your code here so we can take a look and figure it out