This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

AhFai Chan

Ranch Hand
+ Follow
since May 10, 2004
AhFai likes ...
Android Eclipse IDE Java
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
86
Given in last 30 days
12
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by AhFai Chan

Thank-you for sharing your experience.

Here is one more question, promise my last one on this topic

Just going by your experience with configuring Spring Containers, which of the following method would give me the least number of lines of codes + great overview of flow of control?
XML configuration
Annotations
Java Source Code (the POJO approach)
4 days ago

Rob Spoor wrote:Spring can do JSTL + CSS as well, and it can definitely do MVC; there's a module called "spring-webmvc" after all. However, to get JSP + JSTL working you need to do some configuration. The default is Thymeleaf, and with it you can do just about the same as with JSP + JSTL but in a slightly different way. CSS is really easy to get working; just put it in src/main/resources/static or src/main/resources/public, as everything in those folders is directly accessible as static content relative to the context path (so src/main/resources/static/style.css is available as http://localhost:8080/style.css out-of-the-box, as there is no context path out-of-the-box).



I read your reply a few times and I was looking at Spring Framework again,  in terms of data access (DAO); web-mvc and the core containers, seems Spring is ideal for a scalable enterprise project. I have a few last questions:

1) continuing development and support of the framework, can I continue using 5.1 and how easy is the version upgrade;
2) does it support a UI such as HTML+JSTL and/or Swing
            2.1   although I like the Swing JComponents, JFrames and Dialogs (they have an FX feel to it), Swing itself does not have a drag and drop builder like WindowBuilder or Gluon .
            2.2   Swing has some great layouts e.g. BorderLayout and GridLayout, but also some tedious, long winded codes to get horizontal and vertical alignment of JFrame components e.g. this code in V of MVC (seriously?!)


3) has anyone had experience deploying the whole Spring system to Tomcat and AWS?



5 days ago

Tim Holloway wrote:Back to the original topic:

You can collapse a project down to its bare minimum with a single "clean" command, ship it around the world, and rebuild the whole thing somewhere else with only the Java compiler and Maven itself for pre-supplied resources.

Personally, I've had Gradle projects break on me. Maven is more solid, which is another reason I prefer Maven.



Thank-you. I am going with Maven and github. So just ship a pom file to git?

Thanks for sharing your experience with me.
1 week ago
In FX, I could click on a row and a different scene will pop up, one that I could move to another monitor.

How do I do that in JSTL+CSS? By JSTL I mean XML+servlet

Please just point me to research material and/or books.

I am thinking about using a button with a hyperlink, passing parameters using the URI doGet ( as it is internal to the Java app, I think there's no security risk there)
Thanks for the inputs and sharing, my software ecosphere is coming together.

Sorry if the following question seems unrelated to the subject title, but it is a collection of interacting software that I am dealing with

I have evaluated JSTL using MVC + CSS + mySQL and Tomcat -vs- Spring.
Spring doesn't use HTML or CSS, it's attractive inasmuch that it seems more straightforward and simpler but lacks the sophistication of JSTL + CSS and MVC which is very powerful.

For a dynamic web project with thick server and thin client, which combination would you use? Must scale well.
1 week ago
I need help / input / your experience  
1 week ago
Hi again.

I am using Windows 10, and my SSD is partitioned into C, D and E drive.

From C drive, I can compile using javac followed by the whole directory tree to the java app e.g.  C:\>javac E:\Users\abcde\Swing\edu\swingdemos\gui\SwingControlDemo.java

But when I try to run it using the same directory tree to the newly compiled class file, error message says cannot find the main class!

Error: Could not find or load main class E:\Users\abcde\Swing\edu\swingdemos\gui\SwingControlDemo

Also, from cmd, I cannot cd from C:\ to either D:\ or E:\, it is always stuck on C:\

This is the first time I am compiling and running from command line rather than from IDE.

What's happening?


1 week ago

Rob Spoor wrote:Ant can't manage dependencies for you. A better question would be "Maven or Gradle?". I haven't really used Gradle so I can't answer that question for you.


Isn't Gradle only for Android... I did some work with it
1 week ago
I'm at that stage where I need a build tool that
1.  let me collaborate with others (something like git, which feels...clunky)
2.  manage dependencies and versions
3. take care of the whole build process for me

What's popular and easy to learn and use, no steep learning curve, Maven or Ant?
1 week ago

Campbell Ritchie wrote:You mean, set the options for each project? If so, yes.



Is there anyway I can re-use my JavaFX codes for Spring? I'd like to see the same user interfaces and business logic.
The business logic in the stored procedures and database are reusable, but the user interfaces need to be coded in Spring.
3 weeks ago

Campbell Ritchie wrote:Usually no. You can set a different JDK version for each project, however.



So, simply overwrite the Eclipse defaults on a project by project basis?
3 weeks ago

Campbell Ritchie wrote:How have you set your PATH environment variable?



I have downloaded both JDK and JRE 1.8.0_171 from Oracle archive and :
(1) set Exclipse defaults like this  
                         Window ->  Preferences -> jre 1.8.0_171 (default)  but left the _102 b/c I need it for another project
                         Window -> Build Path -> User Libraries ( e.g. javafx-sdk 17,  MyJarLibrary (stuff like JSON etc) )
(2) right click project_name -> Java Build Path -> JavaFX SDK,  javafx-sdk17,  JRE System Library [JavaSE-1.8]

That configuration seems to work, I'll leave default at that.

QUESTION:
Do people have a different workspace for each project? Project owners/managers might want a different JDK or JRE.
3 weeks ago
I had to re-install Eclipse with my old compile and runtime environments
Compile
javac -version  --> 1.8.0_171

Runtime
java -version 1.8.0_301

How best to sync them and avoid warnings??

I now have these warnings:
3 weeks ago
Thanks, the webapps do use HttpServletResponse and HttpServletRequest.
I think I'll just accept that TCat is using 4 ports if it is not degrading the system performance. Handling this is a bridge too far for me for now.
1 month ago

Rob Spoor wrote:

Tim Holloway wrote:I could swear that that display says that Tomcat is talking to itself.


That's what it looks like to me to. In fact, the first 6 entries are all pairs of two, including the expressvpnd entries.

Ron McLeod wrote:

Norm Radder wrote:How do you get that display shown in the image you posted?


Looks like a netstat-like view using CurrPorts.


Either that or TcpView.




I used TCPView
1 month ago