Forums Register Login

How to join two or three String together?

+Pie Number of slices to send: Send
Hi, All:
Can any tell me how to do this in JSP? Thanks for the help.
I have three string:
String A="Happy";
String B="Birthday";
String C="To";
String D="You!";
How do I get the String Message="Happy Birthday To You!", I know it is very simple when you know it, right?
Thank you.
Hongwei
+Pie Number of slices to send: Send
<% out.println(A + " " + B + " " + C + " " + D) %>
+Pie Number of slices to send: Send
Hi kanthan:
Thanks for the reply. Yes, this way
<% out.println(A + " " + B + " " + C + " " + D) %>
can get the Happy Bithday To You!
But want I want is <%=Message%> will the the same result.
Because I need to pass this String Message to my servlet.
How to do that? Thanks.
Hongwei
+Pie Number of slices to send: Send
<body>
<%!
String A="Happy";
String B="Birthday";
String C="To";
String D="You!";
%>
<%! String Message = (A + " " + B + " " + C + " " + D); %>
<cnter> Hi, <br>
<%= Message %>
</center>
</body>

Hope this will do for you.
Thanks
+Pie Number of slices to send: Send
Hi kanthan:
Thanks, thanks, thanks, It works. Thanks again.
Hongwei
Can you hear that? That's my theme music. I don't know where it comes from. Check under this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 969 times.
Similar Threads
Jim...
:o Map and Matthew :o - Birthday babies
field-validator type="date" works fine but got ognl.MethodFailedException
where are all the hot mama's
Happy Birthday Sriraj Rajaram
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:12:43.