Gerome Kawa

Ranch Hand
+ Follow
since Dec 05, 2002
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 Gerome Kawa

Hi Ben
Can you please tell me some URLs where I can find som sample code/workign application for such a mechanism. I am not that great in coding so need some help to start writing it and then I can take it from there.
Thanks
Kawa
19 years ago
JSP
Actually it is an existing application and I cannot change the existing mechanism. What I need is to some way display display some user friendly message which refreshes intermittently about the processing which is happening at the backend. The backend processing happens in three stages and I want to display the user different messages as each stage starts.
Please let me know if you have any idea.

Thanks
Kawa
19 years ago
JSP
Hi
I have a JSP page with a button which when clicked does enormous processing at the back-end and takes around 10 minutes to complete. I want to provide the users some status update messages of what happening in the JSP.
Can anyone point to some sample application/design/code samples ideas of how to go ahead ?

Thanks
Kawa
19 years ago
JSP
Try using Jasper. I have seen it briefly and I think it has the potential to to give you SQL-report like output
19 years ago
Hi
I am Java/J2ee/Oracle analyst-developer with 9 years IT experience and Java/J2ee/Oracle about 5 years.
I am a British citizen have been working in the UK for the last 7 years.
My contract has just finished and am looking for J2ee analyst/module lead role in London.
I would be extremely glad if you let me know of any opprtunites.

Thanks
Kawa
ph:07941313108
19 years ago
Hi

I need to use a properties file to replace variables in a Java program and a servlet.

Eg. of Java program:
****************************************************

****************************************************
The servlet:

********************************************************************
I want to put the stuff between @xyz@ in the above programs in a properties file and access them - how do i do it?

I want to stuff @xyz@ in the servlet to come from a init-param of the servlet defined in web.xml .

Question:
Where should I put the properties file ?
How do i access it(the variavles in the properties file) from java program?
Do i need to put the properties file in the classpath?

Thanks
Kawa

