Joe Tseng

Greenhorn
+ Follow
since Nov 09, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Joe Tseng

This might be somewhat of a weird question but I hope someone can still help me with it. I am trying to get JBoss installed and running on my new notebook (running WinXP). The first time I tried to get it running it hung. Then I thought this might be caused by my Norton firewall software. JBoss ran with no problems as soon as I disabled it. To allow JBoss to run with the firewall up, I would need to provide it with an executable. Would that be java.exe?
18 years ago
I've got a W2k server with a default CMFX install instance; I used the default installer app and did not explicitly specify whether or not I wanted CFMX to be installed from an EAR file. Can I still use JRun as a JSP/J2EE platform?
18 years ago
I've downloaded the latest versions of Eclipse, Tomcat, Beehive and Pollinate and I am very close to getting it to work. I've been using the following instructions:

http://www.eclipse.org/webtools/wst/components/ws/download_instructions_for_jars.html
http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/pollinate-home/proposal/review.html

When I try to launch the application by running demo.jsp (2nd link above), I get the following error in Eclipse:

Could not load the Tomcat server configuration at /Servers/Tomcat v5.5 Server @ localhost-config. The configuration may be corrupt or incomplete.
Could not load the Tomcat server configuration at /Servers/Tomcat v5.5 Server @ localhost-config. The configuration may be corrupt or incomplete.

What does that mean and how do I get around it?

FYI my default app location is /usr/share/tomcat/webapps.
After a bit of hacking around I finally got Tomcat to play nice with Apache2 on SuSE 9.2; now I can't seem to get Apache to read the default home directory files. When I run localhost/index.jsp, it brings up the file located in $TOMCAT_HOME/webapps/ROOT rather than /srv/www/htdocs. I thought maybe I had configured Tomcat incorrectly somehow and it was running on port 80; when I stopped Apache I was immediately unable to bring up index.jsp. The reverse occured when I restarted Apache.

Any ideas?

Setup:
SuSE 9.2
Sun JDK 1.5.0_02
Tomcat 5.5.7
mod_jk 1.2.10
Apache 2.0.50
[ April 06, 2005: Message edited by: Joe Tseng ]
19 years ago
So from your comment, my impression is that an EJB can be a JavaBean with alot more crap piled on top of it (remote/home/local-home interfaces) that have certain aspects of its behavior and interaction controlled by the J2EE container/server, right?
19 years ago
I was asked this question before but I couldn't give a straight answer. I think this thread is the right place to ask... So what IS the difference between a JavaBean and EJB?

Couldn't you have some of the the same characteristics of a bean be put into an EJB? Say I want to write a stateless session EJB; couldn't I create methods to implement business logic in either type of bean? (I'm ignoring the remote and home interfaces for now and focusing on just the beans.)
[ January 28, 2005: Message edited by: Joe Tseng ]
19 years ago
Thank you all for the responses; your suggestions should help me out quite a bit.
20 years ago
I know I could get content out of the request header (using getRequest.getInputStream()) if I submitted content using a regular POST form. Could I do that if I used a NetUI form? (Somehow I doubt it.) If not, is there any alternative way for me to do so?
20 years ago

Why not use a servlet based central server and send messages with HTTP? That makes for a pretty lightweight client and can avoid problems with firewalls.

You need to define some more characteristics of the system you want to build - how many clients, local or WAN, can message delivery be unreliable, etc.



OK here goes nothing... I am interested in creating a system where I could have a server talk to a lightweight agent and vice versa. The server could get a directive from an admin or a cron job and send that directive to the affected agents. The agents would be event-driven or job-driven and send messages back to the server. I figure the agents could work with both servers and workstations/PCs, thus IMO the need for the small size.

Unless I'm shown otherwise, I didn't believe this kind of interaction could (or should) be done using web services, since bidirectional communications required the use of web servers on both ends, and I want to have the agent side of the equation as small and compartmentalized as possible.
20 years ago
My interest in using Java-based distributed computing technologies has piqued, but I'm getting what is seemingly conflicting, IMO definitely confusing information. From what I have read so far, here are my questions:

  • What I want to do is create lightweight agents that can talk back and forth to a central server; is CORBA for me, is it actually something else I want to use, or is that ability not available for Java right now?
  • What are the differences between CORBA, RMI, and RMI-IIOP? How are they related to each other?
  • I read some online information re: RMI and it seems like you still need a web server to make it all work; is that true, or did I misread something?
  • Can anyone suggest any helpful documentation? It seems to me the books on these topics are somewhat out of date.


  • [ December 13, 2004: Message edited by: Joe Tseng ]
    20 years ago
    I have a very simple portlet using two JPF controllers; the 1st drives a page that displays content from a document mgmt system based on metadata stored in a database table and the 2nd drives a page that displays an entry form used to modify that metadata; it's accessed by clicking on the portlet's edit button.

    Before the 1st display page is rendered, the begin action pulls the metadata from the database. When I go to the edit form and submit any changes, I can see the changes are saved immediately. But when I return to the initial display page, I still get the previous display.

    Tracing revealed that the latest metadata is extracted when the begin method in the 1st JPF is executed and then it passes the browser to the corresponding JSP. When I return to the 1st JPF after I update my metadata, the begin action is not run and the JSP is given the older metadata.

    Is there any way to force the begin method to be executed?
    20 years ago
    I want to be able to get the name of the file I've selected for upload. When my code runs <formfile>.getFileName(), I get a NullPointerException message. Here's the test code in question:

    JPF/controller:

    protected Forward submit(SubmitForm form)
    {
    fileName = form.getFile1().getFileName();
    return new Forward("success");
    }

    public static class SubmitForm extends FormData
    {
    private FormFile file1;

    public void setFile1(FormFile file1)
    {
    this.file1 = file1;
    }

    public FormFile getFile1()
    {
    return this.file1;
    }
    }

    JSP:

    <netui:fileUpload dataSource="{actionForm.file1}"/>
    20 years ago
    JSP
    I'm trying to read from a text file and I'm getting a NullPointerException when I try to execute a getFileData() method against a FormFile instance. Here's part of my content:

    JSP:

    <netui:fileUpload dataSource="actionForm.firstFile" size="40"/>

    JPF:

    import org.apache.struts.upload.FormFile;

    ...

    public static class CheckInForm extends FormData {
    private FormFile firstFile;

    private void setFirstFile (FormFile firstFile)
    { this.firstFile = firstFile; }
    public FormFile getFirstFile()
    { return this.firstFile; }
    }


    ...
    protected Forward checkIn(CheckInForm form) {
    System.out.println("File contents: " + form.getFirstFile().getFileData());
    }

    Any useful clues would be greatly appreciated. Have a great rest of the long weekend!
    20 years ago
    Actually I got it working using this in my JPF:

    getSession().getServletContext().getInitParameter("this_param")

    Thx for the reply!
    20 years ago
    I'm trying to redo a JSP page that, as one of the things it does, reads a parameter value from web.xml:

    String ref = pageContext.getServletContext().getInitParameter("FOOBAR");

    I want to move this step to a JPF file; how do go about doing this? Thx.
    20 years ago