Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

Prajakta Acharya

Ranch Hand
+ Follow
since Nov 08, 2012
Prajakta likes ...
Spring Java
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prajakta Acharya


What I can see from the code is, you have not explicitly mapped studentId anywhere.
The Javascript function sets value of course name to currCourse which gets mapped in the action form as expected.

You should have an additional hidden field as studentId in the form, set it in the java script function and map it to the action form.

Hope this helps.

Note: Next time when you put code in your post, please make sure to add code tags to make it readable.
9 years ago
Can you share the code piece where student drop down is defined in JSP and where it is retrieved in the Action class. And asociated configuration where the form fields are mapped to Action form (if you are using Struts 1).
In Struts 2, the field names can be directly mapped to Action class instance variables.
9 years ago
Hi Ajay,

As you mentioned, annotating a field with @EJB injects EJB reference by looking up the JNDI name( specified by lookup property of @EJB)
@EJB on EJB class registers the EJB with a specific JNDI name (though it is registered by a default name in absence of 'name' property)
Hi Dieter,

Thank you for your opinion,it has encouraged me to complete the cert
This class is included in struts2-core-*.jar.
As Joe mentioned, download Struts 2 and you will get all the required libraries.
10 years ago

As can be seen, HelloRemote is an interface which should be available on the client side. Have you packaged the interface class in a JAR and included in the client application?
What is your project configuration?

When you deploy the EJB JAR in JBoss, did you see the deployed EJB name on the JBOSS console?
I think there is some issue with the JNDI name with which the EJB is registered on the server.
Excellent score. Congrats!!!
10 years ago

Have you tried printing the exception stack trace?
Its possible that there is some exception at those lines but since it is simply caught and not printed, there is no way to understand what went wrong.

E.g on line 55 there might be ArrayIndexOutOfBoundsException (just an example) but you wont know.

Does your table have only two columns?
10 years ago

What I can see in the code is that message_list is a vector of "Messages" objects of which writer, message etc are the properties.
So to access those properties, you would need to go through the "Messages" object from the current iteration.
Is there a way to access the currently iterated object out of the collection?
10 years ago
Yes, that does make sense. Thank you for your response.
EJB specs mention that an EJB must not use package since these APIs are not well suited for business components to access data.
Can anyone explain this? Could not make out the reason/motivation behind this restriction.
Oops.....yes, servlet shouldn't have a constructor at first place.
Sorry for that.

Just imagined what will be the next error once a fully qualified class is referred in web.xml.
Container will not be able to instantiate it and wrote that.

But yes, the constructor should not be there.
10 years ago
The servlet-class element should have fully qualified class name of the servlet.

Also, put a default constructor explicitly since there is a custom constructor in the class.
10 years ago
I dont think so.

You can place multiple imports as comma seperated in a single import attribute.