This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!

Kevin Crocker

Greenhorn
+ Follow
since Sep 06, 2002
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 Kevin Crocker

Ankur Srivastav wrote:I also tried doing so, but in my case the client used open source Portal Liferay.

But in any case your first task will be to convert your Application to a JSR compliant Portlet, which will enable it to be deployed and run in any Portal environment.

With IBM Portal normally there are some problems which come up especially if your Application does not follow a set pattern like Struts.

I compiled my experiences of converting a Struts 2 based Application to JSR Portlet which was deployed to IBM Portal. You can visit the following Portlet Blog to get a better idea.



Thanks Ankur - I specifically want to avoid anything with Struts - the client has an internal battle raging about Struts - they've never had it, and don't have it right now but have lots of servlet code, they've invested heavily in the J2EE framework, but they have one vendor that is struts blinded. I'd like to stay out of that if I can, so anything I show them, can't have Struts in it.

I know how to convert servlets to portlets - the issue is that I have to find published docs for them.
Thanks again.
11 years ago
Hi, I've had a client ask me to provide them with some information in transforming their current J2EE servlet environment into their new IBM WebSphere Portlet environment. I'm looking for white papers, articles, or just about anything that's already written that I can point them to.

I have googled this with no luck, so I need some help from those who have been here before.

any pointers would be most appreciated.

Thanks muchly
11 years ago

Originally posted by Bear Bibeault:
You don't need to learn everything at once. In fact, a lot of what you listed you don't ever need to learn at all.

If you want to write wep apps with servlets and JSP, just learn servlet basics, and become familiar with JSP 2.0 and the JSTL.

Be sure to write scripless JSP pages with no Java embedded within them. That way, your JSP pages are the pure templates you seek without any Java goo to gum up the works.

Then, and only then, are you in a position to determine if adopting other technologies is appropriate or even required.

Since your focus seems to be on web applications, I'm movong this to the Servlets forum.




Hi Bear, thanks for the comments. Very helpful.

Hm, a lot of what I listed I don't need. OK. I'll buy that. It sure shortens my learning curve. I already know servlets, I'm not an expert but I know how to write them. I also know JSP (mostly 1 not much 2) but haven't spent much time with JSTL. I already have 4 JSP books, and 3 JSTL books - I guess it's time I learned to read.

I do admit, I hate refactoring after deciding to change technologies.

I guess I need to read up more on scriptless JSP - I'm not really familiar with it unless all it is is the new JSP 2 that uses JSTL like tags rather than the scriptlet tags.

I'll post back once I get something working.

Thanks again, Bear. You've been most helpful.

Kevin
15 years ago

Originally posted by Chengwei Lee:

Use MVC, you know that, don't you? In the ideal world, it will be great if you could decouple your business logic from presentation, but if you're working with existing codes, chances are you're stuck, unless you refactor.

Good luck!



Chengwei,

Thanks for the tips. I know MVC. I havae an ideal world right now. This is my own code from scratch (even from OOA&D via UML - I even did requirements documentation). This code has no legacy in it at all - it's all just falling from my head (in a big heap at the moment). I've already written about 35000 lines of code and am in my who-know-which iteration. I've gotten to the point where I need to start tackling the parts that I don't really understand the big picture of how things fit together, hence the post.

I refactor whenever it appears that I've lost focus on what classes are supposed to do. To me, that's the point that tells me that I should clean up the current iteration and start with the next one.

Thanks again.

Kevin
15 years ago
Hi all,

I've been around Java for a bit, but my head is getting tired of all the acronyms and where they fit into the puzzle. There's a lot of stuff that I just don't use, like awt, swing. I'm more into threads, io, nio, net, generics, annotation, enum, collections, OODBMS, j3d. I need to learn servlets, jsp, jstl, jsf (or whatever - struts?) a lot better.

I have a lot of things to figure out and less time to do it than I had before.

The apache people have managed to confuse me (althought I've heard that's not hard to do )

How do all the following fit into the large puzzle and why would I want to learn any of them (ie. what real benefit do they give me versus the learning curve), and is there an order to learning them:

Swing, Tapestry, Forrest, Cocoon, Maven, Turbine, Velocity, Spring (Winter, Fall, Summer ), Avalon, Excaliber, JSF, SWT

use small words - the word framework means nothing to me

