Skip to Content
author's profile photo Former Member
Former Member

problem in rendering jsp component in SP 16

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.

Add comment
10|10000 characters needed characters exceeded

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2006 at 03:28 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2006 at 04:02 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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)

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 05:58 AM

    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;

    }

    }

    }

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 05:20 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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"/>

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 08:05 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.