[EDIT code tags added by Dave]
[ February 10, 2005: Message edited by: David O'Meara ]
19 years ago
Hi Jacquie
Its really good that you have come up with such a book.
I am software developer for 8 years now and I constantly keep on searching the net about shifting gracefully to a new role where I can make use of my already gained IT skills and gain extra business knowledge through which I can reap even better in the future. I believe that the key thing is to get yourself in the iteration of newRole-increasedSalary-gainExtraITAndBusinessSkill-newRole. The key hindrance I am facing is getting a new role where I can gain reusable business knowledge. For example I have worked predominantly as a analyst-developer using different programming languages in different industry sector (Oracle Forms/Reports(Hotel Sector 1yr), AS400(Manufacturing 1 yr), COBOL-DB2(Utility Sector 1yr), Java-J2EE(5 yrs in majorly web-development roles) and I am finding it immensely difficult now to get a stable career. My intention is to get into the Financial Sector where I think there is scope to gain tranferrable business knowledge coupled with increased pay.
I would appreciate if you can give me some advice how I can make this transition at my age of 32.

Thanks
Gerome
19 years ago
Anna
The ant.properties file is in the same folder as build.xml so what do i put in the dir attribute ?

Thanks
Kawa
19 years ago
I am having some problems as follows:

When am trying to execute the command
c:\hubtransmission>build all

am getting the following error

C:\hubtransmission>build all
-------------Hubtransmission 1.0 Build System-------------
Using Ant at c:\hubtransmission\buildtools\ant1.6.1

Buildfile: build.xml

init:

replace-tokens:

BUILD FAILED
C:\hubtransmission\build.xml:38: Either the file or the dir attribute must be specified


It seems the ant.properties cannot be identitfied but I cannot make out why ?
Anyone spot the mistake ?
**************************************************************
folder structure
**************************************************************
hubtransmission
--build(build.xml, ant.properties, build.bat)
----deploymentdescriptors
----ear
----src
----war
--buildtools
----ant1.6.1
--lib
--src
----descriptors
----java
----web
**************************************************************
build.xml
**************************************************************
<project name="Hubtransmission Emulator" default="all" basedir=".">

<target name="init">

<!--
<property file="ant.properties"/>
-->
<property name="fs" value="${file.separator}"/>
<property environment="env"/>

<property name="dirs.base" value="${basedir}"/>
<property name="classdir" value="${dirs.base}/build/src"/>
<property name="src" value="${dirs.base}/src"/>
<property name="web" value="${dirs.base}/web"/>
<property name="deploymentdescription" value="${dirs.base}/build/deploymentdescriptors"/>

<property name="ant.properties" value="ant.properties" />

<property name="warFile" value="hubtransmission.war"/>
<property name="earFile" value="hubtransmission.ear"/>


<property name="earDir" value="${dirs.base}/build/ear"/>
<property name="warDir" value="${dirs.base}/build/war"/>


<!-- Create Web-inf and classes directories -->
<mkdir dir="${warDir}/WEB-INF"/>
<mkdir dir="${warDir}/WEB-INF/classes"/>

<!-- Create Meta-inf and classes directories -->
<mkdir dir="${earDir}/META-INF"/>

</target>

<!-- Replace tokens-->
<target name="replace-tokens">
<replace replacefilterfile="ant.properties"/>
</target>

<!-- Main target -->
<target name="all" depends="init,replace-tokens,build,buildWar,buildEar"/>


<!-- Compile Java Files and store in /build/src directory -->
<target name="build" >
<javac srcdir="${src}" destdir="${classdir}" debug="true" includes="**/*.java" />
</target>

<!-- Create the War File -->
<target name="buildWar" depends="init">

<copy todir="${warDir}/WEB-INF/classes">
<fileset dir="${classdir}" includes="**/*.class" />
</copy>

<copy todir="${warDir}/WEB-INF">
<fileset dir="${deploymentdescription}" includes="web.xml" />
</copy>

<copy todir="${warDir}">
<fileset dir="${web}" includes="**/*.*" />
</copy>

<!-- Create war file and place in ear directory -->
<jar jarfile="${earDir}/${warFile}" basedir="${warDir}" />

</target>


<!-- Create the War File -->
<target name="buildEar" depends="init">
<copy todir="${earDir}/META-INF">
<fileset dir="${deploymentdescription}" includes="application.xml" />
</copy>

<!-- Create ear file and place in ear directory -->
<jar jarfile="${dirs.base}/${earFile}" basedir="${earDir}" />
</target>
</project>

**************************************************************
19 years ago
Hi
Am new to ANT and it is my first time writing a build file.
My folder structure:

xyztransmission
-- buildscripts(ant.properties,build.xml)
-- lib(jdom.jar)
-- src
-----java
-------servlets(*.java)
-------utils(*constants.java)
-----web(welcome.html)
-------WEB-INF(web.xml)

I want to create a war file and deploy it into tomcat
(i.e.create a folder named hubtransmission under webapps)


Can anyone help me with the build.xml

Thanks
Kawa
19 years ago
Hi I have some questions which are still not very clear to me !

1. What is the manifest file ?
2. Why do we need the manifest file?
3. Is it mandatory to have it ?
4. When does it get created ( i mean we certainly don't write it in a text editor, it must be getting generated automatically)
5. What is the use of META-INF folder ?
6. Do we have to create explicitly for a web application and is it mandatory?

Thanks
Kawa
What does the following ** mean ?

<include name="apps/**/classes"/>

Thanks
kawa
19 years ago
Hi
I have to create a folder (named XYZ) in a servlet but i need to pass on the name when I build the web app . I want to give the folder-name in a properties file, and replace the folder-name in the servlet when am building the app through build.xml

Question:
What to do in build.xml ?
What to do in the servlet ?
How to access the properties file from the build.xml?

Any help will be deeply appreciated.

Thanks
Kawa
19 years ago
I have the following structure for my web application:

C:\jakarta-tomcat-4.1.30
- webapps
- xyztransmission ( xml_input.html)
- servlets
- WEB-INF (web.xml)
- classes
- servlets (AcceptAndSaveTransmittedFile.class)

*******************************************************************
The xml_input.html file:

<HTML>
<HEAD>
<TITLE>XML Input to Transmission Emulator</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<style type="text/css">
body, td, select, input, textarea {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt;
color: #001E4C;
}
h3 {
background-color : #E5EFF2
}
.normformbutton {
BORDER-RIGHT: #000 thin solid;
BORDER-TOP: thin outset #9999CC;
FONT-SIZE: 8pt;
BORDER-LEFT: thin outset #9999CC;
COLOR: white;
BORDER-BOTTOM: #000 thin solid;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
HEIGHT: 22px;
width: 82px;
BACKGROUND-COLOR: #001E4C;
}
</style>
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<form action="/processrequest" method="POST">
<table width="100%" cellspacing="0" cellpadding="3">
<tr>
<td> </td>
<td>Please paste your XML in the box below and press submit</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><textarea name="xml" cols="120" rows="20"></textarea></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<table>
<tr>
<td>Send XML To HUB</td>
<td><input type="submit" value="submit" class="normformbutton"></td>
</tr>
</table>
</td>
<td> </td>
</tr>
</table>

</BODY>
</HTML>
*******************************************************************
My web.xml is as follows:
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>XYZ Emulator Servlet</display-name>
<description>Receives xml files and saves them in file system</description>
<servlet>
<servlet-name>AcceptAndSaveTransmittedFile</servlet-name>
<servlet-class>servlets.AcceptAndSaveTransmittedFile</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AcceptAndSaveTransmittedFile</servlet-name>
<url-pattern>/processrequest</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>xml_input.html</welcome-file>
</welcome-file-list>
</web-app>
****************************************************************

After starting up tomcat and putting the URL
http://localhost:8080/hubtransmission/xml_input.html
I get to see my html file correctly
But when I press the submit button, expecting the servlet 'AcceptAndSaveTransmittedFile 'to be called I get HTTP 404 error saying " The requested resource (/processrequest) is not available."


Can anyone tell me where I am going wrong ?


Thanks
19 years ago