Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Rob Symth

Ranch Hand
+ Follow
since Apr 29, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rob Symth

I think I got mixed up, what I had before was the web.xml for Tomcat itself
The web.xml for the app is below


<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns="http://java.sun.com/xml/ns/javaee";
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
id="WebApp_ID" version="2.5">

8 years ago
JSP
I think I found the issue, I am using Tomcat 5.5 which only support servlet 2.4, the app itself is defined as 2.5, see below

Tomcat 5.5 is Servlet 2.4/JSP 2.0, so #1 can be scratched. You didn't change anything in webapp before deploying I assume, so #3 and #4 can likely be scratched. Now left #2. Maybe you declared it as Servlet 2.5 for Tomcat 6.0 while the Tomcat 5.5 only understands up to with Servlet 2.4. This way everything will become a mess as Tomcat would then fallback to least compatibility modus. You need to redeclare web.xml as Servlet 2.4 so that it will work in both Tomcat 5.5 and 6.0. The declaration should look like:
8 years ago
JSP
web.xml snippet below


<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">;
8 years ago
JSP
Hello Folks,
I have a bean which is loaded into a servlet as below

<jsp:useBean id="sanityBean" class="com.ibm.lotus.apollo.sanity.SanityBean" scope="application"/>
<jsp:setProperty name="sanityBean" property="*"/>


The bean is then referenced further down the jsp as below

<input type="text" name="emails" size="20" value="${sanityBean.emails}"/>

However what gets displayed on the input box is exactly ${sanityBean.emails} i.e it does not get resolved, as this is a legacy application I cannot change the code, on Webspahere 7.1 this works as expected just when deployed onto Tomcat this issue occurs, any ideas out there?

Thanks for your help
Rob
8 years ago
JSP
Hey Folks,
I resolved the issue, the issue was an incorrect Servlet version specified in the XML, I changed it to below for version 3.0 & everything worked fine



Regards
/Rob
9 years ago
Anybody got any ideas or suggestions to try out?
9 years ago
Hey Folks,
I am at my wits end here trying to deploy a servlet with annotations.
I have managed to successfully deploy it without annotations i.e via the web.xml & everything is fine but I get a status 404 when trying to deploy with annotations.
I am running tomcat

Server version: Apache Tomcat/7.0.12
Server built: Apr 1 2011 06:13:02
Server number: 7.0.12.0
OS Name: Linux
OS Version: 2.6.35-28-generic
Architecture: i386
JVM Version: 1.6.0_20-b02
JVM Vendor: Sun Microsystems Inc.


I followed the spec so I am sure I am doing everything right from a coding point of view, there is no mention of this servlet what so ever in the apps web.xml



This file is located in the following directory

~/tomcat/apache-tomcat-7.0.12/webapps/onjava/WEB-INF/classes/moreservlets



The application onjava is mapped in the server.xml


This application has both annotated servlets which don't work & regular servlets with web.xml which do work, can I mix both for onjava above?


Any help greatly appreciated
Thanks
Rob


9 years ago
Yeah its looking like I will have to pay again
Do you know anything about getting a discount for being a partner of Oracle, as I work for IBM?
Also I see now they give you a 6 month deadline to complete both part 1 & part 2 of the assignment which is fair enough, but do you know if I book it before Aug 1st I will avoid the need to do the mandatory education course even if I submit the project after Aug 1st?

Thanks
Rob
Hey Folks,
As you may or may not know, Oracle has switched from Prometric to Pearson Vue to handle their certifications.
According to the their website if you received your SCJD project before Jan 2008 then it is in fact out of date & they will not correct my submission, unfortunately I received from SCJD exam before 2008 from Prometric.
I understood that the SCJD certificate did not have a time limit on when I could submit my project but it looks like now I will have to resubmit to Oracle & Pearson Vue for a new certification & pay again.

Is there anything that can be done in this situation?

Thanks
Rob
Thanks Jonathan that cleared it up a bit
Yeah for mine I only search on Name & Location
Hey Folks,
I would like to run some amibguity well to me anyways in the SCJD exam I have here, I have 3 issues to mention

1.
below is an extract of my spec related to alone mode

Non-Networked Mode
The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
The operating mode is selected using the single command line argument that is permitted. Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.



with what I have undelined saying the db & GUI must run in the same VM, does this to you imply I do not need to care about anyone else accessing the DB when running in Non-Networked mode?

2.
below is another extract of my spec & related to the modes for my project

In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely. No authentication is required for database access.



Do the above imply to you also aside from specifying the mode on the command line that even if we invoke the client GUI but specify the DB locally then this will override the command line argument & standalone mode will be used??

3.
and the final extract of my spec with regards to the GUI

It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user



This to me implies that if we have a record called Freddy as the name & the user enters Fred through the GUI, that it should not return the Freddy record, is my logic correct on this one? i.e the user will have to search for Freddy in to see the record, reason I am asking this is because according to the spec the find function will return Freddy on a Fred search

Thanks in advance for your help
/Rob

Hey FOlks,
Whilst trawling the forums for a relevant post I came across this one

https://coderanch.com/t/184187/java-developer-SCJD/certification/price

My previous employer paid for my SCJD (I am not sure if they paid for both vouchers), I know the SCJD is purchased in two parts, one for the assignment & the second for the written, but according to the above both the vouchers needs to be purchased initially so in effect does that mean once I submit my assignment I won't have to pay for the voucher to do the written exam? Or is the above url wrong & the two vouchers for SCJD can in fact be bought separately?

Thanks
Rob
yeah originally I had the lock handover situation as described in the SCJD by Monkhouse but it was a bit more complicated than having 1 lock that rules them all, so for sacrificing more CPU cycles for simplicity I went with the latter implementation, note it does state in the assignment that the software should be understandable by a junior programmer which in essence is true to the fact in a real world scenario, every heard of the KISS principle? plus I think with commodity hardware getting faster all the time simplicity can rule in the majority of cases
I am currently doing the SCJD myself just wanted to do an 'unselfish' post for a change & as you see Roel who replied to your post has indeed been quite insightful with posts related to questions i had cheers Roel, ok digression over :P
would you not consider this a race condition?
i.e two different scenarios based on who gets the cpu?
scenario 1 : t2 & t3 manage to get the lock & throw RCNF exception, t4 creates & locks record
scenario 2: t2 gets lock throws RCNF exception, t4 creates & locks record, t4 unlocks record & t3 gets lock on same recNo but different record?

haha just got a warning on my english had to change 'u' to you I guess I am a bit narrow minded that way
yup it could be potentially that t2 gets a lock on a different record with the same recNo that it originally attempted to lock, do we leave this up to the end user to resolve? might be a note in the usage instructions?