Using JSTL 1.0 on WebLogic 8.1
Hi,
I'm just starting out to learn how to use JSP Tag Libraries and JSTL 1.0. I tried to deploy the examples on Weblogic 8.1SP3 and it works ok. But when I tried to use the tag libraries in my own application, I got this error:
Error 500--Internal Server Error
java.lang.NoClassDefFoundError: javax/servlet/jsp/el/VariableResolver
Here's what I did to deploy the tag libraries
1. Copy the standard.jar and jstl.jar into my WEB-INF/lib directory.
2. Copy the c.tld into my WEB-INF\tld directory.
3. Edit my web.xml to add this entry
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>WEB-INF/tld/c.tld</taglib-location>
</taglib>
4. In my JSP, import the tag-library with this directive
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
Any ideas what I might have missed here? Thanks!
WARNING! WARNING! DANGER WILL ROBINSON!
The URI you mentioned: http://java.sun.com/jsp/jstl/core is for JSTL 1.1
This requires a JSP2.0 container (eg Tomcat 5)
Weblogic 8.1 is still only 1.2 compliant.
You need JSTL 1.0 for that.
You import it with the tag <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> (not the difference - this one does not have "jsp" in it)
Seems like WebLogic is missing the jsp-api.jar that Tomcat installation has.
I copied the JAR over into the WEB-INF for my application Bad move IMO. If you have the correct version of standard.jar and JSTL .jar you shouldn't need anything else.
Make sure you have the version that is standard1-0
Another note on installation:
All you need are the jar files in web-inf/lib.
No tlds lying around
No entries in web.xml
The tld file is hidden inside standard.jar. The webapp will find it automatically if you use the correct URI.
Cheers,
evnafets
Similar Messages
-
How to use jstl in weblogic 8.1
I tried to use JSTL in my jsp file and I add
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> at the top line. But the server reported
java.lang.NoClassDefFoundError: javax/servlet/jsp/el/VariableResolver
how to solve this problem?WebLogic 8.1 supports JSP 1.2, which doesn't natively implement the JSTL or the expression language. If you download the Jakarta Taglibs implementation of the JSTL (for JSP 1.2, not JSP 2.0), then you can use the JSTL taglib as a normal taglib. Note that this doesn't give you the ability to use the other JSP 2.0 tag features, like using the expression language in body content.
Make sure that you use the uri value specified in the tld that you're using. I believe the values are different between the JSP 1.2 and JSP 2.0 versions. -
Using JSTL on Weblogic 8.1 SP2
I'm trying to create a web app running on Weblogic 8.1 SP2 that uses JSTL tags.
I've downloaded the Apache 1.0.5 Reference Implementation of the JSTL 1.0 spec,
but I can't get the sample web-app (standard-examples.war) to work correctly.
When I go to the "General Purpose Tag Examples" and try to view the Out example
JSP, I get a large exception saying that java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
(full stack trace at bottom). This also happens when I try to view the JSP source
and pretty much any other example. I found that the German example in "I18N &
Formatting" works, but running the Italian example gives a new exception:
Parsing of JSP File '/format/ItalianLocale.jsp' failed:
/format/ItalianLocale.jsp(12): for tag 'message', property 'bundle' of tag handler
class 'org.apache.taglibs.standard.tag.rt.fmt.MessageTag', the value must be a
runtime expression "<%=...%>", since we cannot do an automatic conversion from
"${itBundle}" to type 'javax.servlet.jsp.jstl.fmt.LocalizationContext' and there
is no custom property editor for that type
probably occurred due to an error in /format/ItalianLocale.jsp line 12:
<fmt:message key="greetingMorning" bundle="${itBundle}"/>
I can, however, get this to work on Tomcat 5.0. Has any else had this problem?
Is there something that I'm doing incorrectly?
Thanks in advance.
-Kelvin
===========================================================
java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
at java.lang.Class.getDeclaredMethods(Class.java:1114)
at java.beans.Introspector$1.run(Introspector.java:1103)
at java.security.AccessController.doPrivileged(Native Method)
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1101)
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:966)
at java.beans.Introspector.getBeanInfo(Introspector.java:370)
at java.beans.Introspector.getBeanInfo(Introspector.java:207)
at java.beans.Introspector.(Introspector.java:351)
at java.beans.Introspector.getBeanInfo(Introspector.java:207)
at java.beans.Introspector.getBeanInfo(Introspector.java:193)
at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
at weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:292)
at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:367)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:223)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:172)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:518)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:362)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
I'm having the same problem, did you find a solution?
"Kelvin" <[email protected]> wrote:
>
>I'm trying to create a web app running on Weblogic 8.1 SP2 that uses
>JSTL tags.
> I've downloaded the Apache 1.0.5 Reference Implementation of the JSTL
>1.0 spec,
>but I can't get the sample web-app (standard-examples.war) to work correctly.
>
>When I go to the "General Purpose Tag Examples" and try to view the Out
>example
>JSP, I get a large exception saying that java.lang.NoClassDefFoundError:
>javax/servlet/jsp/el/ELException
>(full stack trace at bottom). This also happens when I try to view the
>JSP source
>and pretty much any other example. I found that the German example in
>"I18N &
>Formatting" works, but running the Italian example gives a new exception:
>
>Parsing of JSP File '/format/ItalianLocale.jsp' failed:
>--------------------------------------------------------------------------------
> /format/ItalianLocale.jsp(12): for tag 'message', property 'bundle'
>of tag handler
>class 'org.apache.taglibs.standard.tag.rt.fmt.MessageTag', the value
>must be a
>runtime expression "<%=...%>", since we cannot do an automatic conversion
>from
>"${itBundle}" to type 'javax.servlet.jsp.jstl.fmt.LocalizationContext'
>and there
>is no custom property editor for that type
>probably occurred due to an error in /format/ItalianLocale.jsp line 12:
><fmt:message key="greetingMorning" bundle="${itBundle}"/>
>
>
>I can, however, get this to work on Tomcat 5.0. Has any else had this
>problem?
> Is there something that I'm doing incorrectly?
>
>
>Thanks in advance.
>-Kelvin
>
>===========================================================
>java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
> at java.lang.Class.getDeclaredMethods(Class.java:1114)
> at java.beans.Introspector$1.run(Introspector.java:1103)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1101)
> at java.beans.Introspector.getTargetMethodInfo(Introspector.java:966)
> at java.beans.Introspector.getBeanInfo(Introspector.java:370)
> at java.beans.Introspector.getBeanInfo(Introspector.java:207)
> at java.beans.Introspector.(Introspector.java:351)
> at java.beans.Introspector.getBeanInfo(Introspector.java:207)
> at java.beans.Introspector.getBeanInfo(Introspector.java:193)
> at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
> at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
> at weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:292)
> at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
> at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
> at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
> at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
> at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
> at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
> at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
> at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
> at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
> at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
> at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
> at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
> at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
> at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:367)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:223)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:172)
> at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:518)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:362)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
> at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
> at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
> at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
-
Problems with using JSTL with Weblogic 8.1 SP5 - Help!
I keep getting the following error when trying to run my application using JSP tags under Weblogic 8.1 SP5 (using Jrockit in production mode):
/searchinput.jsp(2): Error in using tag library uri='/WEB-INF/lib/regain-search.tld' prefix='search': cannot find tag class: 'net.sf.regain.ui.server.taglib.TagMsg'
probably occurred due to an error in /searchinput.jsp line 2:
<%@ taglib uri="/WEB-INF/lib/regain-search.tld" prefix="search" %>
I have the following jar files in my /WEB-INF/lib directory:
jakarta-regexp-1.4.jar
jstl.jar
standar.jar
log4j-1.2.11.jar
struts.jar
lucene-1.4.3.jar
jsp-api.jar
and the regain-search.tld.
I am using JSTL 1.0.6 (earliest version I could find of JSTL 1.0).
The class files that the tld file is pointing to are in the WEB-INF/classes directory of the application (which is an exploded war file).
Here is what I have as reference in my web.xml file:
<taglib>
<taglib-uri>/WEB-INF/lib/regain-search.tld</taglib-uri>
<taglib-location>/WEB-INF/lib/regain-search.tld</taglib-location>
</taglib>
and it is referenced in searchinput.jsp as:
<%@ taglib uri="/WEB-INF/lib/regain-search.tld" prefix="search" %>
I've looked everyone on the Web trying to find an answer to this - but nothing I've tried has worked.
This all works fine in Tomcat 5.0
Please let me know what I'm doing wrong.
Thanks in advance,
KellyI keep getting the following error when trying to run my application using JSP tags under Weblogic 8.1 SP5 (using Jrockit in production mode):
/searchinput.jsp(2): Error in using tag library uri='/WEB-INF/lib/regain-search.tld' prefix='search': cannot find tag class: 'net.sf.regain.ui.server.taglib.TagMsg'
probably occurred due to an error in /searchinput.jsp line 2:
<%@ taglib uri="/WEB-INF/lib/regain-search.tld" prefix="search" %>
I have the following jar files in my /WEB-INF/lib directory:
jakarta-regexp-1.4.jar
jstl.jar
standar.jar
log4j-1.2.11.jar
struts.jar
lucene-1.4.3.jar
jsp-api.jar
and the regain-search.tld.
I am using JSTL 1.0.6 (earliest version I could find of JSTL 1.0).
The class files that the tld file is pointing to are in the WEB-INF/classes directory of the application (which is an exploded war file).
Here is what I have as reference in my web.xml file:
<taglib>
<taglib-uri>/WEB-INF/lib/regain-search.tld</taglib-uri>
<taglib-location>/WEB-INF/lib/regain-search.tld</taglib-location>
</taglib>
and it is referenced in searchinput.jsp as:
<%@ taglib uri="/WEB-INF/lib/regain-search.tld" prefix="search" %>
I've looked everyone on the Web trying to find an answer to this - but nothing I've tried has worked.
This all works fine in Tomcat 5.0
Please let me know what I'm doing wrong.
Thanks in advance,
Kelly -
Problem using jstl and displaytags
Hi all,
I am using display tags taglib for generation of table. One of the columns has to be shown with the hyperlink attached to it. In order to acheive this i am using jstl taglib together with displaytags
<display:table name="reportList" id="row" requestURI="viewengagementstatus.do" style="width: 100%;">
<display:column title="Period" sortable="true" style="text-align: center;" >
<a href="/jsps/reportsummary.do?eid=<c:out value="${row.eid}" />&reportId=<c:out value="${row.ReportID}" />&reportPeriod=<c:out value="${row.targetDate}"/> " target="_blank"><font size="1"><c:out value="${row.targetDate}"/></font></a>
</display:column>I am using jstl1.1.2.jar for jstl.
When i run this on Weblogic10 and windows OS i am able to view the results. On performing the view source on the IE window, i get the following:
<td style="text-align: center;">
<a href="/jsps/reportsummary.do?eid=78004&reportId=104093&reportPeriod=Nov-2008 " target="_blank"><font size="1">Nov-2008</font></a>
</td>but when the same code is run on the Weblogic deployed on the Linux machine, i am not getting the links and the name:
the view-source of the application deployed on the linux machine shows:
td style="text-align: center;">
<a href="/jsps/reportsummary.do?eid=&reportId=&reportPeriod=" target="_blank"><font size="1"></font></a>
</td>Any Ideas why this is occuring?
Any help would be appreciatedYou should be using the one or the other, not both. Since your actual code shows that you don't need the jstl/core_rt taglib (you're using the JSP EL ${ } in JSTL tags rather than scriptlets <%= %> ), just remove that taglib declaration and continue using the jstl/core taglib.
You should also rather place both the JSTL and standard JAR in the classpath of the application server. In case of Tomcat, put it in its /lib directory. Then remove all unnecessary JSTL and Standard JAR and TLD files from your whole webapplication project and also remove any related entries from the web.xml of your webapplication project. To use JSTL you only need to put the JAR files in the classpath of the application server and define the taglib in your JSP. Nothing less and nothing more. If you're using JSTL 1.2 rather than JSTL 1.1, then you need to remove the standard.jar file too since it is already merged in the jstl-1.2.jar file.
Oh, the web.xml should also be declared that way that the application server uses at least servlet 2.4. -
hi
i have a Value Object which consists of a vector as one of its attribute.
This vector in turns consists of another Value Object called ParamVO.
This ParamVO consists of ParamName and ParamValue.
I would like to iterate this vector using JSTL.
However I am unable to display the values in ParamVO.
My codes look like this:
<c:forEach items="<%=myVector%>" var="$ParamVO">
<tr>
<td><c:out value="${ParamVO.ParamName}"/></td>
</tr>
</c:forEach>
pls advice. Thanks !Hi duffymo
thanks for your reply. I have tried out your codes, however I get this error instead.
javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "value" with value "${ParamVO.ParamName}": Unable to find a value for "ParamName" in object of class "java.lang.String" using operator "." (null)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:146)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:166)
at org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(ExpressionEvaluatorManager.java:112)
at org.apache.taglibs.standard.tag.el.core.ExpressionUtil.evalNotNull(ExpressionUtil.java:85)
at org.apache.taglibs.standard.tag.el.core.OutTag.evaluateExpressions(OutTag.java:137)
at org.apache.taglibs.standard.tag.el.core.OutTag.doStartTag(OutTag.java:95)
at jsp_servlet._omp._evs._assigncv.__displaycapacity._jspService(__displaycapacity.java:552)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:431)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(RequestDispatcherImpl.java:342)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:246)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1058)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:451)
at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:401)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6291)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3575)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2573)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151) -
A Tip for using EJB 3.0 with WebLogic Ant Tasks
I started out writing this up as a problem, but then I found the answer so I'm, posting a tip instead.
When I tried to write an EJB [stateless] using EJB 3.0 in my legacy Weblogic ear project I started getting this error:
<pre>
No EJBs found in the ejb-jar file 'test'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
</pre>
This is why: wlcompile will put the class files in the App-Inf/classes directory unless it finds an ejb-jar.xml file in the META-INF directory for the module it is working on. With EJB 3.0, I wasn't using an ejb-jar.xml file because it was unnecessary. Later, Appc runs and it complains <b>because there are no classes module directory, they went into the shared ear folder instead.</b>
Here's I how it working again: Use javac [not wlcompile] to compile the EJB 3.0 module and make sure that the class files go into the correct module directory. Then you can use wlappc to generate all the associated files for the EJB. I have sucessfully deployed an ear file that uses both EJB 2.x and EJB 3.0 with this approach.
I wish Weblogic's own ejb3.0 sample application used their split directory deployment.
Good Luck.
John AronsonHi John,
I am working on development an enterprise application using EJB 3.0 on Weblogic 10.
While developing, I am keeping all my classes (from ejb's as well as web) into APP-INF/classes directory. It is working fine for Web and ejb 2.0 packages, but ejb 3.0 packages, I get the following error when I keep my ejb 3.0 beans classes in APP-INF/classes directory.
No EJBs found in the ejb-jar file 'customer'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
One solution is to keep the classes under customer ejb directory, but I wan tto keep all the classes in APP-INF/classes directory so that when using Eclipse IDE I can output all compiled sources into APP-INF/classes directory.
Has anyone faced this situation? Any suggestions to fix this issue? -
Hello All,
I am using OracleAS for portal deployment and portlets UI constructed by using jstl.
i have used spring portlet jstl for the jsp pages.
when i am trying to change the language, it is showing '?????' symbols.
I have used correct unicode. i tested in pluto portal server. when i deployed in oracleAS,
for english not a problem. for arabic it is showing as '????'.
i have used this code to get arabic in pluto. same code i used. i am getting error.
<c:set target="${pageContext.response}" property="characterEncoding" value="UTF-8" />
<fmt:setLocale value="ar" />
<fmt:requestEncoding value="UTF-8" />
i know it is not setting charector encoding.
i tried some other too like:
<head>
<META http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
</head>
and
<%@ page pageEncoding="UTF-8" %>
No improvement. please help me out of this.
how can i get arabic support in oracle AS by using jstl?
Thanks,
ArunOnly Apple Account Security could help at this point. You can try calling Apple Support in Canada - you'll have to find one of the several ways, such as Skype, to call an 800 number from outside of the relevant country - and ask for Account Security and see if they can help. Or you can find a friend who speaks Chinese and ask them to help you talk to Apple Support in China. There are really no other options that I know of.
Note, by the way, that these are user-to-user support forums. You aren't speaking with Apple when you post here.
Regards. -
How can i display the values in the vector in a jsp using jstl
in a task i am recieving a vector in a jsp... how can i display those vector values in the jsp using jstl.... plz help me
thanks in advance<%
here you got vector say; v
pagecontext.setAttribute("varname",v);
%>
<c:forEach var="i" items="${varname}">
<c:out value="${i}">
</c:forEach> -
How do I use jstl to insert links that passes sql info?
Hi all,
I'm using JSTL with sql and I want to create a link for every row so that the link would also contain the item in the first column of every row. But I keep getting stuck at saving the value. This is what I've tried:
<c:set var="myName" value="test" scope="page"/>
<tr>
<c:forEach var="row" items="${name.rowsByIndex}">
<tr>
<c:forEach var="column" items="${row}">
<c:if test="row =='uname'">
<c:set var="myName" value="${column}"/>
</c:if>
<td>myName=<c:out value="${pageScope.myName}"/>"> <c:out value="${column}"/> </td>
</c:forEach>
</tr>
</c:forEach>
I either get a link of "edit.jsp?uName=$myName".
Any ideas would be appreciated.
ChrisIntroducing the <c:url> and <c:param> tags!
<c:url value="edit.jsp">
<c:param name="uName" value="${myName}"/>
</c:url>Why the nested loops? When does row=='uname'? Could that ever occur?
If you are after a specific column why not have one loop over ${name.rows} and get ${row.uname}?
What server are you using?
What version of JSTL?
What is the taglib import you have made? -
how to Create and use of Coherence servers in weblogic serevr 11g (10.3.6)?
See the below discussion
How to create and use Webservice controls using WSDL in weblogic portal10.3
Thanks,
Venkat Sarvabatla -
Accessing the value in option Tag in html using JSTL
Hi,
Following is my code
<select>
<option value="1">one </option>
<option value="2">Two</option>
</select>
Now, if I select two from the option, i need to get the value 2, using JSTL( JSP standard Tag Library).
Can someone help me out.
Thanks
Achillies.You need to give the "select" component a name to submit under.
<select name="yourChoice">
<option value="1">one </option>
<option value="2">Two</option>
</select>When you submit this page, it will submit a parameter like yourChoice=2.
In a servlet you retrieve this with request.getParameter("yourChoice");
In JSTL/EL, you can use the param map: ${param.yourChoice} -
Problem while parsing xmlString in jsp using JSTL
HI, I am not able to display data in jsp page that I have stored in string variable in XML form.
I want to print xmlString data in jsp using jstl.
probably i might have to parse it but i don't have idea . Can any one help me PLZ??I managed the code but getting following error
org.apache.jasper.JasperException: javax.servlet.jsp.JspException: Content is not allowed in prolog.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: Content is not allowed in prolog.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:854)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.xml.test_jsp._jspService(test_jsp.java:106)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.xml.sax.SAXParseException: Content is not allowed in prolog.
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSource(ParseSupport.java:227)
org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSourceWithFilter(ParseSupport.java:193)
org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseReaderWithFilter(ParseSupport.java:199)
org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseStringWithFilter(ParseSupport.java:206)
org.apache.taglibs.standard.tag.common.xml.ParseSupport.doEndTag(ParseSupport.java:138)
org.apache.jsp.xml.test_jsp._jspx_meth_x_parse_0(test_jsp.java:168)
org.apache.jsp.xml.test_jsp._jspService(test_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) -
How to write this java code in jsp using jstl tags?
Can anybody help me on this?
I dont know how to check the containsKey using jstl tags?
<%
LinkedHashMap yearMap = (LinkedHashMap)request.getAttribute("yearMap");
TreeSet nocSet = (TreeSet)request.getAttribute("nocSet");
Iterator yearMapIt = yearMap.keySet().iterator();
while(yearMapIt.hasNext())
int yearValue = (Integer)yearMapIt.next();
%>
<tr>
<td><%=yearValue%></td>
<%
LinkedHashMap monthMap = (LinkedHashMap)yearMap.get(yearValue);
Iterator nocSetIt = nocSet.iterator();
while(nocSetIt.hasNext())
String nCase=(String)nocSetIt.next();
if(monthMap.containsKey(nCase))
String count = (String)monthMap.get(nCase);
%>
<td> <%= count %> </td>
<% }
else
%>
<td> 0 </td>
<%
%>
</tr>
<% } %>Edited by: avn_venki on Feb 18, 2008 11:54 PM<c:forEach var="yearMap" items="${requestScope.yearMap}">
<th> <c:out value="${yearMap.key}"/> </th>
<bean:define id="monthMap" value="${yearMap.value}"/>
<c:forEach var="nocSet" items="${nocSet}">
then how to write containsKey using tags?? -
Retaining of values in JSP while using JSTL
Dear All,
I have an application using the struts framework, wherein I am facing a problem.
Here goes the problem " In my JSP's I have multiselect, the JSTL tags works fine when all the server side validations are done. But I get a problem when an error(server side validation error) occurs, I have to retain all the multiple values selected in the Multiselect box.
Can anyone suggest me best way to retain the multiple values.
E.g. My multiselect populates 5 values
A
B
C
D
E
As a end user I select "B, C,E", and a server side validation error occurs I have to keep the values "B, C, E" selected in the above list of 5 values using JSTL
Thanking you in anticipation.
regards,
Mohan.Dear Friend,
The control I am placing(multi select) has the data type in the form as String[],
The validation error(server side) I was talking about is: I have 5 fields in JSP, in one of the 5 fields I have a title, which is unique in the database, if the end user enters an already existing title, then all the values previously (entered, selected) for rest of the controls should be retained and an error message from application resources is populated about the title duplication.
Here I will show the entered values in text box and also the multi-selects, so using JSTL, I want a way out to retain the previously selected values....
In my JSP for the control I say <input type="select" property="propertyname" multiple="true">
of struts...
Thank you
Mohan.
Maybe you are looking for
-
How to use a java class in difference project under a same workspace!
Hi, there: I have a problem. I want to reuse a java class which is located in another project of the same workspace. I do not know how to set the two project setting or how to import the java class. I deeply appreciate. Sheng-He
-
Update workflow variable in a form associated to manual action
I have a view called userfind in my workflow, I pass this view to a search form, in this form I would like to update this view. I am passing this view object as variable to the manual form. In my form I am trying to update this object as follows <Fie
-
Hello guys... i get this message up. please help!!!
-
Difficulty in Activating CS5.5 Design Standard
I am getting really frustrated with the difficulty of activating my Creative Suite 5.5 and am wondering if anyone with sufficient technical knowledge can assist me. I purchased and installed my CS5.5. around a week ago, and have been using it every d
-
Lightroom 3 cannot open because another application already has it opened.
Lightroom 3 cannot open because another application already has it opened. I received this confirmation after sending photo files to my E Book. Please help.