Home Answers Viewqa Struts Single thread model in Struts

 
 


Rajendra
Single thread model in Struts
1 Answer(s)      4 years and 4 months ago
Posted in : Struts

View Answers

January 29, 2009 at 1:25 AM


Hi


Struts 1 Actions are singletons therefore they must be thread-safe because only one instance of a class handles all the requests for that Action. The singleton strategy restricts to Struts 1 Actions and requires extra care to make the action resources thread safe or synchronized while developing an application.


and



Struts 2 doesn't have thread-safety issues as Action objects are instantiated for each request. A servlet container generates many throw-away objects per request, and one more object does not impose a performance penalty or impact garbage collection.


For more details please visit:http://www.roseindia.net/struts/struts1-vs-struts2.shtml


Thanks...









Related Pages:
Single thread model - Struts
Single thread model  Hi Friedns , thank u in advance 1)I need sample code to find and remove duplicates in arraylist and hashmap. 2) In struts, ow to implement singlthread model and threadsafe
Single thread model in Struts - Struts
Single thread model in Struts   Hi Friends, Can u acheive singleThreadModel , ThreadSafe in Struts if so plx explain... an application. and Struts 2 doesn't have thread-safety issues
is having any method same behavior of Single thread model in java?
is having any method same behavior of Single thread model in java?  is having any method same behavior of Single thread model in java
is having any method same behavior of Single thread model in java?
is having any method same behavior of Single thread model in java?  is having any method same behavior of Single thread model in java
is having any method same behavior of Single thread model in java?
is having any method same behavior of Single thread model in java?  is having any method same behavior of Single thread model in java
is having any method same behavior of Single thread model in java?
is having any method same behavior of Single thread model in java?  is having any method same behavior of Single thread model in java
Java single threaded model
Java single threaded model  How single threaded model works after implementation in class, basically architecture point of view
Model in struts
Model in struts  what is a model in struts
JSP Thread Safe
JSP Thread Safe          JSP Thread Safe is used to send only one client request for processing. It is used to implement Single Thread Model interface
Thread
Thread  What is multi-threading? Explain different states of a thread... and parallel). It allows a process to run its tasks in parallel mode on a single processor system. States of Thread: New state ? After the creations of Thread
In Struts What is Model?
In Struts What is Model? This tutorial explains you What is Model in Struts. Struts is MVC based application and it is separated into three integral parts... of components: Model View and Controller Struts is also based
Struts
Struts  Why struts rather than other frame works?   Struts... the developers time and costs as it is having a clear layer of MVC model. Struts2 is not only thread-safe but thread-dependent. Struts2 tag libraries provide
Presentation-Model Structure
Java NotesPresentation-Model Structure Previous - Big Blob, Next - MVC The single most important structure in a program is to separate the user interface from the model (business logic, domain, ...). This provides a huge
JSP Architecture, JSP Model 1 architecture, JSP Model 2 architecture
of the architecture is used. These architectures are known as Model 1 and Model 2 architectures. So, in JSP there are two types of architecture of the JSP: Model 1 Architecture Model 2 Architecture JSP Model 1 Architecture In case
Writing model classes in struts2.2.1
Creating model classes StudentAdmissionModel.java -  Model class  is a java class(POJO). It has property and method. The method  name is setter and getter. Which sets and gets value of property. In our application
Struts Tutorial
the model from view and the controller. Struts framework provides the following three... : Struts provides the POJO based actions. Thread safe. Struts has support... architecture : Struts Model Component : Provides Model of the business logic
Model View Architecture - JSP-Interview Questions
Model View Architecture  Describe the architectural overview of Model view architecture?  Hi friend, Model-view-controller (MVC..., the model represents the information (the data) of the application and the business
Struts - Struts
Struts  Is Action class is thread safe in struts? if yes, how it is thread safe? if no, how to make it thread safe? Please give me with good explaination and example? thanks in advance.  Hi Friend, It is not thread
Extending thread - Java Beginners
that has only one thread is referred to as a single-threaded process, while...Extending thread  what is a thread & give me the programm of exeucte the thread   Hi friend, Thread : A thread is a lightweight
Interview Questions - Struts Interview Questions
Interview Questions - Struts Interview Questions... for intercepting and translating user input into actions to be performed by the model... and the outcome of model operations. The Controller receives the request from
Overview of Thread
thread is referred to as a single-threaded process, while a process... in which a thread is executed along with its several operations with in a single... is a single process in the Word Processor program and you can also use other
Diff between Struts1 and struts 2? - Struts
can be used as an Struts 2 Action object. Threading Model Struts 1 Actions... to Struts 1 Actions and requires extra care to make the action resources thread safe or synchronized while developing an application. Struts 2 doesn?t have thread
Java Thread
Java Thread       A java thread is an execution context or a lightweight process. It is a single sequential flow of control within a program. Programmer may use java thread mechanism
Autocomplete textbox with database in jsp and follow the MVC model
with database mysql follow MVC Model but it not perform. So please Help me sir... link: http://www.roseindia.net/struts/struts/struts2.2.1/tags/autocompleter
Thread in java
with a single process. Thus a process that has only one thread is referred to as a single-threaded process, while a process with multiple threads is referred...A thread is a lightweight process which exist within a program and executed
Struts - Struts
Struts  How to display single validation error message, in stude of ?  Hi friend, I am sending you a link. This link will help you. Please visit for more information. http://www.roseindia.net/struts/struts
Green Thread - Java Beginners
of Green Thread in java. Thanks in advance...  Hi friend Green threads... threading model in 1.2 and beyond. Green threads may have had an advantage... thread), but VM technology has advanced significantly since version 1.1 and any
thread
thread  can parent thread be dead if child thread is not dead
Thread
Thread  Thread Life Cycle
Thread
Thread  what is the use of thread
struts - Struts
struts  What is model View Controller architecture in a web... the presentation data to the user. Model-view-controller (MVC) is an architectural... or the underlying business rules without affecting the other. The model object
Entity relationship model - Design concepts & design patterns
Entity relationship model  For each of the projects, do the following: a. Draw an ER diagram. Make sure each entity type has at least one key attribute. Document any assumptions you make. Avoid diagrams with a single entity
Thread Creation
. The following program demonstrates a single thread creation extending ... Thread Creation       In Java, an object of the Thread class can represent a thread. Thread
Thread and Process - Java Beginners
Thread and Process  Dear Deepak Sir, What is the diffrence between Thread and Process.Give an example with explanation. Thnaks & Regards... space; a thread doesn't. Threads typically share the heap belonging to their parent
struts - Struts
struts  What is Model View Controller architecture in a web application,and why would you use
Thread
Thread  Explain two ways of creating thread in java. Explain at three methods of thread class.   Java Create Thread There are two main ways of creating a thread. The first is to extend the Thread class and the second
Java : Runnable Thread
Java : Runnable Thread In this tutorial we are describing Runnable Thread with example. Runnable Thread : Runnable thread is an easy way to create a thread by implementing the Runnable interface. You need to implement a single
Struts - Struts
Struts  Hello I like to make a registration form in struts inwhich... be displayed on single dynamic page according to selected by student. pls send.... Struts1/Struts2 For more information on struts visit to : http://www.roseindia.net
Java Model View Controller (MVC) Design Pattern
to display to the user. there can be several view associated with a single model...; margin-left: 400px; } .style4 { margin-left: 160px; } Java MVC ( Model View Controller ) Design Pattern Model View controller is a classical design
Thread
to the thread constructor eventhough we had created only one thread and if you say we have added to point to the current thread then why we have not added this in the following line "s=s1" Pls reply...... class MyThread extends Thread { Thread
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array  i am using netbeans 7.0 ,with struts 1.3.8 and i want to insert multiple images in mysql database ,with use
Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying to connect the database. I am stuck with this exception that is getting thrown...*; public class Test_jdbc { public Test_jdbc() { } // executes single SQL query
Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying to connect the database. I am stuck with this exception that is getting thrown...; public class Testjdbc { public Testjdbc() { } // executes single SQL query public
Thread
Thread  what happen when we call the Wait(),Notify() and NotifyAll() methods in the Thread
Thread
Thread  class Extender extends Thread { Extender(Runnable run...(); } public void run(){ System.out.println("Extender Thread is Started :"); //new Thread(new Implementer()).start(); } } class Implementer
Thread
Thread  will this code work..? class A extends Thread { public...=" + i); } public static void main(string args[]) { A a = new A(); Thread t = new thread(a); t.start(); } } Is it possible to run above program with out
struts - Struts
struts  how to handle multiple submit buttons in a single jsp page of a struts application  Hi friend, Code to help in solving the problem : In the below code having two submit button's its values
Thread
Thread  Write a Java program to create three theads. Each thread should produce the sum of 1 to 10, 11 to 20 and 21to 30 respectively. Main thread....   Java Thread Example class ThreadExample{ static int
Struts Tutorials - Jakarta Struts Tutorial
Struts Tutorials - Jakarta Struts Tutorial Learn Struts Framework with the help of examples and projects. Struts 2 Training! Get Trained Now!!! This complete reference of Jakarta Struts shows you
How to align the select tags in a single column.
How to align the select tags in a single column.  I am developing a JSP page with struts tags. In the JSP page I have a form where the candidate needs to enter his Date of Birth, for which I used for Date,Month and Year which

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.