Why not use Jsp for control in MVC2 ?
hi
i am rajendra , i am preparing interview FAQ, so please give me my Que. Ans.
1) we are using servlet for control in MVC2 Module,then why we can not use
Jsp for control in mvc2
2) if we used jsp for control in mvc2 then what is disadvantage compare to if using servlet for control in mvc2
Please give me ans. as soon as..
Thanks.
Are you preparing a FAQ for others or are you just cramming before an upcoming interview and someone gave you a set of questions? It looks more like the latter to me.
If you haven't actually written any MVC based code, you won't be able to snow the interviewer. It's better to just relax, get a good night's sleep and impress them with your willingness to learn, your fit with the team and whatever real accomplishments you have to show.
If you really want an answer to this I suggest that you try writing an MVC2 system using JSP for the controller, which is possible, and then try doing the same in a servlet, or better yet using a framework like Spring MVC or Struts to provide the servlet for you and let you concentrate on your application.
Similar Messages
-
Why not use interfaces for constants?
Hi,
I have been getting conflicting views about why not use interfaces for constants?
Can anyone shed some light on it?
PiyushHow so?
If the constants are only used in a single classhow
does it help to put them in a separate structute?
(Ignoring the a type safe enumeration of course.)Well, mainly for readability. Suppose that you have a
web application which has a servlet class
"RedirectServlet", which takes a variable to redirect
to a given JSP file. In the JSP files, you want to
create forms which take this servlet as their action.
You could of course put all these "redirect"
constants in the RedirectServlet itself, but then
it's kind of weird that you have to import a
servlet in your jsp file to include these constants
and to be able to write
<form action="servlet/RedirectServlet?key=<%=
RedirectServlet.HOMEPAGE %>> or so.
Instead, you could create an interface called
"RedirectConstants", and then your servlet
RedirectServlet could implement this interface. Then
your JSP can also access these constants via this
interface.
But then again, this is merely a matter of style, I
fully agree that there is never a real _need_ to put
constants in a separate structure if they're only used
in a single class.Are you claiming that your example above is a single class? -
Why not use "new" operator with strings
why we not use new when declaring a String .because in java String are treated as objects. we use new operator for creating an object in java .
and same problem wiht array when we declare array as well as initialize .here we are alse not using new for array
whyStrings aren't just treated as objects, Strings are Objects.
As for why not using new for Strings, you can, if you want.:
String str = "this is a string";
and
String str = new String("this is a string");
do the same thing (nitty-gritty low level details about literals aside). Use whatever you like, but isn't it simpler not to type new String(...) since you still need to type the actual string?
As for arrays, you can use new:
int[] ints = new int[10];
or
int[] ints = { 0, 1, 2, 3, ..., 9 };
But the difference here is you are creating an empty array in the first one, the second creates and fills the array with the specified values. But which to you often depends on what you are doing. -
I have an apple id but ı can not use it for sign in to itunes connect account while publishing my ibook document. Why ı can not login? What can ı do to figure out this problem?
As note already on the iBA forum [ AppleID for ibooks publishing ], you need two IDs. You can't use your developer ID.
If you already signed up for books with that ID, you need to talk to Apple to straighten things out. -
A year ago I brought a 1 TB hard drive (My Passport), I have not used it for over 4 months and now when I use the USB cord to connect it to my mac, it does not register the hard drive. Does anyone know why this is happening?
The beeps could be caused by something as simple as a loose internal wire or connection. If it is under warranty (not sure how long that is, as WD drives range from 1 to 5 years depending on the model's series - I think "my passport" drives are 3 years) you could contact WD and ask them about it.
If it is out of warranty, you could also try opening the case and check the connections - the drive may be fine, and there have been posts on TomsHardware forums of people getting the beeps, opening up the case and the drive is fine, just some wire worked loose. -
Why not use paper label on finished DVD project?
I also use printed paper labels for my DVD covers
why not use them?
please advise?Hi
The DVD get's unbalanced = Laser can't read track
DVD are several times more sencitive than CD (not advicable to put lables on them either)
And DVDs/CDs that are unbalanced also give more strain to the player mechanism
that eventually stops working.
Yours Bengt W -
I do not have an Apple computer, I have had Itunes previously but had not used it for some time, I have Itunes gift cards but can not get ,on to use them. I have tried to download Itunes again but the following keeps poping up, "The Itunes library is locked on a locked disc, oryou do not have write permission for this file." How can I overcome this?
To solve this issue all I did was check to ensure that the file permissions were set as described by the earlier posts, followed by simply deleting the iTunes Library Genius.itdb file. Once the file was deleted I was able to open iTunes without difficulty. Note that I am running Windows 8. Hope this helps!
-
I have a 10.2.8 os on a G4 desktop. A week ago I clicked on the AOL icon in the bottom bar. I have not used AOL for six years. Two aol boxes came up. I can not get the boxes to go away for long. They may go away for 15 minutes and they come back while I am working. How can I get these aol boxes to go away?
I will be upgading to Tiger; 10.4.Right click on the AOL icon and select move to trash.
-
hi i have an ipad mini and i have not used it for 2 month or more. Today i have tried to use it i came across with a problem. my Ipad is blocked and it asks me to wait 23,401,418 what should i do need your help. thanks
Have you charged ipad Try a Reboot press & hold power button & menu button hold both down until you see Apple Logo You may need to do this more than once. Bsydd uk
-
DBCA can not use ASM for database storage due to following reason: Could no
Hi
I've a recently installed RAC11gR2(11.2.0.3) on HP-UX
I installed Grid Infrastructure with grid user:
Node1: # id grid
uid=1100(grid) gid=1000(oinstall) groups=1031(dba),1021(asmdba)
Node2: # id grid
uid=1100(grid) gid=1000(oinstall) groups=1031(dba),1021(asmdba)
I installed the Oracle Server with oracle user:
Node1: # id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1031(dba),1021(asmdba),1033(oper)
Node2: # id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1031(dba),1021(asmdba),1033(oper)
All related Grid Infrastructure is functioning well in both nodes:
$ crs_stat -t
Name Type Target State Host
ora.DATA.dg ora....up.type ONLINE ONLINE node03
ora.FRA.dg ora....up.type ONLINE ONLINE node03
ora....ER.lsnr ora....er.type ONLINE ONLINE node03
ora....N1.lsnr ora....er.type ONLINE ONLINE node04
ora.asm ora.asm.type ONLINE ONLINE node03
ora.cvu ora.cvu.type ONLINE ONLINE node04
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE node03
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
ora.ons ora.ons.type ONLINE ONLINE node03
ora.scan1.vip ora....ip.type ONLINE ONLINE node04
ora....SM1.asm application ONLINE ONLINE node03
ora....03.lsnr application ONLINE ONLINE node03
ora....d03.gsd application OFFLINE OFFLINE
ora....d03.ons application ONLINE ONLINE node03
ora....d03.vip ora....t1.type ONLINE ONLINE node03
ora....SM2.asm application ONLINE ONLINE node04
ora....04.lsnr application ONLINE ONLINE node04
ora....d04.gsd application OFFLINE OFFLINE
ora....d04.ons application ONLINE ONLINE node04
ora....d04.vip ora....t1.type ONLINE ONLINE node04
$
The ASM instance are running well in both nodes
Connected with oracle user, the listener has registered perfectly the ASM instance in each node:
$
$ lsnrctl status
LSNRCTL for HPUX: Version 11.2.0.3.0 - Production on 16-MAY-2012 15:41:06
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for HPUX: Version 11.2.0.3.0 - Production
Start Date 16-MAY-2012 15:24:19
Uptime 0 days 0 hr. 16 min. 47 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/node03/listener/alert/log .xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=16.0.0.133)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=16.0.0.136)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
The command completed successfully
$
$
DATA & FRA disk group are created:
$
$ echo $ORACLE_SID
+ASM1
$
$ asmcmd
ASMCMD>
ASMCMD> ls -lt
State Type Rebal Name
MOUNTED EXTERN N DATA/
MOUNTED EXTERN N FRA/
ASMCMD>
ASMCMD>
The big issue is... that the DBCA can not see the diskgroups. When I choose ASM Storage it can not see them. It shows the chart in blank and if i try to write the disk group, so the following message appears: can not use ASM for database storage due to following reason: Could not connect to ASM due to following error: ORA-01034 ORACLE not available
What can be passing in this case... ?
Thanks in advanceThanks both
Really the problem initially was because of this:
[INS-06006] Passwordless SSH connectivity not set up between the following node(s): [node1, node2]. CVU may reports "PRVF-4007 : User equivalence check failed for user "user"" for same error
and I had to install node1 first and after node2 manually and perhaps for this the product was not well linked.
I resolved the problem establishing the keys with the wizard and after copying the following files from node1 to node2
/home/grid/.ssh -------> /home/grid/.ssh
authorized_keys
known_hosts
This is the procedure if you run the wizard at the node1.
The problem is that the wizard creates the keys incompletely...
Thanks -
Hi Apple community ---
I went on iTunes after not using it for awhile and my old playlists are all gone. My library seems intact, but I don't have a record of my playlists, except for what's in my iPod. I'm afraid to sync them to get the playlists back into my computer, becuase the last time I synced my iphone it erased all my contacts from both my iphone and my computer, and I don't want the sync operation to remove the playlists from the iPod as well.
I don't have any music on my iPhone, so the two devices in question are just the iTunes program on the computer (it's a Dell with Windows Vista) and my 160 GB iPod classic.
Thanks for your help!!!
Doc EThis post may be a clearer place to start...
tt2 -
now I'm reading this book "Java Threads 2nd edition" by Scott Oaks and Henry Wong. Writer provide a class called BusyFlag to simulate the mutex.
I wonder why not use notifyall() to replay notify().
public class BusyFlag {
protected Thread busyflag = null;
protected int busycount = 0;
public synchronized void getBusyFlag() {
while (tryGetBusyFlag() == false) {
try {
wait();
} catch (Exception e) {
public synchronized boolean tryGetBusyFlag() {
if (busyflag == null) {
busyflag = Thread.currentThread();
busycount = 1;
return true;
if (busyflag == Thread.currentThread()) {
busycount++;
return true;
return false;
public synchronized void freeBusyFlag() {
if (getBusyFlagOwner() == Thread.currentThread()) {
busycount--;
if (busycount == 0) {
busyflag = null;
*notify();*
public synchronized Thread getBusyFlagOwner() {
return busyflag;
}naficbm wrote:
now I'm reading this book "Java Threads 2nd edition" by Scott Oaks and Henry Wong. Writer provide a class called BusyFlag to simulate the mutex.
I wonder why not use notifyall() to replay notify().Looks like it should work with notifyall as well. -
Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
Possible to run *own* Stratus server or *not* use it for RTFMP?
In other words, have Flash peers be able to talk RTFMP without needing to ever talk to Stratus server.
It may not always be possible to stay connected to Adobe's Stratus servers so this would be useful.
Possible? How?
csFlash Player 10.1 beta supports nc.connect("rtmfp:"). a NetConnection connected in this manner can only be used for groups communication (NetStream for multicast and NetGroup) between peers on the local LAN, or for a NetStream that is to receive a pure IP multicast (no P2P or C-S at all). this is covered in the beta ActionScript reference page for NetConnection.connect().
note that this mode can't be used for 1-1 NetStreams, only group NetStreams and NetGroups.
in order for peers in the group to find each other on the local LAN, you must enable LAN peer discovery and add an IP multicast address to the groupspec. when using GroupSpecifier to make the groupspec for joining groups (recommended), that's the "ipMulticastMemberUpdatesEnabled" property and the "addIPMulticastAddress()" method, respectively. for example:
var nc:NetConnection = new NetConnection;
nc.connect("rtmfp:");
var gs:GroupSpecifier = new GroupSpecifier("com.example.chatapp/mychannel");
gs.multicastEnabled = true;
gs.postingEnabled = true;
gs.ipMulticastMemberUpdatesEnabled = true;
gs.addIPMulticastAddress("239.254.254.1:30000");
var ng:NetGroup = new NetGroup(nc, gs.groupspecWithAuthorizations());
var ns:NetStream = new NetStream(nc, gs.groupspecWithAuthorizations());
// ... add event handlers, wait for NetGroup.Connect.Success & NetStream.Connect.Success, then post and publish/play streams
in this example, i specified a group called "com.example.chatapp/mychannel", where P2P multicast and posting are enabled, where peers can discover each other on the local LAN and they use IPv4 multicast address 239.254.254.1 UDP port 30000 to do so.
things get really interesting when you connect to Stratus and enable the group server channel (to get auto bootstrapping) and *also* use LAN peer discovery so that peers on the LAN will be more tightly meshed than they necessarily would through normal group topology evolution.
-mike -
I have a analog to DV converter that I have had for years, but I have not used it for awhile, and I am using a newer MAC. How do I get it to import from my converter. When I go to import in iMovie it is only showing the built in camera. Help...
Does the iOS device connect to other networks? If yes that tend to indicate a problem with your network.
Does the iOS device see the network?
Any error messages?
Do other devices now connect?
Did the iOS device connect before?
Try the following to rule out a software problem:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Power off and then back on your router
.- Reset network settings: Settings>General>Reset>Reset Network Settings
- iOS: Troubleshooting Wi-Fi networks and connections
- Wi-Fi: Unable to connect to an 802.11n Wi-Fi network
- iOS: Recommended settings for Wi-Fi routers and access points
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
If still problem and it does not connect to any networks make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
I am not using condition for Approval and Rejection.
Hi Balaji,
I am not using condition for Approval and Rejection.
I am using Decision.
I am not able to find the error.Rejection is going on Successfully.
I am to rectify this error from past 4 days.
Can you give the solution.
Regards,
Chow.Hi chow,
What is the condition that u are using the Condition Statement.
Please check the status returned from the Approval Process, by analyzing the Workflow Log for the particular step.
Think there is a problem with the condition statement.
Regards,
Raj
Maybe you are looking for
-
How do I restore my mac to it's Factory settings w/o Disk Utility?
Hello Everybody. I had some trouble with not being able to start my Macbook Pro. So I decided to just restore it to its default settings. I then erased the disk using the Utility Panel, and then pressed reinstall OS X Lion on the Macintosh HD. It the
-
Oracle Enterprise Server 8i 8.1.7 and HP Proliant ML350 G3
I would like if it has any clarification regarding the compatibility problem between Oracle Enterprise Server 8i 8.1.7 and HP Proliant ML350 G3 Server. I cann't proceed with the installation of Oracle Enterprise Server 8i 8.1.7 on that machine whilst
-
I have a scenario where I'm collecting Debmas from R3 and I want to convert it to a text file. I'm unable to transform the multiple Debmas to a single xml structure with multiple debmas. The BPM collects the IDOCs correctly but during the transformat
-
Everyone with a santa rosa macbook pro..
did the wireless fix sort the issues out!? i really need to no. without the wireless working on my macbook pro when i get it in a week..itl be useless! everyone whats going on???
-
I get text using the read text FM in Smartforms into an Internal table of type TLINE. Then I create a Loop node and loop the contents into a structure of type TLINE . In the loop node i create a Text node and try to display the content of the structu