Web Technology Questions

Q:

How to upload struts file in DHTML?

Answer

The interface org.apache.struts.upload.FormFile is used for the struts file upload application. This interface represents a file that has been uploaded by a client. It is the only interface or class in upload package which is typically referenced directly by a Struts application.


This is not specific to Struts in case of DHTML but the two things that are needed in DHTML page is: first, the form needs to specify an enctype of multipart/form-data and second an <input> form control of type file.


Following are the steps to load file in DHTML:


- Creating a bean


- Writing the ActionClass.


- Mapping the bean in struts-config.xml


- Defining actionmapping


- Developing the DHTML page.

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

1 3069
Q:

What are string functions in VBScript?

Answer

Asc() - Returns ANSI Character Code 


Chr() - Returns Character from ANSI Code 


InStr() - Find a string within another 


InStrRev() - Find a string within another (Reverse) 


LCase() - Convert a string to lowercase 


Left() - Crops a string from left 


Len() - Determine the length of a string 


LTrim() - Remove leading spaces from a string 


Mid() - Crops a string 


Replace() - Replace a substring within a string 


Right() - Crops a string from right 


RTrim() - Remove trailing spaces from a string 


Space() - Creates a string with the specified number of spaces 


StrComp() - Compare two strings 


String() - Creates a repeated character string 


StrReverse() - Reverse the characters of a string 


Trim() - Remove both leading and trailing spaces from a string 


UCase() - Convert a string to uppercase 

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

5 3066
Q:

What is a AngularJS?

Answer

AngularJS is a framework to build the large scale and high performance web application while keeping them as easy-to-maintain. These are the features of AngularJS framework.


AngularJS is a powerful Script based on JavaScript development framework to Implement RICH Internet Application (RIA).


AngularJS is a developers options to write client side application (using JavaScript) in a clean MVC (Model View Controller) side.


Application are written in AngularJS is also cross-browser compliant. AngularJS automatically handles JavaScript code suitable for any browser.


AngularJS is an open source, completely free, and used by large number of developers around the world. It is licensed under the Apache License version 2.0.

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology
Job Role: Software Architect

0 3028
Q:

What is templates in AngularJS?

Answer

Templates are the rendered view with information from the controller and model. These can be a single file like index.html or multiple views in one page using "partials".

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 3022
Q:

What is factory method in AngularJS ?

A) It generates the facts and figures B) It is used to create the service
C) It is used to calculate the factorial of a number D) All the above
 
Answer & Explanation Answer: B) It is used to create the service

Explanation:

In general, Services are Javscript functions and are responsible to do a specific tasks. Factories implements module pattern in which we use a factory method to generate an object which is use for building models.

It's syntax is
module.factory('factoryName', function);

Report Error

View Answer Report Error Discuss

Filed Under: Web Technology
Job Role: Analyst , Software Architect

1 2890
Q:

What is a REPL in context of Node.js?

Answer

Read - Reads users input, parse the input into JavaScript data-structure and stores in memory


Eval - Evaluates the data structure


Print - Prints the result


Loop - Loops the above command until user press ctrl-c twice

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology
Job Role: Software Architect

0 2795
Q:

Which JavaScript objects are not accessible to web worker?

Answer

Following JavaScript objects are not accessible to web worker: 


- The window object


- The document object


- The parent object

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 2787
Q:

If an array with name as "names" contain three elements, then how will you print the third element of this array?

Answer

Print third array element document.write(names[2]);

Note:- Array index starts with 0.

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 2767