This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Manish Agarwal

Greenhorn
+ Follow
since Jan 30, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Manish Agarwal

Hi All,

I am trying to achieve a use case where I want to read an implementation of a particular interface from all bundles as soon as the bundle is started. So, initially I created a BundleListener and as soon as the bundle is started I tried to read the Osgi service from registry, but it did not work. Because Spring DM extender created the ApplicationContext for the bundle after the bundle is started.

So, I tried another solution where I created an OsgiBundleApplicationContextListener. But for some reason this listener listened to AppContextRefreshed event from only two bundles out of 10 bundles that I have.

Am I missing someting here, how can I receive AppContextRefreshed event from all bundles?

Note: I already posted this on Eclipse/virgo forum but did not get any reply, hence posting here again.

Thanks in advance.
Manish

Originally posted by Jothi Shankar Kumar Sankararaj:
Manish,

When you use a c:catch body, why is that you also need <%@ Page errorPage...>??



Hello Jothi,

When you use c:catch body there is NO need to add page directive errorPage.
I have tried that.
Please let me know if I still doesn't understand your question.

Thanks
Manish
Hi Ashirvaad,

Try this link.Eclipse3.2
It is complete version having all the required plugins.
I have already tried it.
Apart from HFSJ , please dont forget to read specification. They are very important.
Hi Jothi,

What if you want to perform some action depending upon the exception type?
I mean we may have some situations where we want to just ignore the exception and continue the processing or perform different action for different exceptions. In this case you'll need <c:catch> errorPage page directive will not fulfill this requirement.
This is just my view.
Hi Michael,

Filter executes in the order they are defined in the DD.
see this link
Hi Naveen,

In your first post you have mentioned that you are setting the attribute in jsp and then trying to retrieve it in Servlet, while in the code that you have provided later you are trying to set attribute in Servlet and retrieve it in jsp.

One issue that I found in your later code is as follows:

In the servlet you are adding the attribute in request.
*************************
actionForm.setUserName(userName);
req.setAttribute("registrationInfo", actionForm);
String status = //Execute the business action
*************************

while in jsp you are using scope as "application"
*************************
<jsp:useBean id="registrationInfo" class="com.RegistrationActionForm" scope="application" />
*************************
That might be the reason you are not getting results.

However,if you are doing as you have mentioned in your first post then you might be setting attribute in one request and then retrieving it in next request, that is why you are not able to retrieve it in request scope and its working fine in other scopes.

Thanks,
Manish
Hi Karthick,

The only materila I consult apart from HFSJ is "SPECS". Its very important to go through servlet & JSP specifications. It is available on net you can google it.

Thanks,
manish
Hi Ranchers,

Today I cleared the SCWCD1.4 with 89%.
I am really thankful to the authors of HFSJ , its really the best technical book I have read so far.
And Javaranch has also been very helpful to me during the preparation.

Thanks,
Manish
Congrats Darshan!!
Great Job.
Hi Jigar,

In my opinion you can create a method in the new jsp and call that method in the same jsp. This method will be executed when this jsp is called. This way you can add your code in jsp.
This is very bad practice to put java code in jsp but in your case you cant help it.
15 years ago
JSP
Hi Janhavi,

When you specify only type attribute (without class attribute) in the <jsp:useBean> action then the object specified by "id" (myobj in your case) must be already present in the scope, if it does not present then it will throw "java.lang.InstantiationException".

So punch line is "If type is used without class attribute then bean must already exist in the scope"

Thanks,
Manish