Web Design & Development(JAVA) Question: You are required to write the XML equiv
ID: 3612277 • Letter: W
Question
Web Design & Development(JAVA)
Question:
You are required to write the XML equivalent tags for thefollowing elements of JSP (Java Server Page).
1)
<%!
String str ;
public StringconcatenateStr(String s1, String s2){
return s1+s2 ;
}
%>
2)
<%
String s1=request.getParameter(“str1”);
String s2=request.getParameter(“str2”);
str = concatenateStr(s1, s2);
%>
3) <%@page import =“java.util.*” %>
Explanation / Answer
1) Code for concatenate function FunctionConcatenateStr(str1,str2) { returnstr1+str2; } External java script to loadConcatenateStr <html><head>
<script type="text/javascript" src="http://ConcatenateStr.js">
</script>
</head> <scripttype="text/javascript"> xmlDoc=ConcatenateStr("String.xml"); </script>
</body>
</html>
<body> 2. var str1,str2,str3; str1.load(string); str2.load(string); str3=Concatenate(str1,str2); 3.<inport resource:c:j2sdk1.4.2_04library> Hope this will helpyou..
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.