JSP tag collaboration with BI Beans
Hello!
We need to reorganize a dimension hierarchy in runtime during presentation. It's merely a matter of formatting. We use a tag handler that reeds its body doing some operations and puts a new content for body in page.
We tried this
====================
<My:BodyReaderTag>
<orabi:ListCombo renderAs="combo" autoSubmit="true" biList="${tagtest_dimMemList1_data}"/>
</My:BodyReaderTag>
====================
When doing this my tag grabs all content except the output from orabi:ListCombo. It seems like orabi:ListCombo does not push the JspWriter on the stack (by collaboration with orabi:BIBody tag). When, for testing purposes only, I removed the orabi:BIBody tag, I got the result I would like to get.
How can I get the output from orabi:ListCombo tag? Or if that is not possible, where can I find detailed information so I can create my own customized tag handlers that collaborates with BI Beans,
Thanks in advance,
Mats
The implementation of the <orabi:ListCombo> is based on UIX JSP tags technology. It uses an instance of oracle.cabo.ui.RenderingContext created earlier by the BIThinSession tag to do the actually rendering.
May I ask what are you trying to do with the <my:reformatter> tag? The ListCombo tag has attributes like "styleClass" and "inlineStyle" that can be used customize the look and feel of the content it renders. Also, we provide a set of built-in styles. Have you looked into whether you can use "styleClass" or "inlineStyle" attributes to satisfy your formatting needs?
Hope this helps,
Keith
Oracle Business Intelligence Product Management
BI on Oracle: http://www.oracle.com/bi/
BI on OTN: http://www.oracle.com/technology/products/bi/
BI Beans http://www.oracle.com/technology/products/bib/index.html
Discoverer: http://www.oracle.com/technology/products/discoverer/
BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
BI Samples: http://www.oracle.com/technology/products/bi/samples/
Blog: http://oraclebi.blogspot.com/
Similar Messages
-
JSP Tag libs with struts Urgent
Hi
Has anyone implemanted jsp tag libs with the help of struts-bean.tld,struts-html.tld etc,
I need to use these , but I am not clear with how the page retrives the key values
example:
table width="400" cellpadding="10" cellspacing="0" border="0" bgcolor="#cccccc">
<tr>
<td valign="top" colspan="2">
<bean:message key="logon.welcome"/>
<html:errors/>
</td>
</tr>
<tr>
<bean:message key="logon.welcome"/>----?
I don't no how the"message bean" gets its key value dynamically? how it retrieves from its Application resource file? any idea?
Also has anyone implemanted jsp templates if so kindly guide me thru these
thanks!Hi..
I am myself involved in implementing custom taglibs extending struts functionality. This can be done by extending the struts base classes and tag handlers. If you're still working on this topic, please let me know and we might share experiences.
Best regards,.
- Bj�rn Syse, [email protected]
Hi
Has anyone implemanted jsp tag libs with the help of
struts-bean.tld,struts-html.tld etc,
I need to use these , but I am not clear with how the
page retrives the key values
example:
table width="400" cellpadding="10" cellspacing="0"
border="0" bgcolor="#cccccc">
<tr>
<td valign="top" colspan="2">
<bean:message key="logon.welcome"/>
<html:errors/>
</td>
</tr>
<tr>
<bean:message key="logon.welcome"/>----?
I don't no how the"message bean" gets its key value
dynamically? how it retrieves from its Application
resource file? any idea?
Also has anyone implemanted jsp templates if so
kindly guide me thru these
thanks! -
How to use jsp:plugin action with type = bean
Hi everybody,
I'm new to JSP so it could be a stupid question but I'm wondering how can I use a jsp:plugin action with a type equal to "bean".
Everyone is talking about type equal to applet so the browser can display this applet but if the type will be a bean so then
does it mean I can send a javaBean class to the client?
If yes, then can the javaBean object be executed on a client machine?
Or maybe I'm wrong. I don't know how it works.
Please give me a resolution.
Thanks,
Rafal.its not working.. it shows exception class not found exception.
i have placed the jsp and applet class in the same folder. but its not working.
jsp file path : OracleSpatial\mypackage\webmap.jsp
applet class : OracleSpatial\mypackage\demoApplet.class
demoApplet class inside package "mypackage".
code inside JSP is :
<jsp:plugin type="applet"
code="mypackage.demoApplet.class" width = "100%" height = "100%" >
</jsp:plugin> -
Error in jsp tag files with jdev 101310 and oc4j standalone10130
Hello,
I'm creating a simple jsp tag file that show "it´s test" and a jsp with the jsp tag file,
the problem is:
java.lang.NoSuchMethodError: oracle.jsp.runtime.OracleJspRuntime.releaseTagHandlers(Ljavax/servlet/jsp/PageContext;)V at oracle.jsp._tag._tagMeta_tag.doTag(_tagMeta_tag.java:71) at admin.applicationproperties._jspService(_applicationproperties.java:56) [SRC:/admin/applicationproperties.jsp:10] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:270) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:42) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:204) at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209) at com.gtsCol.bonPen.servlets.ApplicationPropertiesServlet.doGet(ApplicationPropertiesServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:299) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:187) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
my mail is [email protected]
thansk for your help.Hola a todos,
Estoy creando un jsp tag file que solo muestra un mensaje "Esto es una prueba" y la incluyo en una jsp normal, el problema es que no parece soportar este tipo de tags.
El error que muestra es el siguiente.
java.lang.NoSuchMethodError: oracle.jsp.runtime.OracleJspRuntime.releaseTagHandlers(Ljavax/servlet/jsp/PageContext;)V at oracle.jsp._tag._tagMeta_tag.doTag(_tagMeta_tag.java:71) at admin.applicationproperties._jspService(_applicationproperties.java:56) [SRC:/admin/applicationproperties.jsp:10] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:270) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:42) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:204) at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209) at com.gtsCol.bonPen.servlets.ApplicationPropertiesServlet.doGet(ApplicationPropertiesServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:299) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:187) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
mi correo electronico es [email protected]
De antemano gracias por la ayuda que me puedan brindar. -
How to upload a file into server using j2ee jsp and servlet with bean?
How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
Anyone help me please!u don't need j2ee and struts to do file uploading. An example is as such
in JSP. u use the <input> file tag like
<input type="file"....>You need a bean to capture the file contents like
class FileUploadObj {
private FormFile srcFile;
private byte[] fileContent;
// all the getter and setter methods
}Then in the servlet, you process the file for uploading
* The following loads the uploaded binary data into a byte Array.
FileUploadObj form = new FileUploadObj();
byte[] byteArr = null;
if (form.signFile != null) {
int filesize = form.srcFile.getFileSize();
byteArr = new byte[filesize];
ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
bytein.read(byteArr);
bytein.close();
form.setFileContent(byteArr);
// Write file content using Writer class into the destination file in the server.
... -
Error using selectmany tags with backing beans - Beta 1
Hi All,
I'm not having any luck getting any of the selectmany tags working with back-end beans. I've concluded it just doesn't work. My example is derived from the selectmany sample in the tutorial, which also just doesn't work (there are 4 or 5 problems with the sample in the tutorial, including the fact that there's no tag called 'selectmany_checkbox' in Beta 1, it's renames to selectmany_checkboxlist. But I digress).
Anyway, the following is the relevant JSP snippet:
<html:selectmany_menu value="#{facesTest.items}">
<faces:selectitem itemValue="foo" itemLabel="foo" />
<faces:selectitem itemValue="bar" itemLabel="bar" />
</html:selectmany_menu>
Here's the relevant backing bean snippet:
protected ArrayList items = null;
public Object[] getItems() {
System.out.println("getItems():ENTRY");
if (items != null)
return items.toArray();
else
return null;
public void setItems(Object[] items)
System.out.println("setItems():ENTRY");
int len = 0;
if (null == items ||(len = items.length) == 0) {
return;
if (this.items != null)
this.items.clear();
this.items = new ArrayList(len);
for (int i = 0; i < len; i++) {
this.items.add(items);
I've declared the bean as follows in the face-config.xml:
<managed-bean>
<managed-bean-name>facesTest</managed-bean-name>
<managed-bean-class>ipt.faces.FacesTest</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
The errors vary, but basically when I don't select anything from the multi-select menu, all is fine. When I do select something I get one of two messages returned thru the messages tag, either "Conversion Error setting value 'null' for 'expression'" when I select one item or " Conversion Error setting value '[Ljava.lang.String;@397d4e' for 'expression'." when I select two items.
Turning on 'FINEST', I get the output below: Any ideas? I've noticed several posting regarding the selectmany tags, any response on getting these to work?
thanks!
Steve
FINE: Exiting RenderResponsePhase
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINE: Begin executing lifecycle phases
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINEST: execute(phaseId=RESTORE_VIEW 1)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINEST: Begin execute(phaseId=RESTORE_VIEW 1)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RestoreViewPhase execute
FINE: Entering RestoreViewPhase
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getMappingForR
equest
FINEST: servletPath /hello.jsf
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getMappingForR
equest
FINEST: pathInfo null
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getFacesMappin
g
FINE: URL pattern of the FacesServlet executing the current request .jsf
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl convertViewId
FINE: viewId after appending the context suffix /hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.StateManagerImpl restoreView
FINE: Begin restoring view from response /hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.StateManagerImpl restoreView
FINE: End restoring view from response /hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl restoreView
FINEST: set character encoding on request to ISO-8859-1
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RestoreViewPhase execute
FINE: Postback: Restored view for /hello.jsf
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RestoreViewPhase execute
FINE: Exiting RestoreViewPhase
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINEST: End execute(phaseId=RESTORE_VIEW 1)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl hasPostDataOrQuery
Params
FINEST: Request Method: POST/PUT
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINEST: execute(phaseId=APPLY_REQUEST_VALUES 2)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINEST: Begin execute(phaseId=APPLY_REQUEST_VALUES 2)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
FINE: Entering ApplyRequestValuesPhase
Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
FINE: getValue(ref=facesTest.items)
Jan 9, 2004 10:11:52 AM com.sun.faces.el.VariableResolverImpl resolveVariable
FINE: resolveVariable: Resolved variable:ipt.faces.FacesTest@f97d27
getItems():ENTRY
Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
FINE: getValue Result:[Ljava.lang.Object;@11fb68f
Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
FINEST: -->Returning [Ljava.lang.Object;@11fb68f
Jan 9, 2004 10:11:52 AM com.sun.faces.el.VariableResolverImpl resolveVariable
FINE: resolveVariable: Resolved variable:ipt.faces.FacesTest@f97d27
Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getType
FINE: isReadonly result:class [Ljava.lang.Object;
Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
FINE: getValue(ref=facesTest.items)
Jan 9, 2004 10:11:52 AM com.sun.faces.el.VariableResolverImpl resolveVariable
FINE: resolveVariable: Resolved variable:ipt.faces.FacesTest@f97d27
getItems():ENTRY
Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
FINE: getValue Result:[Ljava.lang.Object;@1262667
Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
FINEST: -->Returning [Ljava.lang.Object;@1262667
Jan 9, 2004 10:11:52 AM com.sun.faces.context.FacesContextImpl addMessage
FINE: Adding Message[sourceId=_id0:_id7,summary=Conversion Error setting value '
[Ljava.lang.Object;@1262667' for 'expression'.)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
FINE: Exiting ApplyRequestValuesPhase
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINEST: End execute(phaseId=APPLY_REQUEST_VALUES 2)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINEST: execute(phaseId=PROCESS_VALIDATIONS 3)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINEST: Begin execute(phaseId=PROCESS_VALIDATIONS 3)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.ProcessValidationsPhase execute
FINE: Entering ProcessValidationsPhase
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.ProcessValidationsPhase execute
FINE: Exiting ProcessValidationsPhase
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINEST: End execute(phaseId=PROCESS_VALIDATIONS 3)
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
FINE: Skipping to RenderResponsePhase
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RenderResponsePhase execute
FINE: Entering RenderResponsePhase
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RenderResponsePhase execute
FINE: About to render view /hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl renderView
FINE: About to render view /hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getFacesMappin
g
FINE: URL pattern of the FacesServlet executing the current request .jsf
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl renderView
FINE: Found URL pattern mapping to FacesServlet .jsf
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl renderView
FINEST: Before dispacthMessage to newViewId /hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getFacesMappin
g
FINE: URL pattern of the FacesServlet executing the current request .jsf
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getViewIdPath
FINEST: viewId after modifications /hello.jsf
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ApplicationImpl createConverte
r
FINEST: Created converter of type javax.faces.convert.BooleanConverter
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl writeState
FINEST: Begin writing state to response for viewId/hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl writeState
FINEST: End writing state to response for viewId/hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.StateManagerImpl saveSerialize
dView
FINE: Begin creating serialized view for /hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.StateManagerImpl saveSerialize
dView
FINE: End creating serialized view /hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl renderView
FINEST: After dispacthMessage to newViewId /hello.jsp
Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RenderResponsePhase execute
FINE: Exiting RenderResponsePhaseCould you post your code example? I am having the same problem. And I am wondering how you can set the value, label and description using the String[] return type. I thought the object[] would basically be a SelectItem Array...
thanx! -
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
>
-
Experiences developing iViews with JSP tags
Hi,
has anyone experiences in the development of iViews using JSPs and the JSP tags ? Especially the useBean tag... I think it should be no problem to store beans in the session. If I want to share the bean among iView is it enought to synchronized each method of the bean ?
ThanksHi O.,
please, before going on guessing around what synchronization means, read some tutorial, that's what the link was thaught for. It is no problem at all not to know this topic, it's definitely some more advanced topic within the language, but it doesn't help if you don't know it to guess how it <i>could</i> work/behave.
> if I declare all getters and setters of the bean with
> synchronize I avoid the issue of inconsistent data
Once again: For pure getters and setters this sentence is definitely wrong. As long as complex class members are not manipulated / accessed concurrently, there is no need for synchronization (within the class).
> thread 1 sets a value a concurrent thread 2
> could read the data and would get a not actual value...
> if I synchronize the get and set, thread 2 will be
> able to invoke the getter after thread 1 finished the
> setter.
Once again: You don't have it in your hands which thread comes first. And synchronizing a method only means that a thread calling this method will run through it as an atomic operation, no other thread will disturb. But getters and setters normally are atomic, you cannot reach more... If a thread calls two (synchronized) methods of the same object, between these two calls, "the race is open again...".
A good example is http://www-106.ibm.com/developerworks/java/library/j-threads1.html
See the example at the end of this link, that's somehow just what we are talking about. The solution would be to synchronize the <i>setFoo(getFoo() + 1)</i> itself (for example with the bean object as locker). Whereas the synchronization of the methods is superfluous (and time consuming).
Hope it helps
Detlev -
How to configure multiple jsp files with diff beans in faces-config.xml??
Hi All,
I have 2 seperate jsp pages one is a login page and the other is the main application page.Now i am handling both the pages with seperate Bean class with respective setter and getter methods.How can i state the same in faces-config.xml file???..
Is the below way correct???
<?xml version='1.0' encoding='UTF-8'?>
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>LoginForm</managed-bean-name>
<managed-bean-class>useraccess.LoginForm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/login.jsp</from-view-id>
<navigation-case>
<from-action>#{LoginForm.CheckValidUser}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/success.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{LoginForm.CheckValidUser}</from-action>
<from-outcome>fail</from-outcome>
<to-view-id>/fail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>DSRApplication</managed-bean-name>
<managed-bean-class>DSRApplication.LoginForm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/DSR.jsp</from-view-id>
<navigation-case>
<from-action>#{DSRApplication.checkValidDateInAllFields}</from-action>
<from-outcome>alldatasuccess</from-outcome>
<to-view-id>/success.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{DSRApplication.checkValidDateInAllFields}</from-action>
<from-outcome>datafail</from-outcome>
<to-view-id>/fail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>Thanks in advance to all.
regards,
Viswanadh.Thanks ejp for the reply.
Since i am a beginner even i dont know the exact reason to answer you for why am i using JSP with Facelets.Kindly provide me the suggestion and valuable information you have so that i can learn.
Apart from this i want to know whether the way provided in that faces-config.xml is possible or do we have a way to make that possible???
regards,
Viswanadh. -
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. :-/
-
Sp9 / pre-release / problem with jsp tags
WLS 5.1, sp9 pre-release, solaris 2.7, WLCS 3.2
JSP compile fails with the exception...
weblogic.servlet.jsp.JspException: (line -1): Error in tag library
at: 'wl':
The Tag class 'weblogicx.jsp.tags.CacheTag' has no setter method
corresponding to
TLD declared attribute 'async', (JSP 1.1 spec, 5.4.1)
at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
at weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:264)
at weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:95)
at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3873)
at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3623)
at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3484)
at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1817)
at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1658)
at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1548)
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:888)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242
It could just be me - I an un-jarred a version of weblogic-tags-510.jar where WLS
could find it.
mike
Kumar Allamraju <[email protected]> wrote:
>Yes, my JSP is referring the tag libs. I 'm using counter example given
>in
>examples/jsp/tagext/counter directory
>
><NT Performance Pack> NATIVE: created IoCompletionPort successfully.
>I
>oPort=0x000001d4
>Sun Apr 01 12:44:00 PDT 2001:<I> <WebLogicServer> WebLogic Server star
>ted
>Sun Apr 01 12:44:40 PDT 2001:<I> <NT Performance Pack> Allocating: '2'
> NT reader threads
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: init
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
> verbose initialized to: true
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
> packagePrefix initialized to: jsp_servlet
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
> compileCommand initialized to: c:/java/java122/bin/javac.exe
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
> srcCompiler initialized to weblogic.jspc
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
> superclass initialized to null
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
> workingDir initialized to: D:\releases\510\myserver\classfiles
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
> pageCheckSeconds initialized to: 1
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: Using
> Encoding : ISO-8859-1 when constructing PrintWriter instead of Servle
>tOutputStream
>Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: initi
>alization complete
>Sun Apr 01 12:44:42 PDT 2001:<I> <ServletContext-General> looking for
>taglib uri /counter.tld as resource /WEB-INF/counter.tld in Web Applic
>ation root:
>Sun Apr 01 12:44:43 PDT 2001:<I> <ServletContext-General> Generated ja
>va file: D:\releases\510\myserver\classfiles\jsp_servlet\_pagehits.jav
>a
>Sun Apr 01 12:44:45 PDT 2001:<I> <ServletContext-General> file: init
>
>
>what's the change number you get from weblogic.Admin VERSION?
>
>
>--
>Kumar
>
>Mike Reiche wrote:
>
>> From the zip file.
>>
>> It has to be a jsp that references those tag libraries.
>> Other than that it works like a charm.
>>
>> Mike
>>
>> Kumar Allamraju <[email protected]> wrote:
>> >Did you extracted the SP9 zip or exe?
>> >I do not see the following errors when accessing a jsp with SP9? Could
>> >you tell us how to
>> >reproduce it?
>> >
>> >BTW, i will ask our docs folks to correct the startup scripts..
>> >
>> >--
>> >Kumar
>> >
>> >Mike Reiche wrote:
>> >
>> >> I had to remove the 'async' attribute from taglib.tld
>> >>
>> >> And when I use WLCS I have to remove it from weblogic.tld
>> >>
>> >> And the startup scripts provided do not include weblogic-tags-510.jar
>> >> in the classpath.
>> >>
>> >> Mike
>> >>
>> >> "Mike Reiche" <[email protected]> wrote:
>> >> >
>> >> >WLS 5.1, sp9 pre-release, solaris 2.7, WLCS 3.2
>> >> >
>> >> >JSP compile fails with the exception...
>> >> >
>> >> >weblogic.servlet.jsp.JspException: (line -1): Error in
>> >> >tag library
>> >> >at: 'wl':
>> >> >The Tag class 'weblogicx.jsp.tags.CacheTag' has no setter
>> >> >method
>> >> > corresponding to
>> >> >TLD declared attribute 'async', (JSP 1.1 spec, 5.4.1)
>> >> > at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
>> >> > at weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:264)
>> >> > at weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
>> >> > at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
>> >> > at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:95)
>> >> > at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3873)
>> >> > at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3623)
>> >> > at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3484)
>> >> > at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1817)
>> >> > at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1658)
>> >> > at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1548)
>> >> > at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:888)
>> >> > at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
>> >> > at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125)
>> >> > at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109)
>> >> > at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242
>> >
>
-
Problems with managed beans on included JSPs
I've got a problem with managed beans within an included JSP
The included page looks as follows:
<f:subview id="includedPage" binding="#{testBean.component}">
<h:outputText value="Hallo from the included page"/>
<h:outputText value="#{testBean.msg}" />
</f:subview>The including page is also very simple
<f:view>
<html>
<head>
<title>Test include</title>
</head>
<body>
<h:outputText value="Hello from the including page"/>
<jsp:include page="included.jsp"/>
</body>
</html>
</f:view>The testBean is a managed bean with page scope and looks as follows:
public class TestBean {
public UIComponent fComponent;
public TestBean() {
System.out.println("TestBean Constructor called " + toString() );
public String getMsg() {
return "Component = " + fComponent ;
public void setComponent(UIComponent component) {
System.out.println("setComponent called " + component);
fComponent = component;
public UIComponent getComponent() {
System.out.println("getComponent called " + fComponent);
return fComponent;
}The output to the console is:
TestBean Constructor called de.kvb.athena.web.beans.TestBean@1bc16f0
getComponent called null
TestBean Constructor called de.kvb.athena.web.beans.TestBean@18622f3
setComponent called javax.faces.component.UINamingContainer@160877b
TestBean Constructor called de.kvb.athena.web.beans.TestBean@5eb489
and the page displays
Hello from the include page
Hello from the included page Component = null
Can anyone explain this behavior ? What's the reason that the page displays
Component = null
and is it possible to display the parent naming container (subview) this way ?
how ?
ThanksBy "page scope" I assume you mean "none"? If so JSF creates a new bean for each place it's referenced. The closest to the behavior you want, once per "page", is really request scope.
(I'm not sure why the constructor is being called thrice, though. I should look into this.)
I assume you want a bean-per-subview scenario. This should be doable, and one way that allows a dynamic number of subviews would be as follows:
--create a "manager" bean in request scope
--give it get/set methods that retrieves a Map of "TestBean" instances; the idea is that each subview use a different key "s1", "s2", etc
back the manager method with Map implementation that checks if there's already a TestBean associated with the key returns it if yes, else null.
If that seems messy, the component solution is hairy :-) See http://forum.java.sun.com/thread.jspa?threadID=568937&messageID=2812561
--A -
ClassCastException When we use JSP with Normal Bean in WebLogic 5.1
Hai Everybody...
We have an application where JSP files are using the Normal Java beans(Nothing
but a Java Class).Here all jave beans are in a folder ..\myserver\classfiles\
and the jsp files are in ..\myserver\public_html\..... .
This combination is throwing a ClassCastException when the JSP try to Intantiate
the bean....It doesn't give error alway..Initially it works fine and all of a
sudden it throws this error..
Plse..If anybody can help us Do So....
sijo
That is correct; WLS 5.1 does not support the updating of these helper classes.
In WLS 6.0, you can package everything up as a web application or enterprise
application and redeploy the whole thing (including the helper classes)...
Alex wrote:
> But, Robert, that means the JavaBean classes cannot be updated without
> restarting the server.
>
> I tried putting them in the servlet directory. With the result that they
> often work, but sometimes I get the same ClassCastException as sijo. Where
> should JavaBean classes that are used from JSP (and maybe other servlets) be
> put in order to be able to update them?
>
> "Robert Patrick" <[email protected]> escribió en el mensaje
> news:[email protected]...
> > The Java Beans being used by the JSP pages need to be placed into the
> > WEBLOGICCLASSPATH (i.e., -Dweblogic.class.path=...) and not in the working
> directory
> > where the JSP-generated classes are created (i.e., \myserver\classfiles is
> typically
> > the working directory for the JSPServlet and \myserver\serverclasses is
> the
> > appropriate place for the Java Beans used by the JSPs)...
> >
> > sijo wrote:
> >
> > > Hai Everybody...
> > >
> > > We have an application where JSP files are using the Normal Java
> beans(Nothing
> > > but a Java Class).Here all jave beans are in a folder
> ..\myserver\classfiles\
> > > and the jsp files are in ..\myserver\public_html\..... .
> > >
> > > This combination is throwing a ClassCastException when the JSP try to
> Intantiate
> > > the bean....It doesn't give error alway..Initially it works fine and all
> of a
> > > sudden it throws this error..
> > >
> > > Plse..If anybody can help us Do So....
> > >
> > > sijo
> > >
> > >
> >
-
JSP 2.x - Tag files with body-content="JSP"
I've been looking at the JSP 2.1 draft and see that, as with the previous JSP release, it is not allowed for tag-files to have body-content="JSP". I've tried to find a good answer for that on the web, but there's no one who can enlighten me. I've tried to tweak the source of Apache Tomcat 6.0.13 (Validator.ValidateVisitor and TagFileProcessor.TagFileDirectiveVisitor, both in org.apache.jasper.compiler) to accept body-content="JSP" in tag files - with great success. It is possible to have scriptlets within tags from tag files and it works as expected.
My reason for wanting scriptlets in the body-content of tags from tag files is that it would encourage a more contextual, nested (and in my eyes, a more beautiful) structure of JSP-pages, as opposed to the JSTL flat structure, where f.ex. the sql:query tag does not reside within a sql:setDataSource tag, but instead refers to the datasource through an EL-variable. I suppose that it has been constructed in this way only to make it possible for programmers to include scriptlets in-between sql:query tags that use the same datasource.
Not that it is not possible to nest tag-file tags, but I suspect that many programmers then would like to keep a flat structure so as to maintain the possibility of inserting scriptlets where needed - outside any tag which is based on a tag-file.
So, why is it not allowed for tag-files to have body-content="JSP"?Thanks for the reply, evnafets.
I'm aware that scriptet-code is generally being discouraged, although I don't understand why. I think that having a standard tag-library is a wonderful idea, but in the case of JSTL, I'm not that pleased. It relies heavily on EL, which I see as an unnecessary abstraction.
Let me give you an example. The JSTL does database-connections and queries in this way:
<sql:setDataSource var="datasource" url="jdbc:oracle:thin:@localhost:1521:TEMP" driver="oracle.jdbc.OracleDriver" user="scott" password="tiger" />
<sql:query sql="SELECT * FROM EMP" dataSource="datasource" var="resultset" />This could also be accomplished without EL in a hierarchical structure:
<sql:dataSource url="jdbc:oracle:thin:@localhost:1521:TEMP" driver="oracle.jdbc.OracleDriver" user="scott" password="tiger">
<sql:query sql="SELECT * FROM EMP">
BodyContent <% perhapsWithScriptlets; %>
</sql:query>
</sql:dataSource>...using TagSupport.findAncestorWithClass for the query to reference the datasource which it is enclosed in. (in Tomcat, the class would be called dataSource_tag. BTW, why is this not standardised in JSP?)
I would then also like to be able to use scriptlet-code inside the tags as I could if the tags were written as tag-classes, extending BodyTagSupport, and being defined in a formal, cumbersome TLD file.
Why the difference in functionality between SimpleTagSupport and BodyTagSupport - or rather; why is it then not possible to specify that a tag-file should extend BodyTagSupport rather than SimpleTagSupport? -
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..
Maybe you are looking for
-
I have downloaded Maverick 10.9 and installed , now my mailboxes in mail are randomly arranged as opossed to being in alphebetical order from A at the top to Z at the bottom how do you rearrenge the mailboxes in an alphbetical order. Sync with my pro
-
JDev 11.1.2.1 Create record error, no current record in master table
I have a .jsf containing a form created by dragging a Data Collection onto the page and selecting Form. I added a create button. I am trying to use the create button on the form to create a record. I get an error 'Detail entity Pln with row key null
-
Java class names which contain unicode characters
I need to create, compile and load java classes which have class names that contain unicode characters. I am using Win2k but will neet to support unix* in future. When I try to create a fooXbar.jar where X is a unicode character which is not ascii I
-
Which R3-Profil-Parameters are Reported ?!?
I have a Sap Solution Manager (SSM) with Enhancement Package1 which gets data for the EWA (Early Watch Alerts) once a week (on sundays) from the connected SAP Systems. The data is then saved in a set of tables named "DSWPBI_*", i.e. DSWPBI_Server DSW
-
Dear all , I have created 1 Profitability report using ke31 and form by using ke34. Below is the screen shot of ke31: But while executing the report using ke30 profit center is not available under "Navigation".Below is the screen shot of ke30: I`m un