Ankur Jaiswal

Greenhorn
+ Follow
since Aug 25, 2003
Merit badge: grant badges
For More
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 Ankur Jaiswal

Looks fine. Could you check your struts-config.xml file for the action form bean that you are using. Check for the name of the action form.
Also, you could take a look at the field "pEmpEmployeeId" make sure that the case is correct. Note that your getter method would something like

private String pEmpEmployeeId;

public String getPEmpEmployeeId()
{
return pEmpEmployeeId;
}
18 years ago
Hi folks,

I am using a cobmo box to display values from a collection on a JSP.(I am using struts)
Following is the piece of code:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<html:select name="cmPartyToPartyRelationshipsForm" property= "partyToPartyRelationships[0].partyRelationships" styleId= "optBoxShort" >

<html ption value="">

<bean:write name="cmPartyToPartyRelationshipsForm" property="partyToPartyRelationships[0].partyRelationships[0].relationship"/>

</html ption>

</html:select>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<i>relationship</i> is a collection of strings and all the values are getting displayed within a single drop down. I want all the values in the collection <i>relationship</i> to be displayed in seperate combo boxes.

I tried inserting </br>, but somehow it doesnt seem to work as all the values are getting printed at once in the combo.

Thanks in advance.
19 years ago
You are right, this is of the logic:iterate tag.
Can you figure out what is wrong.
19 years ago
Hi,
I am using three forms-call them 1,2,3. 3 has two String elements which are passed to a Collection2 in 2. Along with another String element this Collection2 is then passed to a Collection1 in 1.
When i try to use the following:
------------------------------------------------------------
<b>property="partyToPartyRelationships[0].partyRelationships[0].relationship</b>
-------------------------------------------------------------------
Inside my JSP, i get the following error.
-------------------------------------------------------------------
[ServletException in:/tiles/pages/partyToparty/PartyToPartyRelationshipBody.jsp] Cannot create iterator for JohnMark' javax.servlet.jsp.JspException: Cannot create iterator for JohnMark at org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:447) at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:289) at tiles.pages.partyToparty._PartyToPartyRelationshipBody_jsp_9._jspService
-------------------------------------------------------------------
Could someone please tell me on how can I use struts/tiles with collections spaning across multiple forms.
Following is the code for how one I am using the collections:
private Collection getPartyRelationship(){
PartyRelations partyRelations = new PartyRelations();
Collection partyrelationship = new Vector();
partyRelations.setRelationship("Mark");
partyRelations.setToPartyName("John");
partyrelationship.add(partyRelations);
return partyrelationship;
}
private Collection getCMPartyToPartyrelation()
{
CMPartyToPartyRelationship cmPartyToPartyrelationship = new CMPartyToPartyRelationship();
Collection cmPartyPartyRelation = new Vector();
cmPartyToPartyrelationship.setFromPartyName("Ankur");
cmPartyToPartyrelationship.setPartyRelationships(getPartyRelationship());
cmPartyPartyRelation.add(cmPartyToPartyrelationship);
return cmPartyPartyRelation;
}
public CMPartyToPartyRelationshipsForm getCMPartyToPartyRelationshipsForm(){

CMPartyToPartyRelationshipsForm cmPartyTopartyRelationshipsForm = new CMPartyToPartyRelationshipsForm();

cmPartyTopartyRelationshipsForm.setContractNo("543 4345 454");
cmPartyTopartyRelationshipsForm.setPartyToPartyRelationships(getCMPartyToPartyrelation());

cmPartyTopartyRelationshipsForm.setPartyToPartyHeaderForm(getPartyToPartyHeaderDetails());

return cmPartyTopartyRelationshipsForm;

}
19 years ago
Schumi/Ferrari
Are the way to go in F1-2004.
Folks keep you fingers crossed for Button, Trulli and even Alonso.
19 years ago
Hey you can check this for what you want.
https://coderanch.com/t/144265/po/certification/ICE-Test-solved
This is good. And you can learn a lot.
AJ
Hi,
What is the IDE are you using, if you are using one???
As for the solution , you might have to change all the links manually either as document or root relative.
AJ
19 years ago
JSP
Hey good job.
What resources did you primarily use and how long did you prepare for it.
AJ
19 years ago
You can specify the images in two ways:
1. Document Relative
2. Document Root Relative.
In the former, the reference could be given as:
<img src="../images/cm_banner.png">
where images is a folder directly under the web contents.
In the second way, the path is given as:
<img src="/CIF/CM/images/cm_banner.png">
that is relative to the root. Note that CIF/CM is the context root in this case.
Regards,
Ankur

The image paths can also be hardcoded if you want to, though the practice is not adviseable.
19 years ago
JSP
Hi ,
I will get back to you as soon as i find the way the remote server is expecting the file to be. And sure now i am clear of how things are supposed to work.
Like i was writing a client and a server where i was passing a file(AS STREAMS OFCOURSE) from the client side and reading it from the server side. But the only problem seems to be that we here still do not know, what way(how many bytes at a time etc ) does the server program reads.
Anyways, thanks a lot for helping me out, will get back to you in a day after consulting.
Thanks
Ankur
Hi,
The file that needs to be transferred is of specific format. The format should not be changed at the receving end. Assume the file is 20 MB and im sending it in small chunks of 1K streams. Do we have to do any programming at the server end to accept each of the small 1Ks, got one after the other and then assemble to get the file of 20 MB??
If yes, we cannot do any code at the server end as it a remote sever not accessible by us. The requirement told was that remote server expects a file for processing. so is there any way we can send this large file without doing some server side programming.
Regards,
Ankur
Hi Guys,
I am trying to code a piece that must use sockets to connect to a server which is listenning at a port for an incoming file. I want to figure out a way so that i can use streams but, the buffer size should vary with the incoming file size.
I wanted to avoid use of any streams at all and find a way to send an entire file to the remote server.

Note1: The use of RMI Custom Sockets do give us a way to create a single socket and connect to a remote server, making it possible to just have a single program running on one side to send a file.
Note2: The file size is expected to be arouond 1Mb on an average.
Regards,
Ankur
Hi Guys,
This is Ankur and i wanted to transfer an entire file(the size keeps varying) to a remote server which is listenning to a port for an imcoming file. Also, the file has to be transferred as a whole and not as streams.
Kindly, suggest a way to do the same.
Ankur