Can this be converted to use EL ? If so, how ?
I am new to JSP / JSTL / EL. I am trying to convert existing code written by someone else from scriptlets to EL. (The code uses the displaytag tag library for tables.)
I cannot figure out how to convert line 122: mbeanServer.getAttribute() takes two parameters
Object getAttribute(ObjectName name, String attribute)
Is it possible to convert getAttribute() with multiple parameters to EL... ?
If so can someone post an example of how to do it.
If not... can someone let me know
Any help is appreciated. I tried some things to convert
getAttribute( x, y ) but get error "The function xx must be used with a prefix when a default namespace is not specified"
Here is the code to convert to EL: ( 119-136)
52 <%
53 MBeanInfo mbInfo = (MBeanInfo)session.getAttribute(JmxAction.MBEAN_INFO);
54 ObjectInstance mbInstance = (ObjectInstance)session.getAttribute(JmxAction.MBEAN_OBJECT_INSTANCE);
55 MBeanServer mbServer = (MBeanServer)session.getAttribute(JmxAction.MBEAN_SERVER_ATTR);
56 MBeanAttributeInfo[] attributes = (MBeanAttributeInfo[])session.getAttribute(JmxAction.MBEAN_ATTRIBUTES);
57 request.setAttribute("attributes", attributes);
58 MBeanOperationInfo[] operations = (MBeanOperationInfo[])session.getAttribute(JmxAction.MBEAN_OPERATIONS);
59 request.setAttribute("operations", operations);
60 %>
119 <display:column
120 title="Value">
121 <%
122 Object value = mbServer.getAttribute(mbInstance.getObjectName(), (String)pageContext.getAttribute("attributeName")) ;
123 if(value != null && value.getClass().isArray())
124 {
125 Object[] values = (Object[])value;
126 for(int i = 0; i < values.length; i++)
127 {
128 out.print(values[i] + "<br>");
129 }
130 } else
131 {
132 out.print(value);
133 }
134 %>
135 </display:column>
136 </display:table>
Is it possible to convert getAttribute() with multiple parameters to EL... ? No, not directly.
EL can only access standard getter/setters. It can not call methods that take arguments.
Workarounds
- write a "wrapper" class that provides an interface to the MBeanServer object that EL can access
- if you have JSP2.0 you should be able to do it with a function
Similar Messages
-
I have 220 photos on my camera to be downloaded to Lightroom. I want to organize them in 6 different folders. Can this be done? I need instructions to do this.
You cannot direct a single Copy Import operation from your card into multiple folders, but you can either import multiple times, selecting different photos each time from the Import grid, and specifying a different destination, or you can import everything into one folder, then use drag-and-drop in LR with different selections of photos into various folders you create within LR’s Library module folder panel. As long as you do the folder creating and photo moving within LR then LR will know where the photos have been moved to.
What I do is move the photos into multiple folders on the card, itself, outside of LR, using Explorer’s thumbnail previews to guide me, then drag-and-drop those folders to their final destination on my hard drive still outside of LR, then do an Add Import, by dragging and dropping those folders onto LR Library’s central area, so that’s another way. -
How do I configure my IMac so that I can see/speak with someone using an IPad 2 ? Thank you
The Apple solution is to register for and use separate Apple ID's on both devices and Apple software:
Purchase FaceTime from the Apple Mac App store. (US$0.99 for Version 1.1 last time I checked).
The US iPad 2 already includes the FaceTime App.
I've read that Skype also works with a Skype app for the iPad, but I have not tried it. -
Once Firefox 31 is installed it sees all PDF files as Firefox HTML files and changes all of the PDF icons to Firefox HTML icons. This change can not seem to be reversed without uninstalling Firefox.
Only the icon is changed, not the .PDF extension.Thank you for your reply but it's not that simple:
Windows now thinks that the default file type for .pdf is Firfox HTML Document.
I can change which program opens .pdf files but I can't change the icon.
Not a Firefox problem? Really?
EDIT:
Let me explain further so that you can understand. In folder options / file types I can scroll thru and choose any file type / advanced and change the icon...every one of them except (now) .pdf. There is no advanced tab. Only the message about "restore" I mentioned before.
Firefox changed the file association for .pdf files and now I can't fix it.
And from another thread:
"Firefox 31 is not converting or renaming your files. All it is doing is registering with the Windows OS as an application that is able to open the files and Windows then changes the file's icons accordingly.
This should only occur if no other application has already registered your .pdf files."
Well I guess that's not true is it? -
Up to how many devices can this one download be used for?
I have a iMac and a air and want now do have download this software twice or can I just buy it once and use it for both.
You can use it on as many Macs as you own with the same user ID. I would suggest to download it once and copy the installer BEFORE you hit install because it will self destruct after the install. Before install, you will find it in your Applications folder - copy it to a safe place and you can use it again (instead of having to download it again).
-
Can this product convert a sideways PDF to Excel?
I have a PDF that is obviously an excel spreadsheet scanned in sideways and when I try to run it through the export program, I get a file of junk.
Any ideas>?Good day,
Sorry to hear you're having trouble converting your document. Do you think you could share your document with us via the File Conversion Issue form? Without seeing the file, it's tough to say why it's not converting properly. Please include a reference to this forum thread in your description.
-David -
Can this text be unblurred using Photoshop?
Are the words too small to enhance and also what format is best when trying to solve this problem? TIFF, PNG GIF ect
Thank you community!When you save an image in another file format the content does not get better, so whatever you start with is your starting point.
This image, though, seems to have been upscaled, so the detrimental effects may be manifold.
No good option in Photoshop to »unblur« content that badly damaged comes to my mind. -
Can This be Converted from CS4 AS3 to Flash8 AS2?
Is This Possible To Work In Flash8 AS2?
import flash.events.Event; addEventListener(Event.ENTER_FRAME, update); var accel = 2 var speed = 0.06 var friction = 0.94 function update(e:Event):void { if (mouseX>400){body.fridge.rotationY += speed + accel} if (mouseX<100){body.fridge.rotationY += speed - accel} if (mouseY<100){body.fridge.rotationX += speed + accel} if (speed>2){speed = 2} if (speed<-2){speed = -2} body.fridge.rotationY *= friction body.fridge.rotationX *= friction }no. flash8 doesn't support 3d manipulation of 2d objects.
-
I used to be able to see a preview of my scan which i can no longer see only the adobe acrobat symbol I am using Adobe pro 9 can this be changed??
Yes, that appears how Mavericks works right now. However, you can open the Address Panel, select all your contacts, then click the To (or CC, or Bcc) buttons to move the selection to the address field.
If it is not already in the Toolbar, right-click on the Toolbar and select Customize Toolbar…
Then, drag the address panel up to wherever you want it.
You may also want to add it to the New Message window in the same way. -
Need to pass out parameter in middle of a process. How can this be achieved
Package test_pkg
procedure main_prc(x_stat out varchar2)
insert_prc(l_stat);
x_stat:=l_stat;
valid_prc
end main_prc;
procedure insert_prc(x_stat1 out varchar2)
insert into staging table
x_stat:='S';
end insert_prc;
procedure valid_prc
validate staging table data
end valid_prc;
end test_pkg;
Requirement: Need to pass out parameter in middle of a process. How can this be achieved?Use return at any time to get the out variable, but this will stop the process.
-
How can I send whatsapp messages using Siri ?
Hi,
How can I send whatsapp messages using Siri ? or how can I ask Siri to read my whatsapp messages ?
thanks for help!kladrian wrote:
this is not the case in particular
Yes it is. If it wasn't the case, then why are you asking the question to begin with?
why everytime I have a question about a simple activity present in Android system I get in response ... "you can't sorry" !?
1. Because iOS is not Android
2. Because it's the truth, whether you like it or not -
Can I Manage virtual machines using SCCM? What about Amazon ec2 instances?
Hi All,
As part of my lab environment, I would like to discover and manage virtual machines within ESXi platform and a few on Hyper-V. As part of this,
1] Do we need SC-VMM to create/discover/manage virtual machines or can this be done by using just SCCM 2012 module?
2] Does SCCM provide any connectors to public cloud services (ex: Amazon EC2 or Google Cloud services)? Can this be done using SCCM?
Any help on this would be appreciated. thanksThanks Jason.
A few follow up questions just to make sure I understand you correctly:
a] Statement: I understand SCCM can manage OS within any VM (I just realized my set up has discovered 2 VM's running Win 2008 OS via AD discovery method). My confusion began after going thru SC-VMM docs. I assumed, once you have SC-VMM set up, it will discover/manage
either ESXi servers or Citrix or other vendor hypervisors and then discover VM's within the hypervisors. But as you said, SCCM can manage OS within any VM.
b] Q: my sccm set up is part of domain 'A' and its discovering systems/users as part of domain 'A'. Is there a way to discover systems as part of domain 'B'? When I look into 'discovery methods' -> Active directory system discovery -> Add a new container
-> path -> select a new container -> it selects only domain 'A'
As a result I'm not able to add a secondary domain for system discovery. IS this how its supposed to be? Discovery runs only within one domain? (or) am I missing something here?
c] When you said 'Yes, I do think (I'm not familiar with all things VMM though) that there is a connector to EC2', did you mean a connector from SCCM or a connector from VMM component?
thanks again for all the help. -
Can I do an Insert using two selects from different tables?
Hi,
I have three tables, Course (CID, NAME, TIME)
Teacher (TID, NAME, DESCRIPTION) and OfferedBy(CID, TID) to match a course to a teacher.
After I do an insert on Course, I want to be able to do an insert on OfferedBy using the CID of the course I inserted, and the TID of the teacher that's offering it.
I tried this after doing inserts on Course and Teacher:
INSERT INTO OfferedBy values (SELECT CID FROM Course where courseName = 'name' , SELECT TID FROM Teacher WHERE LastName = 'teacherName').
I get an ORA 00907 error.
What am I doing wrong? Can this actually be done?
Thank you
IHi,
How would you relate the TID with CID?
I tried this after doing inserts on Course and Teacher:
INSERT INTO OfferedBy values (SELECT CID FROM Course where courseName >= 'name' , SELECT TID FROM Teacher WHERE LastName = 'teacherName').
I get an ORA 00907 error.You can use the query in this way:
SQL> SELECT ( ( SELECT dummy FROM DUAL), (SELECT DUMMY FROM DUAL)) FROM DUAL;
SELECT ( ( SELECT dummy FROM DUAL), (SELECT DUMMY FROM DUAL)) FROM DUAL
ERROR at line 1:
ORA-00907: missing right parenthesis
SQL> SELECT 'AA',(SELECT dummy FROM DUAL) FROM DUAL;
'A (
AA X
SQL>Regards -
I have a time capsule as my base station but need to improve network coverage in the other end of the house. Have a new airport express that I use for music streaming. Can this airport express be used for both music streaming and "network extension" at the same time, or do I need to buy another product?
Yes, it can. You can either:
Extend a wireless network. The Express needs to be positioned half way between the TC and the area without network coverage, and can be flakey. This is wireless only.
Use Ethernet/Powerline. This is the preferred option (called a roaming network in Apple terminology). This allows for the Express to be placed wherever you want, as long as it reaches the other end of the house. -
Hello -
My iMac has developed a video display problem. Everything now appears in a strange, cartoonish way. Purples, greens, blues. Can this be fixed, and if so, any idea how much it might cost? Also, could I output to a seperate monitor? I plan to replace the unit , but cannot right now. Thanks!Go to System Preferences > Universal Access > Seeing.
In the Display area, reset it to "Black on white" by clicking that checkbox.
You can also reset it by pressing Command-Option-Control-8
Maybe you are looking for
-
Consignment Pick-up order - confirmed inventory qty
Greetings, We are using the SD customer consignment model, using sales order types, consignment fill up orders ZKB (copy of KB), consignment issue ZKE (copy of KE), consignment return ZKR (copy of KR) and consignment pick-up ZKA (copy of KA). We have
-
Where Can I Find Information on the Mac OS Filters
There are a number of Filters available in STP, which are also available to virtually every other application that processes audio on the Mac. However, I have not been able to find any documentation for the Mac OS filters. Is there a document that ou
-
I just got a new ipad air and have started to add apps to it. I have added a couple of free apps which I have also deleted (moved to icloud). I have also a couple of apps (free & purchased) which I have on it now. Now my problem: I tried to remove
-
Yosemite download not compatible with existing IMAC bluetooth any suggestions
Yosemite download is not compatible with current I MAC blue tooth. Any suggestions?
-
Disabling Listener/Removing edit From UndoManager
Problem I was wondering if someone could assist me with. Currently im using a standard UndoManager and i need someway of removing an edit from the manager. A function in the application loads clears and adds new text to a textArea, i need someway of