Peter Loew

Greenhorn
+ Follow
since Jul 06, 2003
Merit badge: grant badges
For More
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 Peter Loew

It's OK I solved it.

For some reason or another the file name in the path has to be case sensitive, but this does not seem to bother my IDE (JDeveloper) as it worked through there so I didn't really notice.

Thanks for the help - (Peter wipes sweat from brow!)

P
17 years ago
Thanks Edwin,

The path settings are all the same and I have defined all the libs etc. in the manifest file in the JAR.

I just done more debugging and it turns out that when it works in JDeveloper, it returns the absolute address to the properties file, i.e. C:\...... this is why it isn't working in the jar, I thought it would return the relative location of the resource instead. This is why it returns null - it's simply a path issue but I don't know how to fix it.

Make sense?
17 years ago
Can someone please provide me a solution? I'm trying to read in a properties file using the class loader as such:



The problem is that it work when I run it from within JDeveloper, but the application must be packaged up and run from a JAR file. After Ant makes the JAR I keep getting NullPointerExceptions at the props.load(...) line above.

Of course the properties file is in the util/ package/directory.

Can someone please help?

P
17 years ago
Hi All,

Is there a standard way to implement a "please wait..." page? For example when filling out a form and pressing send it can take up to 30 secs to process the data, so I'd like to have a wait page displayed to the user.

I've seen other posts and many people seem to use the META tag to constantly refresh the page and check an attribute in the Session object. While I could do this, I was just wondering if there is a better more "accepted" way.

Thanks,

P
18 years ago
For example constantly polling the database looking for new requests and if meeting the criteria marking them as complete...
18 years ago
Thanks for the response.

A message-driven bean would be overkill and add unnecessary complexity since the app does not have an EJB layer.

Thanks for the suggestions though.
18 years ago
Hi All,

As a general rule, should a servlet spawn a separate thread to handle repetitive tasks? Is this good design practice? Any info you could give or articles you could point me too would be most useful.

Thanks,

Peter
18 years ago
Hi all,

We currently have a J2EE Web App that is responsible for handling clearance requests. This same app also emails out the clearance results via a separate thread that is initialised from the servlet.

The problem is sometimes the thread gets stuck and we need to restart the entire app.

What is the best design approach to reworking the email functionality of the web app? Should a J2EE app that has a primary business function (to clear requests) also be responsible for emailing them out too? What are the design choices and which would be best practice?

Thanks so much,

Peter
18 years ago
Hello all,

I was pleasantly surprised to find this thread; ironically JavaRanch was my last hope for some help with Eclipse, and I bumped into this thread.

I can totally empathise with Jeff Salter here. I have finally decided to start using Eclipse for my J2EE development and a good few hours ago I downloaded it to attempt a start.

I want to like Eclipse - I really do. All the training courses I've been on already have it up and running with the WTP for J2EE development. Though I use JDeveloper at work, I really want to make the move to Eclipse.

After those few hours of trying to install all the plugins and features just to make it work with J2EE, I have finally given up; at least for the day.

From reading this thread, and from what I now understand about Eclipse, it seems like the learning curve is way too steep.

See, I don't want to have to care about the inner workings of this tool. I don't want to care about learning the framework or its concepts. I don't want to care about how it's built, its architecture, its technologies etc etc. I don't want to care about EMF, GEF, or any other proprietary components. The only thing I care about is using this tool to develop my J2EE Web Apps. Maybe I've got the wrong end of the stick. Maybe Eclipse is supposed to be used in some other way, starting from some other premise. If that's the case then it probably isn't for me.

Which brings me on to the documentation side of things. There isn't a single doc or tutorial I could find to help me out. The only one I was able to find was some university module course that explained how to configure Eclipse to use with J2EE by installing the WTP. I also followed this to the tee and it didn't work.

Before you cry "noob" I've been officially developing J2EE apps with other IDEs for about 3 years - (NetBeans, JBuilder, JDeveloper) and have messed around with many others, none of which gave me this sort of headache. I know what you're thinking; Eclipse isn't an IDE per se right? Well, that actually is besides the point. You are supposed to make it work as a J2EE IDE, but it is precisely this I have been unable to do.

Like I said, I want to like Eclipse - I really do. But maybe I've started with the wrong premise, maybe I shouldn't be expecting to use it as an aid to developing my J2EE Web Apps; maybe it's used for some other purpose I am presently unaware of, and I've just misunderstood the hype.

P.

Originally posted by Bear Bibeault:
But I think you are on the right track. I'd recommend trying to minimize your reliance on scripting even under JSP 1.2 (though not to the point of creating complex contortions that are actually worse than scripting) in preparation for a future move to JSP 2.0.



I agree with you. Some applications we have here at work are completely over-engineered; The design is much more complex than the actual purpose, i.e. what it's meant to do. I am generally against increasing the complexity of an application to achieve something trivial.

Though Ben's idea about putting this logic in a bean is a good one, since it's fairly simple to achieve.

P
18 years ago
JSP
Yes, that is exactly what I'm trying to get away from. A number of other pages in this enterprise application do something similar. I thought I'd try and enforce a non-scriptlet policy but I see that might not be possible!

I think I'll end up using that approach. Thanks for your help.
18 years ago
JSP
Thanks Alec,

But my container boasts the JSP 1.2 Spec. Is there a way to do this with JSP 1.2?

P
18 years ago
JSP
Hi All,

In my JSP I want to get an object out of a JavaBean and do some processing with it. But I need to cast this object down to MyObject in order to work with it. E.g.:

<%
MyForm form = (MyForm)session.getAttribute("myForm")).
MyObject myObj = (MyObject)form.getMyObject();
// do some processing on myObj...
%>

How do I do this without using scriptlets? I realise this is a basic question so could somebody please either point me to the correct JSTL libraries to use or provide me with an example?

Thanks very much.

P

[ November 03, 2005: Message edited by: Peter Loew ]
[ November 03, 2005: Message edited by: Bear Bibeault ]
18 years ago
JSP
Problem solved.

Here at work we use the aforementioned containers and application servers, which are based on the J2EE 1.3 spec, which in turn incorporates the Servlet 2.3 spec, which in turn, has no rules about the web application order of deployment.

The J2EE 1.4 spec, incorporating the Servlet 2.4 spec however, does indeed have rules about the order of deployment, as Ben posted and as I should have realised previously (I never really looked at the specs before, but now I realise how important and practical they really are from a developer POV)

So, I downloaded the latest OC4J 10g DP version which is officially J2EE 1.4 based, deployed my app and hey presto, the debug statements are in nice chronological order with the Servlet 2.4 spec and everything works smoothly.

Thanks all for the help on this.
18 years ago

Originally posted by Neeraj Dheer:
why dont you post/send me your code and ill try it out on Tomcat and Websphere..
i am sorry for not being able to write it myself, am travelling and done have access to a PC at the place i am put up at the moment...but if you could post the code here, ill try it out at work...



Thanks Neeraj, I'll try to knock something up tomorrow and send you the ear/war file.
18 years ago