Object passing to weblogic JSP tags
Hello everyone
I was wondering if I can pass a java object to a weblogic jsp tag
for example if I select a content object with id "newsItem"
<cm:selectbyid contenthome="com.beasys.commerce.axiom.document.Document"
contentid="<%= contentId %>"
id="newsItem" />
can I pass newsItem as a variable to the next tag
i.e. instead of writing it
<cm:printdoc id="newsItem" />
I write it
<cm:printdoc Id="<%= newsItem %>" />
This results in an compiler error if the object is passed to Id that is
waiting for a content instance, while if it is passed to contentid (as in
the first
script) then it works fine, as this is waiting for a string.
Is it possible to pass an object to the "id" in the jsp script, and if not,
is there a work around it that enables the content selection logic to be
seperated from the display.
Thank you
May
Oh...i put quotes around the values and that fixed it.
<%@ page language="java" session="false" %>
Happy Holidays,
Brian
"Brian Williams" <[email protected]> wrote in message
news:[email protected]..
> Hello,
>
> I have a JSP that does something strange: When I look
> at it under Explorer it looks fine but under Netscape
> it has this at the top of the page:
>
> <%@ page language=java session=false %>
>
> Actually, with Explorer you can see it in the view
> source. What's up with Weblogic? It seems that
> it failed to parse this JSP tag.
>
> Thanks,
> Brian
>
>
>
Similar Messages
-
Hi!
Can someone summarize for me additional custom WebLogic JSP tags available in
WLS 7, compared to WLS 6.1 or changes in functionality of existing custom WebLogic
JSP tags from WLS 6.1 to WLS 7.
Thanks,
Rahul.
I am afraid not. Becuase if you don't buy their product, they even don't let you use their classes of that product.
I tried to use a class inside CommerceServer, but they asked for the license all the time.
My suggestion is you can get some idea from that, but don't use it directly except you have their license.
"KhurramZ" <[email protected]> wrote:
>Hi all,
>Am experimenting with WL server 5.1 (eval version) and ejbs,jsp's.
>Also came across documentation of JSP Tag libraries of WL personalization
>server (in BEA website). (like <pz:..> , <cm:..>, <es:...>)
>
>Can I use those WLPS jsp tag libs in WLserver? Though I havent got WLPS ,and
>in fact will not be using it in future.
>
>Thanx in advance
>Khurram Z
>[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
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
> >
> >
>
>
-
F:invokeUrl jsp tag and child objects
Hey all,
Does anyone know if its possible to use the f:invokeUrl tag on a method in a child object? eg:
<f:invokeUrl var="myObject.myChildObject" methodName="myMethod" />
I've also tried:
<f:invokeUrl var="${myObject.myChildObject}" methodName="myMethod" />
with no luck. I've gotten the above to work using the f:invoke jsp tag.
What I'm trying to do is put my ajax type functions in the objects that make the most sense. If I can't get this to work, I'll need to make presentation objects with all my ajax functions, create an instance and put it into scope, which I rather not do.
Thanks,
GrahamGraham,
I can't say if it will work or not, because its a better practice to leave all logic outside of the jsp (and I really don't know!). Do the logic in an activity, then only use the jsp to display the values. Keeping the logic outside is a much easier way to keep track of the data, and also re-use if necessary.
Customarily, a 'view' object is created. FileStatusView for example, would be a BPM Object that contains all the values to be displayed in a JSP or presentation.
Hope thats helpful!
-Kevin -
JSP Tag- Passing an array of string as an Attribute
Can I pass an array of String as an attribute to a JSP Tag? I read the specification but It does not say any thing about this.
Thanks in Advance.I thought JSP tags had to deal strictly with string values?
-
Nested JSP tags not working in Weblogic 8.1/6.1
Hi,
I have a custom JSP tag which are used to display buttons (like Submit, Cancel, Revert, Previous etc) on a web page.
This custom tag has a structure like
<gui:toolBar>
<gui:toolTemplate>...</gui:toolTemplate>
<gui:button>
<gui:buttonImg>...</gui:buttonImg>
<gui:buttonAlt>...</gui:buttonAlt>
</gui:button>
</gui:toolBar>
The <gui:button> tag can be repeated depending on the number of buttons needed to be displayed. The body content of the <gui:button> nested tags are used to populate the values in the <gui:toolTemplate/>.
The issue is that if I have repetitive <gui:button> tags(meaning if I want to have 2 or more buttons), the page does not get compiled in Weblogic (both 6.1 and 8.1).
But the same works fine in Websphere 4.x and 5.1.
There are no exceptions being thrown and hence no clue as to what is the issue.
If I have only one <gui:button> then it works fine even in Weblogic.
Note: A link on a similar problem(but no soluton mentioned) is
http://forums.bea.com/bea/thread.jspa?forumID=2025&threadID=200074523&messageID=202373683&start=-1#202373683
Please advice.
Sriram.C.SYou're right, your situation is very similar to the situation the other poster describes. However, the main similarity is that neither of you have given us any information about what is going wrong. We can't read minds or read what's on your screen. We need to see specific error messages, stack traces, and specific code that shows what you are trying to do.
However, it's likely that you're running into problems with the issues with "tag reuse" and "tag pooling". You should first read the JSP specification in the areas that talk about this issue, although this will probably leave you with more questions than you started with.
I'm guessing that your "<gui:button>" element doesn't have any attributes. It's possible that WebLogic is reusing a single "<gui:button>" tag instance for each occurrence in your page. You may have to figure out how to turn off tag pooling in the JSP compiler, but I'm not sure how to do that.
It's possible that Websphere doesn't give you an issue with this because perhaps they didn't bother with the tag pooling optimization (it is a good thing to have it available). -
How do I pass a local variable as a parameter to a JSP Tag File?
I wrote a custom JSP tag file, and I want to pass a local variable to it through a parameter, like this:
<% Integer someValue = new Integer(-5); %>
<my:TestTag value="someValue"/>
This doesn't work though - the result is the string someValue. Trying to do this doesn't work either:
<% Integer someValue = new Integer(-5); %>
<my:TestTag value="someValue"/>
the value attribute ends up being null.
I know I can work arount by putting the local variable in the request attributes then using ${}, but that seems like a lot of unecessary work. Does anyone know I can just pass a local variable to the custom tag through the custom tags parameter list?I'm far from beeing an expert, but this may be a clue (?)
Basically, the rule is: everything you want to be considerred as Java must be in a
JSP tag.
As an example, think of how you would do to pass the litteral string "someValue" otherwise. Then you may imagine other related issues... -
Does weblogic server supports JSP tag pooling
We use lot of Custom Tags in our app, we want improve the performance of JSP pages.
Does Weblogic JSP engine supports JSP Tag Pooling similar to what JASPER (Tomcat
JSP Engine) supports.
If not, is there any way to plug-in my own Tag Pooling classes into JSP Engine.
Thanks
Ramesh
This type of questions are appropriate for the Forms discussion forum.
raghu -
We are researching JSP Tags as a method of seperating our creative and coding efforts. Our research is showing that JSP tags is a resource hog and noticed that none of the JSP Tags are being pooled. Docs that we have looked at suggest that pooling does occur, but we do not see it happening. Is anyone using this technology and if so how is the performance?
Cameron,
In general, what kind of "interesting bugs" and "design flaws" do you mean?
I would expect that using any kind of cache can allow for bugs due to developers
confusion... but are there inherent "bugs" (or design flaws) that are built into
WL's Cache tag?
Jack Lin
Cameron Purdy wrote:
> Install the latest SP. They are (relatively speaking) resource intensive.
> However, properly implemented/used, this relative cost is close to 0.
> (Instantiating a Java class and calling a few empty methods uses a couple
> hundred clock cycles on a good JVM.) BTW Pooling is considerably more
> expensive for simple objects than instantiating new ones. Also, due to
> design flaws in the custom tag API, pooling JSP tags could lead to some
> interesting bugs related to the lack of re-initialization.
>
> --
>
> Cameron Purdy
> [email protected]
> http://www.tangosol.com
> WebLogic Consulting Available
>
> "Anthony Raiti" <[email protected]> wrote in message
> news:39d4a35f$[email protected]..
> We are researching JSP Tags as a method of seperating our creative and
> coding efforts. Our research is showing that JSP tags is a resource hog and
> noticed that none of the JSP Tags are being pooled. Docs that we have looked
> at suggest that pooling does occur, but we do not see it happening. Is
> anyone using this technology and if so how is the performance?
-
List -- detail page problem (object passing)
I have a problem in making the following work:
I have an application with spring, hibernate and JSF and want to make a simple
list with an edit link in every line. The edit link gets you to a editDetails.jsp where you can change and save details. (Simplest CRUD - app)
My list looks something like this:
<h:dataTable id="table" value="#{consoleService.participants}" var="participant">
<h:column>
<h:outputText value="#{participant.lastName}" />
</h:column>
<h:column>
<h:commandLink action="editParticipant">
<h:outputText value="edit" />
<f:param name="participant" value="#{participant}" />
</h:commandLink>
</h:column>this works fine so far
In my details page I use
value="#{participant.id}"
value="#{participant.email}"and so on to acces the properties of the participant but the properties are empty
I desparately searched the the web for the last 4 hours and could not find the proper to pass objects to the next page. What is the recommended way? I have tried all different combinations without success
I have a list and want to see the details of a specific item on the next page?
Can this be done without any further java coding (I already have a consoleService.getParticipant method).
Can I pass a java object in a f:param tag?
Pleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeease help!<h:dataTable id="table"
value="#{consoleService.participants}"
var="participant">
<h:column>
<h:outputText value="#{participant.lastName}" />
</h:column>
<h:column>
<h:commandLink action="editParticipant">
<h:outputText value="edit" />
<f:param name="participant" value="#{participant}"
}" />
</h:commandLink>
</h:column>You cannot pass an Custom Object as a parameter.
<f:param name="participant" value="#{participant}" is not possible. Instead, pass "id" or any other key as param and access the data from the from the DataBase or whereever with the param passed. -
Is there any ways to place JSP tags into Velocity templates? I've seen Velocity can be embed into JSP but i'm not sure if vice versa?
Cameron,
In general, what kind of "interesting bugs" and "design flaws" do you mean?
I would expect that using any kind of cache can allow for bugs due to developers
confusion... but are there inherent "bugs" (or design flaws) that are built into
WL's Cache tag?
Jack Lin
Cameron Purdy wrote:
> Install the latest SP. They are (relatively speaking) resource intensive.
> However, properly implemented/used, this relative cost is close to 0.
> (Instantiating a Java class and calling a few empty methods uses a couple
> hundred clock cycles on a good JVM.) BTW Pooling is considerably more
> expensive for simple objects than instantiating new ones. Also, due to
> design flaws in the custom tag API, pooling JSP tags could lead to some
> interesting bugs related to the lack of re-initialization.
>
> --
>
> Cameron Purdy
> [email protected]
> http://www.tangosol.com
> WebLogic Consulting Available
>
> "Anthony Raiti" <[email protected]> wrote in message
> news:39d4a35f$[email protected]..
> We are researching JSP Tags as a method of seperating our creative and
> coding efforts. Our research is showing that JSP tags is a resource hog and
> noticed that none of the JSP Tags are being pooled. Docs that we have looked
> at suggest that pooling does occur, but we do not see it happening. Is
> anyone using this technology and if so how is the performance?
-
Assiginment to varaibles from jsp tags
is it possible and how is it possible to assign something from jsp tag to an variable declared in scriptlet code - ie. - as below.
also is there a good resource for jsp info - a comprehensive lookup on jsp syntax egs on the web that any one is aware of. - thanks.
i 'm doing - can i use this variable as in below scrpitlet code :
<%! List myAbridgments = new ArrayList(); %>
then - Also at this stage it get a ClassCastException - why would i get that here i dont use this variable - results anywhere else - except in setting the session attribute in the original servlet that calls this jsp page
<jsp:useBean id="results" class="com.bt.ros.Results" scope="session">
<jsp:setProperty name="results" property="*"/>
</jsp:useBean>
the in some scrpitlet code doing:
<% myAbridgments = results.getAbridgments();
for (int i = 0; i < myAbridgments.size(); i++) {
abridgment = (Abridgment) myAbridgments.get(i);
//out.println(abridgment.geta_volume_id());
%>
<p><input type="checkbox" name="list" value="ON"><span style="font-size:12pt"><jsp:getProperty name="abridgment" property="a_sub_year_volume"/></span><span style="font-size:12pt">,
<a href="abridgment_link.htm"><jsp:getProperty name="abridgment" property="a_volume_id"/></a>, </span>yeah, but this doesn't really help me. I am trying (really hard!) to ensure my JSP's don't really contain any "code" as such, just JSP tags.
The end result I want is to include one JSP in another. Now, I "could" just use a <jsp:include.., the problem is that the path to the file I want to include is tied up in an object which I have previously placed in the ServletRequest object. Again, I "could" extract this in the "parent" jsp, and pass it dynamically to the jsp:include, but I don't want any actual Java "code" in the JSP. (There IS a good reason for this, so I can't really comprimise).
The fact that the IS a pageContext.include() method tells me that I can use it. I must be doing something wrong though.
Thanks anyway. -
Hi does anybody out there no how to hot -deploy non ejb classes .Like jsp
tags for example? It is extremely to code them without a hot deployment
ability.
Thanks in advance
Jeff Anderson
Cameron,
In general, what kind of "interesting bugs" and "design flaws" do you mean?
I would expect that using any kind of cache can allow for bugs due to developers
confusion... but are there inherent "bugs" (or design flaws) that are built into
WL's Cache tag?
Jack Lin
Cameron Purdy wrote:
> Install the latest SP. They are (relatively speaking) resource intensive.
> However, properly implemented/used, this relative cost is close to 0.
> (Instantiating a Java class and calling a few empty methods uses a couple
> hundred clock cycles on a good JVM.) BTW Pooling is considerably more
> expensive for simple objects than instantiating new ones. Also, due to
> design flaws in the custom tag API, pooling JSP tags could lead to some
> interesting bugs related to the lack of re-initialization.
>
> --
>
> Cameron Purdy
> [email protected]
> http://www.tangosol.com
> WebLogic Consulting Available
>
> "Anthony Raiti" <[email protected]> wrote in message
> news:39d4a35f$[email protected]..
> We are researching JSP Tags as a method of seperating our creative and
> coding efforts. Our research is showing that JSP tags is a resource hog and
> noticed that none of the JSP Tags are being pooled. Docs that we have looked
> at suggest that pooling does occur, but we do not see it happening. Is
> anyone using this technology and if so how is the performance?
-
How to get an ArrayList Object in servlet from JSP?
How to get an ArrayList Object in servlet from JSP?
hi all
please give the solution for this without using session and application...
In test1.jsp file
i am setting values for my setter methods using <jsp:usebean> <jsp:setproperty> tags as shown below.
After that i am adding the usebean object to array list, then using request.setAttribute("arraylist object")
---------Code----------
<jsp:useBean id="payment" class="com.common.PaymentHandler" scope="request" />
<jsp:setProperty name="payment" property="strCreditCardNo" param="creditCardNumber" />
<%-- <jsp:setProperty name="payment" property="iCsc" param="securityCode" /> --%>
<jsp:setProperty name="payment" property="strDate" param="expirationDate" />
<jsp:setProperty name="payment" property="strCardType" param="creditCardType" />
<%--<jsp:setProperty name="payment" property="cDeactivate" param="deactivateBox" />
<jsp:setProperty name="payment" property="fAmount" param="depositAmt" />
<jsp:setProperty name="payment" property="fAmount" param="totalAmtDue" /> --%>
<jsp:useBean id="lis" class="java.util.ArrayList" scope="request">
<%
lis.add(payment);
%>
</jsp:useBean>
<%
request.setAttribute("lis1",lis);
%>
-----------Code in JSP-----------------
In testServlet.java
i tried to get the arraylist object in servlet using request.getAttribute
But I unable to get that arrayObject in servlet.....
So if any one help me out in this, it will be very helpfull to me..
Thanks in Advance
EdwardHi,
Im also facing the similar problen
pls anybody help..
thax in advance....
Litty -
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.
Maybe you are looking for
-
Adobe has my money and won't give me my serial number!
For those of you who have successfully downloaded an upgrade to Lightroom 3 with serial numbers, congratulations! If you haven't, you might beware that you might not get a serial number and neither customer nor technical support has ANY answer for y
-
Hi all, I installed OIM server on Redhat linux. I am accessing the following url to access the OIM Admin and user console. http://<hostname:7001>/xlWebApp. But i am getting an Error 404: not found. i didnt find the file xlStartServer.sh in <oimserver
-
Two teamed Gbe nics not transferring files at 2Gbps speeds
We are doing some testing with nic teaming to increase network throughput between servers. We have two servers (Dell r815) with windows server 2012. They are directly connected via two cat-6 straight-through cables, with teamed nics. The teams use
-
Shift-Command-R does not work anymore
Hello all, I've noticed that the shortcut shift-command-r does not work anymore on my macbook pro. I used it for the calendar to refresh all calendars, and its also handy to open the reader in safari 5. When I open the keyboard viewer from the langua
-
It seems that Intel CPUs do support the 64Bit version of XP........ Below is some links......... Intel EM64T Then this link..... I thought yeah future Processor, but was I shocked 775 CPU's I did find by chance, when looking on Microsoft at the 64Bit