troubleshooting Question

returning multiple values from the model back to the servlet: only know how to do one.

Avatar of domoaarongato
domoaarongato asked on
Java
18 Comments1 Solution164 ViewsLast Modified:
I only know how to pass one value from the model back to the servlet.  But i need to retreive about 5 or 6 of them.

can someone give me a hand?

//servlet
unitConverterModel uc = new unitConverterModel();
      String pass = uc.convert(DimensionsSizeCode,feetDropDown,metersDropDown,feetLength,inchesLength,feetWidth,inchesWidth,feetDecimalLength,feetDecimalWidth,metersLength,centimetersLength,metersWidth,centimetersWidth,metersDecimalLength,metersDecimalWidth);


//model
public String convert(String DimensionsSizeCode,String feetDropDown,String metersDropDown,String feetLength,String inchesLength,String feetWidth,String inchesWidth,String feetDecimalLength,String feetDecimalWidth,String metersLength,String centimetersLength,String metersWidth,String centimetersWidth,String metersDecimalLength,String metersDecimalWidth) {

String hello = "hello"
String goodbye = "goodbye";

return hello;
//


So i know if i do System.out.print(pass); in my servlet it will print"hello".    But how do i access more than one value?  What if i wanted to return both String hello;, String goodbye; and more?   How could it be done?




Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 18 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 18 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros