Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Krupa Eng

Ranch Hand
+ Follow
since Sep 05, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Krupa Eng

Hi,

I want to use JMeter to do load testing my web application. In our app all the URLS are encoded with our proprietary functions. I would like to know if I can get the request and go thru a routine to decrypt the URL.


Thanks.
12 years ago
Sorry about posting in 2 places. I didn't know which one is the right place.

My question is how can I update the object.

for example.

iterator it = mylist.getIterator
while (it.next){
(MyObject)currobj = (MyObject) it.next();
if(currobj.getProp2.equals("AB")){
currobj.setProp3("XYZ");
}
}

The setProp3 is giving me an error.

How can I set the prop3 value.

Thanks
12 years ago
Hi,

I have a java class called myObject with three properties like prop1,prop2,prop3.
I have another object called objectslist with an arraylist of myobjects as its properties and objlistprop.

myObject{
prop1;
prop2;
prop3;
}

Objectslist{
arraylist myobjects
prop2
}

in my jsp I want to update prop1 of my object where myobject is [objectlist.get(i)] ith element of the list.

Thanks,
Krupa
12 years ago
Hi I am getting a "missingResource Exception :Can't find bundle with baseName resources.myresources. But the same works from within a JSP.

Can somebody help?

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="java" >

<xsl:variable name="resource"
select="java:util.ResourceBundle.getBundle('resources.myresources')"/>

<xsl:value-of select="java:getString($resource,'mykey')"/>


From JSP the following works

java.util.ResourceBundle.getBundle('resources.myresources').getString("mykey");

Thanks
I have a mainobject that has myObjectsList (an arrayList of myObjcts) and a simple arrayList of Strings as a properties. So I have my mainobject in the request scope.

So I had to do the following to loop thru the 2 lists.

ArrayList objList= myObjectslist.getObjList();
ArrayList simpleList = myObjectsList.getSimpleList();
pageContext.setAttribute("objList",objList);

When do the following,

<c:forEach var="item" items="${objList}" >
<c ut value="${item}" />
</c:forEach>

It is outputting as
mypackage.myObjItem@45e66456
not the value.

Can any one please help.
12 years ago
JSP
Thanks for your response.


I have a mainobject that has myObjectsList (an arrayList of myObjcts) and a simple arrayList of Strings as a properties. So I have my mainobject in the request scope.

So I had to do the following to loop thru the 2 lists.
ArrayList objList= myObjectslist.getObjList();
ArrayList simpleList = myObjectsList.getSimpleList();

How do I cast this Objects in the objList.
12 years ago
JSP
Hi I have a arraylist of myobjects.

How can do the following with JSTL.

for(int i=0;i<myObjList.size();i++){
myObjItem curritem = (myObjItem ) myObjList.get(i);
}

The problem I am having is casting to myObjItem type. How do I do that in JSTL

Thanks,
12 years ago
JSP
I am using fmt tags to use the proper resource bundle. It works for all resource bundles except for resource_en_US.properties. Can any body help me with why it is not working for US.

Thanks,
Krupa
13 years ago
JSP
Hi

When I am submitting my form using post, the form data (all the controls on the form) are not becoming part of request parameters what am I doing wrong. what could prevent a the form data to be part of Request.

Thanks in Advance.
Krupa
13 years ago
JSP
Hi I am trying to use <x:transform> tag with <x aram> tag inside it .
Here is sample code

<c:set var="XMLLoc"><%= XMLLoc%></c:set>
<c:set var="XMLLoc"><%= XSLLoc%></c:set>
<c:set var="XSLparm">abcd</c:set>
<c:import url= "${XMLLoc}" var="xml"/>
<c:import url"${XSLLoc}" var="xsl"/>
<x:transform xml="${xml}" xslt="${xsl}">
<x aram name="param1" value="${XSLparm}"/>
</x:transform>


The transform is working OK. I am not able to get the value in the XSL

here is my XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi ="http://www.w3.org/2000/10/XMLSchema-instance">
<xsl utput method="html"/>

<xsl:template match="//Root">
<xsl aram name="param1"/>


<TABLE width ="100%">
<TBODY>
<TR >
<td>My Param: <xsl:value-of select="$param1" /></td>
<TD width="220"><B><xsl:value-of select="elem1" /></B> </TD>
<TD width="35">Element2:</TD>
<TD width="20"><B><xsl:value-of select="elem2" /></B></TD>
</TR>
</TBODY>
</TABLE>
</xsl:template>
</xsl:stylesheet>
13 years ago
JSP
I would like to know if there is any setting in Websphere Application server thats tells me which machine accessed my applications context root.

Thanks
13 years ago
I found my answer by changing the width.
How can I fix the display size of the Select element. The size is changing with the size of text inside the options.
Hi,

I have a jsp which contains a iFrame. Using javascript I want to change the src of the iframe to a struts action. How can I do that.

I was able to assign a jsp to the src from javascript, but how can I make the control go to my struts action which can then forward it to the jsp?

Thanks,
13 years ago
Hi Eric,

Thank you very much for a quick great response.

How can I show both controls on the form as a single Select element.

Thanks,