Error with custom JSP tags
Firstly, thanks for any assistance. The problem I'm facing is that I am using this open source tag library in WebLogic Platform v8.1.5 and it is showing an error when viewed within Workshop. The problematic custom tag was underlined in red by Workshop with the error message "ERROR: This attribute value is not valid." when hovering the mouse over it.
I tried the other JSP tag specified in the tld file and they were ok. I suspect that there might be an error in one of the Java classes that form the JSP tag. As I hardly do much JSP tag, so my question is my hunch correct? Or should I look elsewhere? The JSP tag in question has an empty <bodycontent> and basically exposes some static variables for use in the JSP page. The tld file is as below and the problematic tag is highlighted in bold. Thank you again for any advise given!
<?xml version="1.0"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>theme</shortname>
<uri>http://liferay.com/tld/theme</uri>
<tag>
<name>box</name>
<tagclass>com.liferay.taglib.theme.BoxTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>top</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>bottom</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>defineObjects</name>
<tagclass>com.liferay.taglib.theme.DefineObjectsTag</tagclass>
<teiclass>com.liferay.taglib.theme.DefineObjectsTei</teiclass>
<bodycontent>empty</bodycontent>
</tag>
<tag>
<name>include</name>
<tagclass>com.liferay.taglib.theme.IncludeTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>page</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>param</name>
<tagclass>com.liferay.taglib.util.ParamTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
nvm..i already fix the problem..
Similar Messages
-
Problems with custom JSP Tag, can someone offer some advice?
Greetings,
I have a problem here that I am stumped on. I am trying to create a custom JSP tag, I created a simple "Hello World" JSP, however, I am coming up a bit short. I am running Apache Tomcat 6.0 on a Win XP environment.
The code I have is as follows:
TLDTest.tld:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.2</jspversion>
<shortname>firstTag</shortname>
<info>My First Tag</info>
<!-- Here goes nothing!!! -->
<tag>
<name>hola</name>
<tagclass>Hola</tagclass>
<bodycontent>empty</bodycontent>
<info>a simple hello tag</info>
<!-- attributes -->
<!-- Personalize the name -->
<attribute>
<name>name</name>
<required>false</required>
<rtexpvalue>false</rtexpvalue>
</attribute>
</tag>
</taglib>
The Hola.jsp is:
<%@ taglib uri="/Hola" prefix="test" %>
<html>
<head>Just a little test on tags</head>
<body>
<hr />
<test:Hola name="Woot Master" />
<hr />
</body>
</html>
And the source code for the .class file (named Hola) is:
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class Hola extends TagSupport
private String name = null;
public void setName(String value)
name = value;
public String getName()
return(name);
/* doStartTag is called and defined below here for the java tag */
public int doStartTag()
try
JspWriter out = pageContext.getOut();
out.println("<table border=1>");
if (name != null)
out.println("<tr><td> Hola " + name + "!" + "</td></tr>");
else
out.println("<tr><td> Hola! Porque tu es una piquito perra? </td></tr>");
catch (Exception ex)
throw new Error("Dio's Mio!, Esta No Va!, tu problema es en la StartTag!!!");
return SKIP_BODY;
/* doEndTag is defined here. */
public int doEndTag()
try
final JspWriter out = pageContext.getOut();
out.println("</table>");
catch (final Exception ex)
throw new Error("Oops, it's broken, check your coding in the End tag!!!");
What I keep getting is the following error:
org.apache.jasper.JasperException: /Hola/Hola.jsp(6,2) No tag "Hola" defined in tag library imported with prefix "test"
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
I've been back and forth on this, but I am lost. Obviously I am missing something, but what is it? It wouldn't be in the web.xml file would it? I am running a vanilla tomcat install. Any help that anyone can provide would be greatly appreciated.
Sincerely,
- JoshOk
1 - In the JSP, your tag should be "hola" not "Hola". Yes case matters.
<test:hola name="Woot Master" />2 - Importing the taglibrary correctly.
Either reference its tld <%@ taglib uri="/WEB-INF/Hola.tld" prefix="test" %>
(and have the tld file sitting in /WEB-INF/Hola.tld )
or
Define a uri for it in the tld...
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.2</jspversion>
<shortname>firstTag</shortname>
<uri>http://mytag/hola</uri>
...and then use that uri to import it in your JSP
<%@ taglib uri="http://mytag/hola" prefix="test" %>
3 - Put your tag class in a package. Classes not in packages have a way of not being found.
package mypackage
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class Hola extends TagSupport {
...That will move it in your folder structure to be /mypackage/Hola.java
You would also need to update the tagclass element in the tld to reflect the change:
<tagclass>mypackage.Hola</tagclass>4 - Mistake in your tld: You are missing an "r" in "rtexprvalue". <rtexpvalue> should be <rtexp*r*value>
5 - In your Tag class, you should return something from the "doEndTag()" method.
return super.doEndTag(); or maybe return EVAL_PAGE;
Revised code:
WEB-INF/hola.tld
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.2</jspversion>
<shortname>firstTag</shortname>
<uri>http://mytag/hola</uri>
<info>My First Tag</info>
<!-- Here goes nothing!!! -->
<tag>
<name>hola</name>
<tagclass>mypackage.Hola</tagclass>
<bodycontent>empty</bodycontent>
<info>a simple hello tag</info>
<!-- attributes -->
<!-- Personalize the name -->
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
</taglib>hola.jsp:
<%@ taglib uri="http://mytag/hola" prefix="test"%>
<html>
<head>Just a little test on tags</head>
<body>
<hr />
<test:hola name="Woot Master" />
<hr />
</body>
</html>Hola.java. Compiles into WEB-INF/classes/mypackage/Hola.class
package mypackage;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class Hola extends TagSupport {
private String name = null;
public void setName(String value) {
name = value;
public String getName() {
return (name);
/* doStartTag is called and defined below here for the java tag */
public int doStartTag() {
try {
JspWriter out = pageContext.getOut();
out.println("<table border=1>");
if (name != null)
out.println("<tr><td> Hola " + name + "!" + "</td></tr>");
else
out.println("<tr><td> Hola! Porque tu es una piquito perra? </td></tr>");
} catch (Exception ex) {
throw new Error("Dio's Mio!, Esta No Va!, tu problema es en la StartTag!!!");
return SKIP_BODY;
/* doEndTag is defined here. */
public int doEndTag() {
try {
final JspWriter out = pageContext.getOut();
out.println("</table>");
return super.doEndTag();
} catch (final Exception ex) {
throw new Error("Oops, it's broken, check your coding in the End tag!!!");
}Cheers,
evnafets -
Problems in developing custom JSP tags
I have problems in debugging custom JSP tags. Sometimes the doStartTag is not called on tags but the doEndTag is called. I don't know why.
Thanks.Fahr--
A word of caution -- NetUI did not ship a JSP tag SDK in 8.x, and
we're making no compatibility guarantees for custom JSP tags written on
the 8.x release and future releases.
You can accomplish the same sort of functionality with a combination
of the <netui-data:getData> tag and JSTL 1.0. This solution would
probably provide similar functionality and be more future-proof relative
to JSTL and the NetUI tags currently being developed in Beehive.
Hope that helps.
Eddie
Fahr Vegnugen wrote:
We are in the midst of creating our own JSP tags to work with datasources.
In an example where you would need to compare two different datasources how would you do this?
ie.
<prefix:isGreater dataSource="{pageflow.column1}" dataSourceToCompare="{pageFlow.column2}" />
How would I evaluate what column2 is since the tag will only resolve one data source
this.evaluateDataSource();
Any pointers you can provide would be appreciated, or if there is a library of jsp tags that evaluate objects using datasources already created, that would even be better. -
Hi,
I have several questions regarding this topic:
1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any known
problems ?
2) Does Weblogic come with any tag libraries (for loops, if, etc) and where
can I get them ?
3) Are there any tag libraries out there (JRun, for example) that have been
successfully run on Weblogic ?
Any help would be much appreciated.
Thanks,
Jamie
As there seems to be general interest, a link would probably be a great
help.
Regards
Daniel Hoppe
-----Original Message-----
From: Michael Girdley [mailto:[email protected]]
Posted At: Friday, August 25, 2000 8:03 AM
Posted To: jsp
Conversation: Custom JSP Tags for Weblogic
Subject: Re: Custom JSP Tags for Weblogic
Please see the documentation:
http://www.weblogic.com/docs51/resources.html
Michael Girdley
BEA Systems Inc
"Jamie" <[email protected]> wrote in message
news:[email protected]...
> Update
> =======
>
> Weblogic Portal has some Tag libraries. I've downloaded the trial
version
> of
> the Weblogic Commerce Server. How do I get the tag libraries and use
them
> on WL 5.1 ?
>
> Answers to original post still wanted
>
> Thanks,
>
> Jamie
>
> Jamie <[email protected]> wrote in message
> news:[email protected]...
> > Hi,
> >
> > I have several questions regarding this topic:
> >
> > 1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any
known
> > problems ?
> >
> > 2) Does Weblogic come with any tag libraries (for loops, if, etc)
and
> where
> > can I get them ?
> >
> > 3) Are there any tag libraries out there (JRun, for example) that
have
> been
> > successfully run on Weblogic ?
> >
> >
> > Any help would be much appreciated.
> >
> > Thanks,
> >
> > Jamie
> >
> >
>
>
-
We have our own custom JSP tag libraries (some of them extend the Struts tags, but many do not) and want those to render correctly in the design view.
Is that supported by NitroX Struts, or will it only work with built-in Struts tags?
If it is supported, how does one get NitroX to run the custom tags?It is possible to customize many aspects of the rendering of a custom tag. This is done using a combination of an M7 specific metadata, and standard css rules.
For example, you can change the label, icon and border of a custom tag by doing the following steps:
1) Create a folder named "nitrox" where your tld file is located. For example if you have "/WEB-INF/app.tld" then create a
folder "/WEB-INF/nitrox/".
2) In the nitrox folder created above, create a file named "app.tlei" (for Tag Library Extra Information). The file name used here should match the name of the tld file. In this case "app".
3) Paste the following content in the app.tlei file:
<taglib-extrainfo>
<css-uri>app.css</css-uri> <!-- an optional css file relative to this tlei file -->
<tag name="myTag">
<display-name>My Tag</display-name> <!-- The name displayed in the Tag Libraries view -->
<rendering-label>{tag-name} ({name})</rendering-label> <!-- This will display the value of the "name" attribute in addition to the tag name in the tag view in the JSP design editor. -->
<small-icon>images/myTag.gif</small-icon> <!-- The image uri relative to this tlei file. This is used in the Tag Libraries view and in the JSP design editor.-->
</tag>
</taglib-extrainfo>
All customization tags are optional.
4) Create the css file referenced from the tlei file above (in this example app.css in the same directory containing the tlei file).
5) Paste the following content in the app.css file:
myTag {border: 1 solid red; display: "inline"}
This will render the tag as inline (i.e as one graphical object) even if the tag has nested content.
In addition, you can use any standard css style property.
You can customize other tags in the same fashion.
If a custom tag inherits from a Struts tag, then the tag can inherit the full built-in tag customization as shown in the following example:
Suppose you have a tag named "myText" that extends the Struts html:text form field tag. To inherit the NitroX html:text customization you follow the steps:
1) insert the following in the tlei file described above:
<tag name="myText">
<inherit taglib-uid="http://jakarta.apache.org/struts/tags-html" tag-name="text" />
</tag>
2) Insert the following css rule in the css file referenced from the tlei file:
myText {m7-inherit: "input-text"; display: inline}
This will inherit the built-in css style for form text fields.
Likewise, you can inherit the other Struts tags css styles by using the following rules:
myPassword {m7-inherit: "input-password"; display: inline}
myCancel {m7-inherit: "input-submit"; display: inline}
myCheckbox {m7-inherit: "input-checkbox"; display: inline}
myRadio {m7-inherit: "input-radio"; display: inline}
mySelect {m7-inherit: "select"; display: inline}
myTextarea {m7-inherit: "textarea"; display: inline}
3) The inherited tag library file (in this example the struts-html.tld), must also be present under the WEB-INF directory.
M7 Support -
Error compiling expressions in custom JSP tags
We had the same problem and we have found the same solution. Not to nice.
Jan
Here is what I have set up:
custom.jsp:
<%@ taglib uri="/WEB-INF/tlds/mytags.tld" prefix="my" %>
<!-- <%@ taglib uri="myTags" prefix="my" %> -->
<HTML>
<HEAD>
<TITLE>Custom tag example</TITLE>
</HEAD>
<BODY>
<H1>Custom tag Example</H1>
<my:wrapper style="k001">
<b>hello!</b>
</my:wrapper>
</BODY>
</HTML>
Under WEB-INF/tlds, I placed mytags.tld:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>MyTags</short-name>
<tag>
<name>wrapper</name>
<tag-class>mytaglib.WrapperTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>style</name>
<required>true</required>
</attribute>
</tag>
</taglib>
I've seen examples for jsp-version 1.1 and 1.2. Can you suggest what should be placed in <uri>...</uri>
Do you think I have a problem with my tomcat config or compiling the java class?
Thanks. -
Can't get out.print to work with XML jsp tags
<jsp:scriptlet>
if(ErrorTrap == true) {
out.println("<tr><td colspan=\"center\" align=\"center\">There was" an error while processing the form</td></tr>");
ErrorTrap = false;
</jsp:scriptlet>
I can't get this script to work with the XML stype jsp tags. It keeps telling me the <jsp> tags are untermintaed. Is there a special trick to fix this or do I have to use the non-XML type tags?Sorry, I didn't mean to put the extra " in the out.println text string. :-/
-
Error with Portal JSP Page Upload
i've run into a problem with trying to deploy custom JSP pages to Portal. basically, if i enable JSP page types for the Page Group, generate a simple page, download it using the Download JSP link, and then try to upload it again as a JAR or WAR via the JSP Source tab, even without modifying the page at all, i receive the following error:
Unexpected error - User-Defined Exception (WWC-35000)
Unexpected error - User-Defined Exception (WWC-35000)
Path ID does not exist. (WWC-50001)
i've tried logging in as ORCLADMIN in case it was a permissions thing, but that didn't help.
anyone else experience this? any ideas?
thanks,
.richi've run into a problem with trying to deploy custom JSP pages to Portal. basically, if i enable JSP page types for the Page Group, generate a simple page, download it using the Download JSP link, and then try to upload it again as a JAR or WAR via the JSP Source tab, even without modifying the page at all, i receive the following error:
Unexpected error - User-Defined Exception (WWC-35000)
Unexpected error - User-Defined Exception (WWC-35000)
Path ID does not exist. (WWC-50001)
i've tried logging in as ORCLADMIN in case it was a permissions thing, but that didn't help.
anyone else experience this? any ideas?
thanks,
.rich -
How to pass a server side value to an attribute of a custom jsp tag
Hi All:
I needed to passed an integer value from the following code:
<%=ic.getTotalNumOfRecords()%>
to an attribute of a custom tag
<inquiry:tableClaimHistory numberOfRecords="5" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
The function getTotalNumOfRecords returns an int.
The attribute numberOfRecords expects an string.
Here are the different ways I tried in a jsp page but I get also the following errors:
1.)
>
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords=<%=ic.getTotalNumOfRecords()%> dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
Error Message:
claimHistoryView.jsp:190:3: Unterminated tag.
<inquiry:tableClaimHistory numberOfRecords=<%=ic.getTotalNumOfRecords()%> dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
2.)
>
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords="<%=ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
Error Message:
claimHistoryView.jsp:190:4: The required attribute "numberOfRecords" is missing.
<inquiry:tableClaimHistory numberOfRecords="<%=ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
3.)
>
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords="<%ic.getTotalNumOfRecords();%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
Error Message:
java.lang.NumberFormatException: For input string: "<%ic.getTotalNumOfRecords();%>"
4.)
>
<%@ include file="../common/page_imports.jsp" %>
<%
int records1 = ic.getTotalNumOfRecords();
Integer records2 = new Integer(records1);
String numberOfRecords2 = records2.toString();
%>
<inquiry:tableClaimHistory numberOfRecords="<%numberOfRecords2;%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
error message:
java.lang.NumberFormatException: For input string: "<%numberOfRecords2;%>"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
at java.lang.Double.valueOf(Double.java:447)
at java.lang.Double.(Double.java:539)
at com.DisplayTableClaimHistoryTag.displayTable(DisplayTableClaimHistoryTag.java:63)
5.)
>
<%
int records1 = ic.getTotalNumOfRecords();
Integer records2 = new Integer(records1);
String numberOfRecords2 = records2.toString();
%>
<inquiry:tableClaimHistory numberOfRecords=<%numberOfRecords2;%> dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
error message:
claimHistoryView.jsp:194:3: Unterminated tag.
<inquiry:tableClaimHistory numberOfRecords=<%numberOfRecords2;%> dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
In the custom tag java code called "DisplayTableClaimHistoryTag"
I tried to used the following code:
>
InquiryContext ic = InquiryContext.getContext(session);
>
The problem is that in order to get session I needed HttpSession object. I don't know how to passed HttpSession "session" object
to a custom tag. Is there a way to do this?
>
public class DisplayTableClaimHistoryTag extends InquiryTag
String numberOfRecords;
public void setNumberOfRecords(String numberOfRecords)
this.numberOfRecords = numberOfRecords;
public String getNumberOfRecords()
return numberOfRecords;
public int doStartTag()throws JspException
InquiryContext context = (InquiryContext)pageContext.getSession().getAttribute(Constrain.CONTEXT);
if(context==null)
throw new JspException(TAG_EXCEPTION+ "InquriyContext is null.");
String hasData = (String)context.getAttribute(Constrain.CONTROL_HAS_DATA);
if(hasData==null)
throw new JspException(TAG_EXCEPTION + "The hasData property can not be null.");
boolean hd = Boolean.valueOf(hasData).booleanValue();
Debug.println("hasData="+hd);
Debug.println("hasDataString="+hasData);
if(hd)
displayTable();
else
disPlayError();
return SKIP_BODY;
private void displayTable() throws JspException
String outString ="";
Debug.println("dispalyTable() ********* dataAction="+ dataAction);
JspWriter out = pageContext.getOut();
* Minimum height height= 103,70
* 21.7 per row
* First row==103+21.5=124.5
* Second row ==103+21.5*2=146
* Third row ==103+21.5*3=167.5
Double numberOfRecordsBigDouble = new Double(numberOfRecords);
double numberOfRecordsDouble = 70 + 21.8*numberOfRecordsBigDouble.intValue();
if(order==null || order.equals("0"))
// outString = "<iframe src=\"" + "/inquiry/" + dataAction + "?order=0"+ "\"" + " name=\"dataFrame\" id=\"dataFrame\" height=\""+numberOfRecordsDouble+"\"" +" width=\"100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
// outString = "<iframe src=\"" + "/inquiry/" + dataAction + "?order=0"+ "\"" + " name=\"dataFrame\" id=\"dataFrame\" style=\"height:"+numberOfRecordsDouble+"px; width:100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
// outString = "<iframe src=\"" + "http://www.google.ca"+ "\"" + " name=\"dataFrame\" id=\"dataFrame\" style=\"height:"+numberOfRecordsDouble+"px; width:100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
outString = "<iframe src=\"" + "/inquiry/" + dataAction + "?order=0"+ "\"" + " name=\"dataFrame\" id=\"dataFrame\" style=\"height:"+numberOfRecordsDouble+"px; width:100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
else
String orderStr = "?order=" + order;
outString = "<iframe src=\"" + "/inquiry/" + dataAction + orderStr + "\"" + " name=\"dataFrame\" id=\"dataFrame\" height=\""+numberOfRecordsDouble+"\"" +" width=\"100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
//outString = "<iframe src=\"" + "/inquiry/" + dataAction + orderStr + "\"" + " name=\"dataFrame\" id=\"dataFrame\" height=\"161\" width=\"100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
Debug.println("dispalyTable() ********* outString = "+ outString);
try {
out.println(outString);
} catch (IOException e) {
this.log.error(TAG_EXCEPTION + e.toString(), e);
throw new JspException(e);
>
Any hint would be greated appreciated.
Yours,
John SmithOk, couple of things
1 - ALWAYS put quotes around attributes in a custom tag. That rules out items #1 and #5 as incorrect.
2 - You were correct using the <%= expr %> tags. <% scriptlet %> tags are not used as attributes to custom tags. That rules out #3 and #4
#2 looks the closest:
2.)
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords="<%=ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>Error Message:
claimHistoryView.jsp:190:4: The required attribute "numberOfRecords" is missing.
<inquiry:tableClaimHistory numberOfRecords="<%=ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
Check your spelling of that attribute. It looks right here,.
You also said that ic.getTotalNumOfRecords returns an int, while the attribute returns a String
Try
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords="<%="" + ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/><%= "" + ic.getTotalNumOfRecords %> is the cop-out way to convert an int to a String :-) -
Error with HeaderiView.jsp file
Hi there,
I took the masthead par file from the portal and I did some changes in the HeaderiView.jsp. When I try the iview in the preview I see the next error:
Portal Runtime Error
An exception occurred while processing a request for :
iView : pcd:portal_content/pruebasjanet/ZiwImage/zprueba54
Component Name : prueba1701.default
Error occurs during the rendering of jsp component.
Exception id: 10:14_06/09/07_0075_33099350
See the details for the exception ID in the log file
I already added the com.sap.portal.navigation.mastheadapi.jar in \PORTAL-INF\lib
and com.sap.portal.navigation.masthead_core.jar \PORTAL-INF\private\lib.
Any help would be greatly appreciated!
JeanetteHi Malini,
Yes, I did some changes in Jsp file. I'm trying to make a copy of the Help Link. I copied all the components in the portalapp.xml (only changes, for example, <property name="ShowHelpLink" value="true"> <property name="ShowSiteLink" value="true">)
Would you please help me checking the code?
Thanks.
Jeanette
With the jsp file I have problems:
<%@ page import = "java.util.ResourceBundle" %>
<%@ page import = "com.sapportals.htmlb.*" %>
<%@ page import = "com.sapportals.portal.prt.session.IUserContext" %>
<%@ page import = "com.sapportals.portal.prt.component.*" %>
<%@ page import = "com.sapportals.portal.prt.service.laf.*" %>
<%@ page import = "com.sap.security.api.UMFactory" %>
<%@ page import = "com.sapportals.portal.prt.service.license.ILicenseService"%>
<%@ page import = "com.sapportals.portal.navigation.*" %>
<%@ page import = "com.sapportals.portal.prt.runtime.PortalRuntime" %>
<%@ page import = "com.sapportals.portal.prt.util.StringUtils" %>
<%@ taglib uri="prt:taglib:tlhtmlb" prefix="hbj" %>
<%!
final String PERSONALIZE_PAGE_EVENT_URN = "urn:com.sapportals:navigation";
final String PERSONALIZE_PAGE_EVENT_NAME = "PersonalizePage";
final String PERSONALIZE_PAGE_EVENT_PARAMS = "";
final String PERSONALIZE_PORTAL_EVENT_URN = "urn:com.sapportals:navigation";
final String PERSONALIZE_PORTAL_EVENT_NAME = "PersonalizePortal";
final String PERSONALIZE_PORTAL_EVENT_PARAMS = "";
final String LOGOFF_CONFIRM_MSG_COMPONENT = "logoffConfirmMsg";
final String LOGON_REDIRECT_COMPONENT = "logInComponent";
final String LOGOFF_REDIRECT_COMPONENT = "LogOutComponent";
final String LOGOFF_CONFIRM_MSG_ARGS_IE = "dialogHeight: 170px; dialogWidth: 350px; edge: Raised; center: Yes; help: No; resizable: No; status: No";
final String LOGOFF_CONFIRM_MSG_ARGS_NS = "Height=170,Width=350";
final String LOGOFF_CONFIRM_WINDOW_NAME = "LOG_OFF_WINDOW";
final String HELP_URL = "HelpUrl";
final String SITE_URL = "SiteUrl";
final String HELP_WINDOW_NAME = "HELP_WINODW";
final String SITE_WINDOW_NAME = "SITE_WINODW";
final String SHOW_PERSONALIZE_LINK = "ShowPersonalizeLink";
final String SHOW_HELP_LINK = "ShowHelpLink";
final String SHOW_SITE_LINK = "ShowSiteLink";
final String SHOW_NEW_WINDOW_LINK = "ShowNewWindowLink";
final String SHOW_LOG_OFF_LOG_ON_LINK = "ShowLogInLogOffLink";
//String constants for NLS
final String WELCOME_CLAUSE = "WELCOME_CLAUSE";
final String HELP_TEXT = "HELP_TEXT";
final String SITE_TEXT = "SITE_TEXT";
final String LOG_OFF_TEXT = "LOG_OFF_TEXT";
final String LOG_ON_TEXT = "LOG_ON_TEXT";
final String PERSONALIZE_TEXT = "PERSONALIZE_TEXT";
final String PERSONALIZE_PORTAL_TEXT = "PERSONALIZE_PORTAL_TEXT";
final String NEW_WINDOW_TEXT = "NEW_WINDOW_TEXT";
final String HELP_TOOLTIP = "HELP_TOOLTIP";
final String SITE_TOOLTIP = "SITE_TOOLTIP";
final String LOG_OFF_TOOLTIP = "LOG_OFF_TOOLTIP";
final String LOG_ON_TOOLTIP = "LOG_ON_TOOLTIP";
final String PERSONALIZE_TOOLTIP = "PERSONALIZE_TEXT";
final String PERSONALIZE_PORATL_TOOLTIP = "PERSONALIZE_PORATL_TOOLTIP";
final String NEW_WINDOW_TOOLTIP = "NEW_WINDOW_TOOLTIP";
final String BEGINNING_OF_PAGE = "BEGINNING_OF_PAGE";
final String MASTHEAD_ENTER_TOOLTIP = "MASTHEAD_ENTER_TOOLTIP";
final String MASTHEAD_EXIT_TOOLTIP = "MASTHEAD_EXIT_TOOLTIP";
final String UNLOAD_MSG = "UNLOAD_MSG";
private String GetWelcomeMsg(IPortalComponentRequest request, String welcomeClause)
IUserContext userContext = request.getUser();
if (userContext != null)
String firstName = userContext.getFirstName();
String lastName = userContext.getLastName();
String salutation = userContext.getSalutation();
if ((firstName != null) && (lastName != null))
if(salutation != null)
return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, salutation}).toString();
else
return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, " "}).toString();
else
return java.text.MessageFormat.format(welcomeClause, new Object[] {userContext.getDisplayName()," ", " "}).toString();
return "";
private String GetLicenseText(IPortalComponentRequest request){
ILicenseService license = (ILicenseService)request.getService(ILicenseService.KEY);
if (license.sapInternalUsageOnly())
return "<FONT color=orangeRed size=4><STRONG> Licensed For SAP Internal Usage</STRONG></FONT>";
else
return " ";
private boolean getParameter(IPortalComponentRequest request, String param)
String value = (String)request.getNode().getValue(param);
return new Boolean(value).booleanValue();
private String getHelpUrl(IPortalComponentRequest request)
String value = (String)request.getNode().getValue(HELP_URL);
return value;
private String getSiteUrl(IPortalComponentRequest request)
String value = (String)request.getNode().getValue(SITE_URL);
return value;
private String GetLogoffConfirmMsgURL(IPortalComponentRequest request)
String componentName = request.getComponentContext().getComponentName();
componentName = componentName.substring(0, componentName.lastIndexOf(".") + 1);
IPortalComponentURI msgURI = request.createPortalComponentURI();
msgURI.setContextName(componentName + LOGOFF_CONFIRM_MSG_COMPONENT);
return msgURI.toString();
// Attaching the "UnsavedData=true" flag to the Confirm logoff message
private String GetLogoffConfirmUnsavedMsgURL(IPortalComponentRequest request)
String basicUrl = GetLogoffConfirmMsgURL(request);
String separator = (basicUrl.indexOf("?") >=0) ? "&" : "?";
return basicUrl + separator + "UnsavedData=true";
private String GetLogoffURL(IPortalComponentRequest request)
/*IPortalComponentURI logoffURI = request.createPortalComponentURI();
return logoffURI.toString();*/
String componentName = request.getComponentContext().getComponentName();
componentName = componentName.substring(0, componentName.lastIndexOf(".") + 1);
IPortalComponentURI msgURI = request.createPortalComponentURI();
msgURI.setContextName(componentName + LOGOFF_REDIRECT_COMPONENT);
return msgURI.toString();
private boolean isAccessabilityOn(IPortalComponentRequest request)
//End: Temporary, till there's a way to set the accessibility for a user
IUserContext user = request.getUser();
//if((user.getAccessibilityLevel() != IUserContext.DEFAULT_ACCESSIBILITY_LEVEL) ||(isAccessibility == true) ) // 508 is on
if (user.getAccessibilityLevel() != IUserContext.DEFAULT_ACCESSIBILITY_LEVEL) // 508 is on
return true;
return false;
private String GetLoginURL(IPortalComponentRequest request)
INavigationGenerator navigationService = (INavigationGenerator)PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
StringBuffer URL = new StringBuffer(200).append(navigationService.getPortalURL(request , null));
return URL.append("/login").toString();
private String GetPortalUrl(IPortalComponentRequest request)
INavigationGenerator navigationService = (INavigationGenerator)PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
return navigationService.getPortalURL(request , null);
private String getNLSString(IPortalComponentRequest request, String resource_key)
try
ResourceBundle bundle = request.getResourceBundle();
if(bundle != null)
return bundle.getString(resource_key);
return resource_key;
catch(MissingResourceException e)
return resource_key;
private String GetThemeURLPath(IPortalComponentRequest request)
ILAFService iLAFService = (ILAFService)request.getService(ILAFService.KEY);
String currentTheme = iLAFService.getCurrentTheme(request).getThemeName();
String url = iLAFService.getRelativeThemeRootURLPath(request, ILAFService.PORTAL_THEME) + "/" + currentTheme + "/prtl";
return url;
//Get the external logoff URL
private String getExternalLogOffUrl()
return UMFactory.getProperties().get("ume.logoff.redirect.url");
//Get the external logoff Mode (silent / not silent)
private boolean getExternalLogOffMode()
return UMFactory.getProperties().getBoolean("ume.logoff.redirect.silent" , false);
private boolean isAnonymous(IPortalComponentRequest request)
NavigationEventsHelperService helperService = (NavigationEventsHelperService)
PortalRuntime.getRuntimeResources().getService(NavigationEventsHelperService.KEY);
return helperService.isAnonymousUser(request);
%>
<%
boolean isPreview = false;
// initializaing the labels with the localized labels
String welcomeClauseStr = getNLSString(componentRequest, WELCOME_CLAUSE);
String helpTextStr = getNLSString(componentRequest, HELP_TEXT);
String siteTextStr = getNLSString(componentRequest, SITE_TEXT);
String logOffTextStr = getNLSString(componentRequest, LOG_OFF_TEXT);
String logInTextStr = getNLSString(componentRequest, LOG_ON_TEXT);
String personalizeTextStr = getNLSString(componentRequest, PERSONALIZE_TEXT);
String newWindowTextStr = getNLSString(componentRequest, NEW_WINDOW_TEXT);
String helpTooltipStr = getNLSString(componentRequest, HELP_TOOLTIP);
String siteTooltipStr = getNLSString(componentRequest, SITE_TOOLTIP);
String logOffTooltipStr = getNLSString(componentRequest, LOG_OFF_TOOLTIP);
String logInTooltipStr = getNLSString(componentRequest, LOG_ON_TOOLTIP);
String personalizeTooltipStr = getNLSString(componentRequest, PERSONALIZE_TOOLTIP);
String personalizePortalTooltipStr = getNLSString(componentRequest, PERSONALIZE_PORATL_TOOLTIP);
String beginningOfPageStr = getNLSString(componentRequest, BEGINNING_OF_PAGE);
String newWindowStr = getNLSString(componentRequest, NEW_WINDOW_TOOLTIP);
String mastheadEnterTable = getNLSString(componentRequest, MASTHEAD_ENTER_TOOLTIP);
String mastheadExitTable = getNLSString(componentRequest, MASTHEAD_EXIT_TOOLTIP);
String unLoadMsg = getNLSString(componentRequest, UNLOAD_MSG);
boolean showPersonalizeLink = getParameter(componentRequest, SHOW_PERSONALIZE_LINK);
boolean showHelpLink = getParameter(componentRequest, SHOW_HELP_LINK);
boolean showSiteLink = getParameter(componentRequest, SHOW_SITE_LINK);
boolean showNewWindowLink = getParameter(componentRequest, SHOW_NEW_WINDOW_LINK);
boolean ShowLogInLogOffLink = getParameter(componentRequest, SHOW_LOG_OFF_LOG_ON_LINK);
String mode = (String)componentRequest.getNode().getValue("mode");
if ((mode != null) && (mode.equals("preview")))
isPreview = true;
String themeRootURLPath = GetThemeURLPath(componentRequest);
boolean isAnonymous = isAnonymous(componentRequest);
boolean isAccessabilityOn = isAccessabilityOn(componentRequest);
if (isAccessabilityOn)
helpTooltipStr = helpTextStr", "helpTooltipStr;
siteTooltipStr = siteTextStr", "siteTooltipStr;
logOffTooltipStr = logOffTextStr", "logOffTooltipStr;
logInTooltipStr = logInTextStr", "logInTooltipStr;
newWindowStr = newWindowTextStr", "newWindowStr;
personalizePortalTooltipStr = personalizeTextStr", "personalizePortalTooltipStr;
%>
<script>
function openLogoffMsg()
<%if (!isPreview){%>
if (EPCM.getUAType() == EPCM.MSIE)
releaseProducerSessions();
if(EPCM.getGlobalDirty())
// unsaved data on the page, display modified dialog
var val = window.showModalDialog('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');
if (val == 'logoff')
disableWorkProtectCheck = true;
logoff();
else //no unsaved data
// data saved, nothing get lost on the page, display normal dialog
var val = window.showModalDialog('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');
if (val == 'logoff')
logoff();
else
if(EPCM.getGlobalDirty())
window.open('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');
else
window.open('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');
<%}%>
var isLogoffFinalAllowed = true;
var logoffStartTime = (new Date).getTime();
function logoff()
EPCM.raiseEvent("urn:com.sapportals.portal:user", "logoff", "");
logoffStartTime = (new Date).getTime();
window.setTimeout("logoffDelay()", "50");
function logoffDelay()
var isLogoffDelayElapsed = ((new Date).getTime() - logoffStartTime) > (60*1000);
if(isLogoffFinalAllowed || isLogoffDelayElapsed) {
logoffFinalCall();
} else {
window.setTimeout("logoffDelay()","50");
function logoffFinalCall()
logoffThirdParty();
document.forms["logoffForm"].submit();
function logIn()
location.replace("<%=GetLoginURL(componentRequest)%>");
function runPersonalizePage()
EPCM.raiseEvent("<%=PERSONALIZE_PAGE_EVENT_URN%>", "<%=PERSONALIZE_PAGE_EVENT_NAME%>", "<%=PERSONALIZE_PAGE_EVENT_PARAMS%>");
function runPersonalizePortal()
<%if (!isPreview){%>
EPCM.raiseEvent("<%=PERSONALIZE_PORTAL_EVENT_URN%>", "<%=PERSONALIZE_PORTAL_EVENT_NAME%>", "<%=PERSONALIZE_PORTAL_EVENT_PARAMS%>");
<%}%>
function onPersonalizePortalDisable()
var linkElem = document.getElementById("personalizePortal");
var linkSepElem = document.getElementById("personalizePortalSep");
var linkLogoffSepElem = document.getElementById("logoffsep1");
if(linkElem != null)
linkElem.style.display = "none";
if(linkSepElem != null)
linkSepElem.style.display = "none";
if(linkLogoffSepElem != null)
linkLogoffSepElem.style.display = "none";
EPCM.subscribeEvent("urn:com.sapportals:navigation", "PersonalizePortalDisable", onPersonalizePortalDisable);
function openNewPortalWindow()
<%if (!isPreview){%>
var navTarget = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue().URL;
var context = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue().context;
if (context != null && context.length > 0)
EPCM.doNavigate(navTarget, 2, null, null, null, null, context);
else
EPCM.doNavigate(navTarget, 2);
<%}%>
function openHelp()
<%if (!isPreview){%>
window.open('<%=getHelpUrl(componentRequest)%>', '<%=HELP_WINDOW_NAME%>');
<%}%>
function openSite()
<%if (!isPreview){%>
window.open('<%=getSiteUrl(componentRequest)%>', '<%=SITE_WINDOW_NAME%>');
<%}%>
function setFocusOnHeader() {
var melcomeMessage = document.getElementById("welcome_message");
var headerNotch = document.getElementById("header_notch");
if(EPCM.getUAType()==EPCM.MOZILLA) {
// No focus
} else {
if(melcomeMessage!=null && melcomeMessage.currentStyle.display!="none") {
melcomeMessage.focus();
} else if(headerNotch!=null && headerNotch.currentStyle.display!="none") {
headerNotch.focus();
function logoffThirdParty()
<% if(getExternalLogOffUrl()!= null){ %>
var logOffUrl = '<%=getExternalLogOffUrl()%>';
var silent = <%=getExternalLogOffMode()%>;
if(silent)
var newIFrame = document.getElementById("externalLogOffIframe");
if(newIFrame == null)
newIFrame = document.createElement("IFRAME");
newIFrame.style.visibility = "hidden";
newIFrame.width=0;
newIFrame.height=0;
newIFrame.id = "externalLogOffIframe";
newIFrame.src = logOffUrl;
document.body.appendChild(newIFrame);
else
newIFrame.src = "javascript:void(0)";
newIFrame.src = logOffUrl;
<% } %>
</script>
<hbj:content id="PageContext">
<hbj:page title="Header Area">
<hbj:form id="HeaderForm" >
<!--<a href="#" tabindex=0 title= "<%=beginningOfPageStr%>" accesskey="m">
<img src="<%=themeRootURLPath%>/../common/1x1.gif" border="0" style="display:none">
</a>-->
<% if (isAccessabilityOn)
{%>
<TABLE width="100%" border="0" id="myTable" ti="0" tabindex="0" title="<%=mastheadEnterTable%>" onkeydown="nav_skip('myTable',event)" ct="PortalMasthead" cellspacing="0" cellpadding="0" ><% if (isPreview) {%>ondragover="window.event.cancelBubble = true;" ondragleave="window.event.cancelBubble = true;"<%}%>>
<%} else
{%>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="prtlHdrWhl" id="myTable" ti="0" tabindex="0" onkeydown="nav_skip('myTable',event)" ><% if (isPreview) {%>ondragover="window.event.cancelBubble = true;" ondragleave="window.event.cancelBubble = true;"<%}%>>
<%}%>
<tbody>
<TR>
<TD width="1%" nowrap class="prtlHeaderNotch" id="header_notch"> </TD>
<TD width="5%" nowrap class="prtlHdrWelcome" id="welcome_message" ti="0" tabIndex="0"><%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%></TD>
<TD width="3%" nowrap class="prtlHdrWelcome" id="welcome_message" ti="1" tabIndex="1">
<SCRIPT LANGUAGE="JavaScript">
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000))
year="19" + year;
if (navigator.appName == "Netscape")
year=1900 + year;
document.write("<center>" + lmonth + " ");
document.write(date + ", " + year + "</center>");
</SCRIPT>
</TD>
<% if (showSiteLink || showHelpLink || showPersonalizeLink || showNewWindowLink || ShowLogInLogOffLink)
{%>
<TD width="79%" class="prtlHeaderFunctionsTable">
<TABLE border="0" cellspacing="0" cellpadding="0"
class="prtlHeaderFunctionsContainer" height="100%">
<TR>
<TD nowrap >
<!--<hbj:link id="SiteLink" tooltip="<%=siteTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openSite();"><hbj:textView nested="true" text="<%=siteTextStr%>"/></hbj:link> -->
<hbj:link id="SiteLink" tooltip="<%=siteTooltipStr%>"
linkDesign="FUNCTION" reference="#">
<% if (!isPreview) { SiteLink.setOnClientClick("javascript:openSite();");} %>
<hbj:textView nested="true" text="<%=siteTextStr%>"/>
</hbj:link>
</TD>
<TD nowrap>
<%}%>
<%
if (showHelpLink)
{ %>
<TD nowrap >
<!--<hbj:link id="HelpLink" tooltip="<%=helpTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openHelp();"><hbj:textView nested="true" text="<%=helpTextStr%>"/></hbj:link> -->
<hbj:link id="HelpLink" tooltip="<%=helpTooltipStr%>"
linkDesign="FUNCTION" reference="#">
<% if (!isPreview) { HelpLink.setOnClientClick("javascript:openHelp();");} %>
<hbj:textView nested="true" text="<%=helpTextStr%>"/>
</hbj:link>
</TD>
<TD nowrap>
<%}%>
<%
if (!isAnonymous)
if (showPersonalizeLink)
if (showHelpLink)
{ %>
<TD nowrap id="personalizePortalSep" class="prtlHdrSep"></TD>
<%} %>
<TD nowrap id="personalizePortal">
<hbj:link id="PersonalizeLink"
tooltip="<%=personalizePortalTooltipStr%>"
linkDesign="FUNCTION"
reference="#">
<% if (!isPreview) {PersonalizeLink.setOnClientClick("javascript:runPersonalizePortal();");}%>
<hbj:textView nested="true" text="<%=personalizeTextStr%>"/>
</hbj:link>
</TD>
<TD nowrap></TD>
<%}
if (showNewWindowLink)
if (showHelpLink || showPersonalizeLink)
{ %>
<TD nowrap id="newWindowSep" class="prtlHdrSep"> </TD>
<%}
else
{%>
<TD nowrap> </TD>
<%}%>
<TD nowrap id="newWindow">
<hbj:link id="newWindowLink" tooltip="<%=newWindowStr%>"
linkDesign="FUNCTION"
reference="#">
<% if (!isPreview) {newWindowLink.setOnClientClick("javascript:openNewPortalWindow();");}%>
<hbj:textView nested="true" text="<%=newWindowTextStr%>"/>
</hbj:link>
</TD>
<%}%>
<%}%>
<TD>
<%if (ShowLogInLogOffLink)
{%>
<TABLE cellspacing="0" cellpadding="0" border="0" class="prtlHeaderFunctionsContainer" height="100%">
<TR><%
if (showHelpLink || showPersonalizeLink || showNewWindowLink)
{%>
<%
if(!showHelpLink && !showNewWindowLink)
{%>
<TD nowrap id="logoffsep1" class="prtlHdrSep"> </TD>
<%
}else
{%>
<TD nowrap id="logoffsep2" class="prtlHdrSep"> </TD>
<%}%>
<TD nowrap>
<%
}else
{%>
<TD nowrap > </TD>
<%
if (isAnonymous)
{%>
<TD nowrap>
<!<hbj:link id="LoginLink" tooltip="<%=logInTooltipStr%>" linkDesign="FUNCTION" reference="javascript:logIn();"><hbj:textView nested="true" text="<%=logInTextStr%>"/></hbj:link>>
<hbj:link id="LoginLink"
tooltip="<%=logInTooltipStr%>"
linkDesign="FUNCTION"
reference="#">
<% LoginLink.setOnClientClick("javascript:logIn();"); %>
<hbj:textView nested="true" text="<%=logInTextStr%>"/> </hbj:link>
</TD>
<%}
else
{%>
<TD nowrap>
<!<hbj:link id="LogoffLink" tooltip="<%=logOffTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openLogoffMsg();"><hbj:textView nested="true" text="<%=logOffTextStr%>"/></hbj:link>>
<hbj:link id="LogoffLink"
tooltip="<%=logOffTooltipStr%>"
linkDesign="FUNCTION"
reference="#">
<%if (!isPreview) { LogoffLink.setOnClientClick("javascript:openLogoffMsg();");} %>
<hbj:textView nested="true" text="<%=logOffTextStr%>"/> </hbj:link>
</TD>
<%}%>
</TR>
</TABLE>
<%} %>
</TD>
</TR>
</TABLE>
</TD>
<%}%>
<TD width="12%" nowrap class="prtlHdrLogoContainer">
<% if (isAccessabilityOn)
{%>
<%}%>
</TD>
</TR>
</tbody>
</TABLE>
</hbj:form>
</hbj:page>
</hbj:content>
<form name="logoffForm" style="display:none;position:absolute;top:-5000;left:-5000" action="<%=GetLogoffURL(componentRequest)%>" method="POST">
<input type="hidden" name="logout_submit" value="true">
</form>
<script>
<% if (!isPreview) {%>
if (disablePersonalize) {
EPCM.raiseEvent("urn:com.sapportals:navigation", "PersonalizePortalDisable", "");
<%}%>
setFocusOnHeader();
EPCM.subscribeEvent("urn:com.sapportals.portal:browser","load",setFocusOnHeader);
</script> -
Is ther anyway to get a custom tag to accetp ${variableName} syntax instead of <%= variableName %>? Im working with a DynaValidatorForm and the form values don't seem to be accessible via <%= %> calls.
If there is no other way ot getting variable information into a custom tag, can someone please explain how to extract DynaActionForm form values in a way that will work with custom tags?also note that it doesnt need to be a String that is returned , If the variabel you are retrieveing is some Object
then
public void setvalue( String value ) throws JspException {
AnObject arg=(AnObject )
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate
("value", value, AnObject .class, this, pageContext); this.value=arg;
} -
Register 12 VerifyError exception when compiling jsp with that jsp tag!
Hi everybody,
We implemented a tag which is charged with a simple task like just "out.println"s,
on production with WL5.1 SP11,jdk1.2.
Then we got java.lang.VerifyError exception which is also denoted at Giuseppe Madonna's
mail on ( http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=6834&utag=
) that "java.lang.VerifyError: Register 12 contains wrong type"
To be able to find the inconsistency in class files denoted at VerifyError exception,
we delete the tmp dir. of web app resides in a war.
Also the related java beans used in jsp tag and related jsp, are in a jar on our
classpath and .tld file resides in the .war file of our web application.
But also, I must define that it is our first tag implemented after we migrate to
the .war file after the web application directory structure of same application(that
old dir. also deleted), I know it is silly but, is it possible that WL can now refer
to something related our previous directory structure of our app. like that old .tld
file or classes?
Or may it be related with the difference between jdk versions on the test and the
production server?
Any help will be really appreciated..
Many thanks,
Banu
Start up weblogic with -
java -noverify ....
Mike
"banu" <[email protected]> wrote:
>
>Hi everybody,
>We implemented a tag which is charged with a simple task like just "out.println"s,
>on production with WL5.1 SP11,jdk1.2.
>
>Then we got java.lang.VerifyError exception which is also denoted at Giuseppe
>Madonna's
>mail on ( http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=6834&utag=
>) that "java.lang.VerifyError: Register 12 contains wrong type"
>
>To be able to find the inconsistency in class files denoted at VerifyError
>exception,
>we delete the tmp dir. of web app resides in a war.
>
>Also the related java beans used in jsp tag and related jsp, are in a jar
>on our
>classpath and .tld file resides in the .war file of our web application.
>
>But also, I must define that it is our first tag implemented after we migrate
>to
>the .war file after the web application directory structure of same application(that
>old dir. also deleted), I know it is silly but, is it possible that WL can
>now refer
>to something related our previous directory structure of our app. like that
>old .tld
>file or classes?
>
>Or may it be related with the difference between jdk versions on the test
>and the
>production server?
>
>
>Any help will be really appreciated..
>Many thanks,
>Banu
>
-
Build-time errors with custom tags in wkshop sp3
We have custom tags which create tag variables declared in the .tld file as follows:
<tag>
<name>contentsIterator</name>
<tag-class>org.cap.documentaccess.taglibs.ContentsIteratorTag</tag-class> <tei-class>org.cap.documentaccess.taglibs.ContentsIteratorTEI</tei-class>
<body-content>JSP</body-content>
<display-name>Contents Iterator</display-name>
<description>
</description>
<variable> <name-from-attribute>id</name-from-attribute> <variable-class>org.cap.documentaccess.Content</variable-class>
<declare>true</declare>
<scope>NESTED</scope>
</variable>
<attribute>
<name>id</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description>
</description>
</attribute>
The calling jsp contains the following:
<cap:contentsIterator id="content">
The app built fine in wkshop(sp2) but in sp3 we get the following:
A name-from-attribute variable cannot reference a tag attribute that is request time or is not required.
Has the sp3 compiler become less forgiving or was this an oversight in sp2?if u are using weblogic workshop for ur application import c.tld into WEB-INF
and just import standard.jar, jstl.jar to WEB-INF/lib.
if u are using other than weblogic work shop like tomcat
1.just copy c.tld to WEB-INF.
2.create a 'lib' directoty inside WEB-INF copy standard.jar,jstl.jar files to that lib directory.
i think it should work. -
Error With Customer Exit Variable
Hi,
I need To Create Customer Exit For Text Variable based on Two Input Variable values.
can any one correct my code Code is written below based on quarter and Fiscalyearvarient.
I have to get calmonth Text value.
I am getting the error as : "I_T_VAR_RANGE" is a table without a header line and therefore has no
Component Called "0PERIV".
DATA : l_s_range TYPE rsr_s_rangesid,
loc_var_range LIKE rrrangeexit.
IF i_step = 2.
CASE i_vnam.
WHEN 'ZTXT_CML' .
CLEAR: l_s_range.
LOOP AT i_t_var_range INTO L_S_VNAM WHERE vnam = 'ZQUAR' AND vnam = '0periv'.
IF i_t_Var_range-0PERIV = 'IE'.
IF i_t_var_range-ZQUAR = '1'.
l_s_range-low = 'APRIL'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF i_t_var_range-ZQUAR = '2'.
l_s_range-low = 'JULY'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF i_t_var_range-ZQUAR = '3'.
l_s_range-low = 'OCTOBER'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF i_t_var_range-ZQUAR = '4'.
l_s_range-low = 'JANUARY'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ENDIF.
ELSEIF i_t_var_range-0PERIV = 'K4'.
IF i_t_var_range-ZQUAR = '1'.
l_s_range-low = 'JANUARY'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF i_t_var_range-ZQUAR = '2'.
l_s_range-low = 'APRIL'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF i_t_var_range-ZQUAR = '3'.
l_s_range-low = 'JULY'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF i_t_var_range-ZQUAR = '4'.
l_s_range-low = 'OCTOBER'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ENDIF.
ENDIF.
APPEND l_s_range TO e_t_range.
ENDLOOP.
ENDCASE.
ENDIF.Hi Supraja,
You would have to declare I_T_VAR_RANGE internal table as the table with an header line.
This you will find in data declaration segment.
ie
DATA : I_T_VAR_RANGE type <table name> WITH HEADER LINE.
or
Create a work area like l_s_var_range.
Use work area while performing operations in your code and later append the record to the table i_t_var_range.
DATA : L_S_VAR_RANGE type i_t_var_range.
Also, i_step = 3 is the right one, because you are processing the customer exit based on the values of the user input of two variables.
Modified code below.
DATA : l_s_range TYPE rsr_s_rangesid.
DATA : L_S_VAR_RANGE type i_t_var_range,
loc_var_range LIKE rrrangeexit.
IF i_step = 3.
CASE i_vnam.
WHEN 'ZTXT_CML' .
CLEAR: l_s_range.
LOOP AT i_t_var_range INTO l_s_var_range WHERE vnam = 'ZQUAR' AND vnam = '0periv'.
IF l svar_range -0PERIV = 'IE'.
IF l_s_var_range -ZQUAR = '1'.
l_s_range-low = 'APRIL'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF l_s_var_range -ZQUAR = '2'.
l_s_range-low = 'JULY'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF l_s_var_range -ZQUAR = '3'.
l_s_range-low = 'OCTOBER'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIFl_s_var_range -ZQUAR = '4'.
l_s_range-low = 'JANUARY'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ENDIF.
ELSEIFl_s_var_range -0PERIV = 'K4'.
IF i_t_var_range-ZQUAR = '1'.
l_s_range-low = 'JANUARY'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF l_s_var_range -ZQUAR = '2'.
l_s_range-low = 'APRIL'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF l_s_var_range -ZQUAR = '3'.
l_s_range-low = 'JULY'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ELSEIF l_s_var_range -ZQUAR = '4'.
l_s_range-low = 'OCTOBER'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
ENDIF.
ENDIF.
APPEND l_s_range TO e_t_range.
ENDLOOP.
ENDCASE.
ENDIF.
Hope it helps,
Best regards,
Sunmit. -
Hi All,
I have created a custom idoc for creation of master data in the system. This custom idoc is using a custom function module to process the idocs. In the FM i have used Call transaction method to upload the master data in the sap system. Everything seems to be working fine.
But the problem is that whenever any external system creates more than one idoc, first idoc is posted successfully while others fail with an error message "No status record was passed to ALE by the application.". Please let us know how we can resolve it.
Correct Answers will be rewarded.
Regards,
Sridhar.Hello
Refer to following thread:
The specified item was not found.
Thanks
Amol Lohade
Maybe you are looking for
-
Regarding IBOTS in OBIEE 11.1.1.5
Hi , My requirement is to create a new IBOT and using this ibot i have to purge the cache.This process i have to schedule it. I have to do this in OBIEE 11.1.1.5 can any one please help me in giving the steps to do this requirement. Thanks
-
How can I get a picture in a Custom Package that has a Stroke and/or a border and get the image shown fully, and not cropped in one way or other? When I add the stroke/border it adds them inside the cell, thereby altering the ratio of the area for th
-
I have configured my android to connect to .me / cloud email. It works. But is does not do automatic email delivery. It seems to do fetch, not push. The settings are for imap. Can anybody tell me how to get push?
-
Create report with graph and able to make notes?!
I need to create some graphs in Crystal Reports. As folks review the report graphs, they want to make notes about certain data points on the graph. They would like to save their notes for future reviewing of graph data. I called Business Objects sa
-
hi, There is replication issue between primary and standby ISE node.Once check logs on both node the certificate was expired.There is self sign certificate installted on both devices Any body advise me how i can renew self signed certificate on both