the real issue is that I'm trying to pull together an easy way to deliver
web pages/elements/regions asynchronously (with Java, I'd prefer not to do AJAX unless that's the only way), with dynamic info at both ends and I want to be able to accomplish this trying to maintain as clean a MVC2 as I can.

I can't stand all that HTML in servlets, and I can't stand all the JSP in web pages - isn't there an easy way to decouple web pages from server code via templates - html templates, css templates, and webflow templates, all mixed together so I can have this from inside my Java dev environment (Eclipse).

Anyway, enough ranting, I'm just trying to settle my brain down a little and get a bigger picture since that's how I understand things better, quicker.

Kevin
15 years ago
Hi all,

I've been around Java for a bit, but my head is getting tired of all the acronyms and where they fit into the puzzle. There's a lot of stuff that I just don't use, like awt, swing. I'm more into threads, io, nio, net, generics, annotation, enum, collections, OODBMS, j3d. I need to learn servlets, jsp, jstl, jsf (or whatever - struts?) a lot better.

I have a lot of things to figure out and less time to do it than I had before.

The apache people have managed to confuse me (althought I've heard that's not hard to do )

How do all the following fit into the large puzzle and why would I want to learn any of them (ie. what real benefit do they give me versus the learning curve), and is there an order to learning them:

Swing, Tapestry, Forrest, Cocoon, Maven, Turbine, Velocity, Spring (Winter, Fall, Summer ), Avalon, Excaliber, JSF, SWT

use small words - the word framework means nothing to me

the real issue is that I'm trying to pull together an easy way to deliver
web pages/elements/regions asynchronously (with Java, I'd prefer not to do AJAX unless that's the only way), with dynamic info at both ends and I want to be able to accomplish this trying to maintain as clean a MVC2 as I can.

I can't stand all that HTML in servlets, and I can't stand all the JSP in web pages - isn't there an easy way to decouple web pages from server code via templates - html templates, css templates, and webflow templates, all mixed together so I can have this from inside my Java dev environment (Eclipse).

Anyway, enough ranting, I'm just trying to settle my brain down a little and get a bigger picture since that's how I understand things better, quicker.

Kevin
15 years ago
Bear,

I'm just now finding my way back to JavaRanch. Great article! Great timing (for me anyway). I'm looking forward to a better Front Controller so if you're doing one, I'm all ears.

Kevin

P.S. I sent you private email before I figured out how to get back into JR. I'll try to find a place to post here.
15 years ago
JSP
The jsp page that spawns this process displays as expected but the ant task never executes. I know this because the task sends out an email on the success/failure of the build.
I can cut and paste the cmd string into the console and it will run correctly and I get the email.
18 years ago
JSP
I have done some looking around and tried this in my jsp.
<%
out.print("<p><b>Running ant remotebuild</b>");
try {
Process remoteBuild = null;
String cmdline = "cmd.exe /E:1900 /C ant.bat -f c:\\build.xml remoteBuild";
remoteBuild = Runtime.getRuntime().exec(cmdline);
}catch (Exception e){
out.print("Error trying to build cogent : " + e.getMessage());
}
%>
but it still does not work. Please help!
18 years ago
JSP
I want to be able to run an ant task from my jsp. Is this possible?
18 years ago
JSP
I have two arrays of Beans. I first want to sort them and then assert if they are equal.
Can anyone help?
19 years ago
That is very interesting but really if I knew the size of my ResultSet I would just iterate through and make my array that size and populate.
Again, it means going through my ResultSet twice.
Thanks for all the info.
Question: Anyone know why Java does not have some means to check the size of the ResultSet obtained?
My only concern with using a Vector cast is that unused Vector capacity may show up as data in the String[].
Question: Does the Object[] returned by Vector.toArray() represent the size or the capacity of the underlying Vector implementation?
Note: I am bound to using String[] by an external API I am forced to use.
I have poured over the API and I can not find a simple way to make a String[] from a ResultSet (rs) that contains only one column of strings.
I can't believe that I would have to increment a counter by iterating through the rs and then use this counter to create my String[] and then again iterating through the rs to populate my String[].
There has to be something more efficient. Is there no row count method?
Please enlighten :roll:
You possible have JBuilder set up with its classpath pointing to the correct classes but you system's classpath needs to updated if you are running from the command prompt.
IE. You can build a classpath within JBuilder that is not the same as the system's classpath.
19 years ago