-
-
-
-
-
Why servlet is used as controller ?not JSP? i want complete Explation?
In struts servlet control the application and we know that a jsp compiled into a servlet first. The only problem with the servlet is that it needs to write out.println call per HTML line. But as a controller in struts servlets do not force the programmers to write out.println, that is the part of JSP which acts as View.So if the controller would be JSP the translation (JSP compiled to a servlet)step...
-
-
-
Can we use any other technology than JSP to construct a view ?
Yes, other than JSP we can use Swing, JSF, Cocoon etc as a front end for our struts application. Here is a link to the article for using struts with swing as front end
-
-
-
-
type="com.test.LoginForm"/>
path="/login"
type="com.test.user.login.LoginAction"
name="loginForm"
validate="false">
Question: Assuming the class LoginForm contains a String property named "password", how does the LoginAction class access the attribute called "password" in the above request? Explain why.
Choice 1
String password = request.getParameter("password");
Choice 2
String password = request.getAttribute("password");
Choice 3
request.getParameterNames().getParameter("password");
Choice 4
String password = ((LoginForm) form).getPassword();
Choice 5
String password = form.getPassword();
">Question: Assuming the class LoginForm contains a String property named "password", how does the LoginAction class access the attribute called "password" in the above request? Explain why.Choice 1 String password = request.getParameter("password"); Choice 2 String password = request.getAttribute("password"); Choice 3 request.getParameterNames().getParameter("password"); Choice 4 String password = ((LoginForm) form).getPassword(); Choice 5 String password = form.getPassword();
-
-
-
-
-
-
-
Struts Heirarchy of Files
What is heirarchy of files in Struts?
-
Struts Interview Questions
Ans