Calson LI

Ranch Hand
+ Follow
since Nov 18, 2005
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 Calson LI

Hi all,

I installed Eclipse Helios, JBoss 4.0.5.GA, XDoclet 1.2.3 under Java EE property in Eclipse Helios. But I failed to generate EJB 2.0 with XDoclet based on the example http://www.eclipse.org/webtools/community/tutorials/ejbtutorial/buildingejbs.html

Could anyone give me some advice?

Thanks a lot for your assistance.
Calson
13 years ago
Hi all,

I installed Netbeans 6.9.1 with GlassFish 3.0.1 in my Windows XP platform and succesfully deployed a web application under GlassFish. But I failed to find any war file under \program file\glassfish-3.0.1 subfolders. I can easily find war file if I deployed the same web application under JBoss. Could anyone tell me where GlassFish places the deployed project war file?

Thanks for your assistance,
Calson
13 years ago
Dear Peter,

I change default port number, 8080 of JBoss 4.0.5.GA to 18080 at
  • "\jboss-4.0.5.GA\server\default\deploy\http-invoker.sar\META-INF\jboss-service.xml"; and
  • "\jboss-4.0.5.GA\server\default\deploy\jbossweb-tomcat55.sar\server.xml";


  • Also, I change the port number in eclipse for JBoss 4.0.5.GA to 18080.

    Since these port number matches, Jboss 4.0.5.GA can start properly in Eclipse.

    Thanks,
    Calson

    13 years ago
    Thanks Peter, the problem was solved.
    13 years ago
    I started JBoss 4.0.5 using port 18080, and JBoss 4.2.2 using port 28080 because 8080 in localhost is used. But I failed to start them with error message "Server JBoss vx.x at localhost was unable to start within 65 seconds. If the server requires more time, try increasing the timeout in the server editor". I have tried to increase the time-out for starting JBoss 4.0.5 and JBoss 4.2.2 in Eclipse Helios. But the problem persisted.

    The strange things are that I could start JBoss 4.0.5 and JBoss 4.2.2 in DOS environment by runing "run.bat" under JBossx.x\bin folder. Also, I could start these 2 application servers in Netbeans environment.

    Is there any configuration I need to set-up in Eclipse Helios?

    Thanks a lot for your assistance in advance.
    13 years ago
    Hi all,

    I have a Unix cluster of 2 servers. I wrote a shell script in Unix environment (HP-UX precisely). It created a text file and then copy this file to another Unix server in the same cluster with rcp. I tested this shell script works properly, say in Unix account name 'a'. But when I request our Unix admin staff to add this shell script to SAM (rsam) menu and test this shell script with Unix account 'b'. Unix admin staff told me that account 'b' has privilege of account 'a' while running this script. But I got the following error message "remshd Login Incorrect" while running rcp in the script.

    Could you provide me some advice?

    Thanks,
    Calson
    15 years ago
    Hi Ulf,

    Thanks a lot for your reply. Yes, you are right, method 1 is downloading. I am more worrying about method 2.

    Regards,
    Calson
    15 years ago
    Thanks for your response, ULF.

    Actually, there are 2 ways of uploading file to web server in a web application using 'https'.

    Method 1. In doGet() of doPost() method, write code like the following
    public void doGet(... req, ... res) {
    res.setContentType("application/jar");
    File f = new File("test.jar");
    byte [] byteArray = new byte[(int) f.length()];
    FileInputStream is = new FileInputStream(f);
    is.read(byteArray);
    OutputStream os = res.getOutputStream();
    os.write(byteArray);
    os.flush();
    }

    Method 2. Use 3rd party jar to upload file to web server.

    To my understanding Method 1 should use SSL channel, i.e. https. Am I right?

    But for Method 2, if we use https, will method 2 use this secure channel to send data from client to web server?

    Thank you,
    Calson
    15 years ago
    Hi all,

    We have a web application using SSL. But this web application provides uploading file from client to web server and downloading file from web server to client. Will file upload and file download use SSL?

    Thanks for your assistance in advance.

    Calson
    15 years ago
    Got it, Merill. Thanks a lot for your valuable advice.
    15 years ago
    Hi all,

    If Strus tags and JSTL tags serves the same purpose, what tags do you think we should use?

    Thanks in advance,
    Calson
    15 years ago
    Hi Bear,

    Thanks for your reply and advice.

    Firstly, I felt more confused after reading the display naming rule. 'Calson' is my first name, 'LI' is my last name. Could you point out exactly what display name shall I follow?

    Secondly, could you use some examples to explain 'no difference' between <%=initPage%> and "<%=initPage%>".

    Thank you,
    Calson
    15 years ago
    JSP
    Eclipse is the open source project initiated by IBM, and free of charge. Its advantage is that this IDE is extensible as it allows you to install plug-ins. MyEclipse has a lot of cutomization based on Eclipse, which saves your time to download plugins and installation time. But MyEclipse needs annual subscription fee, which is around US$30 per year. I used MyEclipse for a year, after getting familiar with the user interface, I switched to use Eclipse. e.g. In MyEclpse, you can just add Struts feature by clicking a web project and select add struts. But in Eclipse, at least in v3.3.1, it has no this feature, you have to download a blank.war from struts web site, and add struts feature.

    For Netbeans, it is IDE owned by Sun microsystem, also, free of charge as Sun opens its source to the public and allow any people in the world to enhance it. It is pretty cool but its user interface is quite different from Eclipse. The initial launch is pretty slow when compared with Eclipse.

    Frankly speaking, at this moment, more developers prefer using Eclipse. For the future, who knows?

    Hope this can help you.

    P.S. I spent quite a long time to try and getting familiar with these tools. You may surf Netbeans and Eclipse website to find out more.
    Hi all,

    I would like to send String variable content from JSP to Javascript. So
    I tried the following fragment in one JSP file. May I know why the <%=initPage%> worked in the 2nd line but not in the <script> tags. In <script> tags, <%=initPage%> must be enclosed either in single quote or double quotes. Could anyone explain the difference between <%=initPage%> and "<%=initPage%>"?

    <% String initPage="abc"; %>
    The string variable is <%=initPage%>

    <script language="Javascript">
    var initPageFromJSP="<%=initPage%>";
    alert(initPageFromJSP);
    </script>

    Thanks a lot,
    Calson
    15 years ago
    JSP
    Hi all,

    I encountered "Cannot tag libary descriptor for /tags/struts-html" in one JSP, called userRegistration.jsp in Eclipse 3.3.1 editor. The syntax showed a red cross on the following 3 lines in the JSP.

    <%@ taglib uri="/tags/struts-html" prefix="html"%>
    <%@ taglib uri="/tags/struts-bean" prefix="bean"%>
    <%@ taglib uri="/tags/struts-logic" prefix="logic"%>
    ...

    I added the following in web.xml

    <web-app>
    < !-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>

    <taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>

    <taglib>
    <taglib-uri>/tags/struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>

    <taglib>
    <taglib-uri>/tags/struts-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
    </taglib>

    <taglib>
    <taglib-uri>/tags/struts-tiles</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>

    </web-app>

    Also, struts-html.tld, struts-logic.tld, struts-bean.tld were put under /WEB-INF folder. The following Jar files were included WEB-INF/lib
    antlr-2.7.2.jar
    commons-beanutils-1.7.0.jar
    commons-chain-1.1.jar
    commons-digester-1.8.jar
    commons-logging-1.0.4.jar
    commons-validator-1.3.1.jar
    oro-2.0.8.jar
    struts-core-1.3.8.jar
    struts-taglib-1.3.8.jar
    struts-tiles-1.3.8.jar

    Can someone tell me what things I have overlooked?

    Thanks in advance.
    Calson