Technical Interview Questions
Oracle Interview Questions
J2EE Interview Questions
Programming Source Codes
Java Source Codes
Html Source Codes
CSS Source Codes
C Source Codes
Structs Interview Questions and Answers
Why aren't the Struts tags maintained as
part of the Jakarta Taglibs project ?
Development of both products began about the same time. Leading up to
the release of 1.0, it was thought better to continue to develop the
taglibs alongside the controller. Now that 1.0 is out, the JavaServer
Pages Standard Taglib is in active development. Once work on JSTL
stabilizes, the Struts taglibs will be revisited. Tags which are not
linked directly to the framework may be hosted at Jakarta Taglibs
Are the Struts tags XHTML compliant ?
If you use an <html:html xhtml="true> or <html:xhtml/> element on your
page, the tags will render as XHTML (since Struts 1.1).
Will the Struts tags support other markup languages such as WML
Struts itself is markup neutral. The original Struts taglibs are only
one example of how presentation layer components can access the
framework. The framework objects are exposed through the standard
application, session, and request contexts, where any Java component in
the application can make use of them.
Markup extensions that use Struts are available for Velocity and XLST,
among others. A new Struts tag library for Java Server Faces is also in
For more about using WAP/WML with Struts see the article WAP up your
What about JSTL and JavaServer Faces ?
JSTL, the JavaServer Standard Tag Library, is a set of JSP tags that are
designed to make it easier to develop Web applications. JavaServer Faces
(JSF) is a specification for a new technology that promises to make it
easier to write MVC applications, both for the Web and for the desktop.
The inventor of Struts, Craig McClanahan, is the specification co-lead
for JavaServer Faces (JSR 127), and architect of the reference
implemenation as well as Java Studio Creator. Both JSTL and JSF are
complementary to Struts.
The mainstay of the Struts framework is the controller components, which
can be used with any Java presentation technology. As new technologies
become available, it is certain that new "glue" components will also
appear to help these technologies work as well with Struts.
Struts originally came bundled with a set of custom JSP tags. Today,
several extensions are available to help you use Struts with other
popular presentation technologies, like XSLT and Velocity. Likewise,
extensions for JSTL and JSF are now available as well.
The JSTL reference implementation is available through the Jakarta
Taglibs site. A JSTL taglibs for Struts, Struts-El , is available and
distributed with Struts beginning with the 1.1 release.
The JSF specification and reference implementation is available through
Sun's The JSF specification and reference implementation is available
through Sun's Java ServerFaces page. An early-release JavaServer Faces
taglib for Struts, Struts-Faces, is also in early release and available
through the nightly build. The Struts Faces taglib is expected to work
with any compliant JSF implementation, including MyFaces.
Is there a particularly good IDE to use with Struts
Struts should work well with any development environment that you would
like to use, as well as with any programmers editor. The members of the
Struts development team each use their own tools such as Emacs, IDEA,
Eclipse, and NetBeans.
Why was reload removed from Struts (since 1.1)?
The problem with ReloadAction was that Struts was trying to act like a
container, but it couldn't do a proper job of it. For example, you can't
reload classes that have been modified, or (portably) add new classes to
a running web application (even if the container supported it).
Meanwhile, as Struts 1.1 was being developed, work progressed on things
like Tomcat's reload command via the Manager webapp. This feature allows
you to quickly reload-on-demand, complete with saving and restoring your
session). It started to make even less sense for Struts to
half-implement a feature that containers are implementing fully.
A more minor point is that freezing the configuration information at
application startup time allows Struts to safely access the mapping
information without bothering with synchronization. The "startup-only"
strategy creates a modest but real improvement in performance for all
So, ReloadAction is not supported since Struts 1.1 for two reasons:
* It never did let you reload everything that you would really want to
-- particularly changed classes -- so many people ended up having to
reload the webapp anyway.
* Containers are starting to offer reload-on-demand features which does
the same thing as the Struts ReloadAction, only better.
* Not supporting ReloadAction lets Struts avoid doing synchronization
locks around all the lookups (like figuring out which action to use, or
the destination of an ActionForward) so applications can run a little
Of course, if someone came up with an implementation that solved these
problems without creating any others, we would not be opposed to
including a new ReloadAction.
What is a modular application? What does module-relative mean?
Since Struts 1.1, the framework supports multiple application modules.
All applications have at least one root, or default, module. Like the
root directory in a file system, the default application has no name.
(Or is named with an empty string, depending your viewpoint.) Developing
an application with only a default module is no different from how
applications were developed under Struts 1.0. Since Struts 1.1, you can
add additional modules to your application, each of which can have their
own configuration files, messages resources, and so forth. Each module
is developed in the same way as the default module. Applications that
were developed as a single module can added to a multiple module
application, and modules can promoted to a standalone application
without change. For more about configuring your application to support
multiple modules, see Configuring Applications in the User Guide.
But to answer the question =:0), a modular application is a Struts
application that uses more than one module. Module-relative means that
the URI starts at the module level, rather than at the context level, or
the absolute-URL level.
* Absolute URL: http://localhost/myApplication/myModule/myAction.do
* context-relative: /myModule/myAction.do
* module-relative: /myAction.do
The Struts Examples application is a modular application that was
assembled from several applications that were created independently.