jay denzel

Ranch Hand
+ Follow
since Sep 18, 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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by jay denzel

Hi,
I am redeploying a web application using the application manager.
I invoke the manager using ant. Everytime I redeploy an application which
has resources in JNDI I get the following exception thrown.

During the startup of the application I set references I get from JNDI on several beans this causes the exception.
I have the necessary entries in server.xml and web.xml
Everything is fine when I install the application and start the server then.
As soon as I redeploy the application while the server is running the above exception is thrown.
This happens both with Tomcat 4.x and 5.x.
Until now I did not come up with a solution.
Any ideas, or has anyone experienced the same problem?
Any help greatly appreciated.
Thanx,
jay
13 years ago
Hi,
I am currently involved in a project were we implement a propiatory cgi c++ based web framework in java.
I have a page object which represents a html page containing special tags (not jsp tags).
The page object contains a tree structure of the actual html page.
I have a repository class in the framework where all page objects are held. Each time
a user makes a request for a page the framework picks the page object from the repository and
runs the runtime engine over it.
The problem I am facing is that I have to make a copy of the original page object in the repository
for the user to work with but could not find an easy or working way to do this.
Has anybody an idea how to solve this problem elegantly and most of all in a fast ( runtime that is ) manner.
Thanks for your helpful comments.
Best regards,
jay
----------
SCJP, SCJD
14 years ago
Problem solved! I checked the log file and found that the ValidatorPlugin was not loaded correct, some classes where missing.
Thanks for your help.
jay
15 years ago
Hi,
I am trying to integrate the validator framework into an existing application, but unfortunatly it does not work and I have no clue why.
I did the following things:
1. Added this to my struts-config file:
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathname" value="/WEB-INF/validator-rules.xml"/>
<set-property property="pathname" value="/WEB-INF/validator.xml"/>
</plug-in>
2. Modified an example form bean to extends ValidatorForm.

3. Added this to my web.xml
<servlet>
<servlet-name>validator</servlet-name>
<servlet-class>org.apache.struts.validator.action.ValidatorServlet</servlet-class>
<init-param>
<param-name>config-rules</param-name>
<param-value>/WEB-INF/validator-rules.xml</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/validator.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
4. Added a validation rule to validator.xml
<form-validation>
<formset>
<form name="bookForm">
<field property="title" depends="required"/>
<field property="pages" depends="required"/>
</form>
</formset>
</form-validation>
Validation is enabled and my reference in struts-config.xml is called "bookForm".
Did I miss anything?
When I submit my form nothing without the required data nothing happens. If I insert a validate method it works great, but without ... ?
Does anyone have an idea what might be the problem?
Thanks in advance.
Greets.
jay
-------
SCJP, SCJD
15 years ago
Hi guys,
thanks for your answers.
I just solved the problem myself.
Greets,
jay
-------
SCJP, SCJD
15 years ago
Hi,
I have a problem accessing beans in struts.
My bean looks something like this.
class Category {
private int catId;
private List products;
..
.
}
The list is used to store Product objects.
How can access the products in a jsp page by only
using struts tags?
Using iterate and bean:write will not do the trick because I need to access the objects in the list.
Any ideas?
Thanks.
jay
------
SCJP, SCJD
15 years ago
Hi,
I had 26 java files in my assignment. The number of files is not important, the design choices you make and how you justify them is important.
Elegant design is not reflected in the number of java files.
Stick to a clean OOD and do not worry about the number of source files. With my 26 classes I made 149.
Greets,
jay
------
SCJP
SCJD
I listed each and every file which was included in my submission jar file.
I got full points on documentation.
jay
-------
SCJP
SCJD
Returning a new client connection object which can also be used as the client ID can be achieved by using a factory pattern.
This is the way I did it.
I had a RMI Connection factory object which is registered as a service. Each client trying to access the database uses a local connection factory which contacts the RMI connection factory to return a remote connection object. Every connection object (local or remote) implements a DataClient interface which holds all public methods of Data.
The returned object is the client ID, because each object is unique. The LockManager can use it for locking/unlocking. I used the client ID as the key in the LockManagers HashMap.
Hope this helps.
jay
------
SCJP
SCJD
Hi,
I did both, modified the Data class adding the searching functionality and extended it like you did for Remote connections and added my locking here. In my opinion this is a logical approach, because you have to distinguish local and remote connections. Local clients do not need any locking implementation, remote clients do. In my extended class I modified the lock/unlock signatures to support client identification. I guess Sun had no problem with this solution, I passed with 149.
Hope this helps...
jay
------
SCJP
SCJD
Hi,
I think the most widely used approach is to use the connection object itself as the client ID. This is the way I did it and I guess many others also. The idea is to issue a unique client connection object in remote mode using a RMI connection factory. This object reference is handed over until you access the database using the LockManager, the LockManager puts the object reference along with the record number in a Map.
Hope this helps.
jay
-----
SCJP
SCJD
Hi everybody,
just got my result for SCJD. I am so glad. 6 weeks of hard work really paid off.
This is what my report said:
This report shows the total points that could have been awarded in each section and the actual number of points you were awarded. This is provided to give you per-section feedback on your strengths. The maximum possible # of points is 155; the minimum to pass is 124. General Considerations(maximum = 58): 57 Documentation(maximum = 20): 20 GUI(maximum = 24): 21 Server(maximum = 53): 51
I am really surprised that I got full score on documentation, after submitting I thought I blew the whole thing because of my not so well structured format. Well, I guess I underestimated myself.
If someone has questions about my assignment please feel free to ask.
Once again thanks to all the members at JavaRanch for contributing to this world class forum.
JAVA RULES!
Take case...
jay
------
SCJP
SCJD
P.S.: Now let's go for for SCWCD...
15 years ago
Hi everyone,
I took the essay exam today. This is definitely nothing to fear about. 5 simple questions, I think 120 min time is really overkill. You do not need more than one hour if you know your application
Now desperately waiting for my result, hopefully within the next 3 weeks.
Greets,
jay
Hi,
your approach looks fine to me. I did exactly the same thing.
Greets,
jay