Wendy McAvoy

Greenhorn
+ Follow
since Aug 11, 2007
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 Wendy McAvoy

I am pleased to report that yesterday I took and passed the exam. Thanks everyone for all the messages and information posted on this site. Here is how I prepared.

1. Read and took notes on HFSJ. Did all the problems and examples.

2. First I got Whizlabs exam simulator. When I first started I was struggling with the exams. I got a 74% on the final Whizlabs exam.

3. About 2 weeks before I took the exam I saw a posting indicating that Enthuware was closer to the exam, so I bought that as well. I did find Enthuware to be very helpful in preparing for the exam. Although enthuware final exam was easier than Whizlabs due to many of the questions being repeats from the earlier exams, there were a few questions that were very similar to those on the exam, so it is definitely worth doing. I scored a 95% on Enthuware final exam.

Wendy
First problem is due to the variables defined in the scriptlet are local. Move map outside of scriptlet and use declaration <%! %> to define the variable.

Second problem is due to the fact that once you use scripting inside a standard action then you lose the automatic type conversion

Hope this helps.

Wendy
First problem is due to the variables defined in the scriptlet are local. Move map outside of scriptlet and use declaration <%! %> to define the variable.

Second problem is due to the fact that once you use scripting inside a standard action then you lose the automatic type conversion

Hope this helps.

Wendy
The book seem to have a space in the servlet-name in the DD. I tried removing the space and everything worked.

Thanks for your help.

Wendy
16 years ago
I start by putting in
http://localhost:8080/Beer-v1/form.html

I select a color and hit submit and the browser now has

http://localhost:8080/Beer-v1/SelectBeer.do for the url

The error on the screen reads:

message /Beer-v1/SelectBeer.do

description The requested resource (/Beer-v1/SelectBeer.do) is not available.
16 years ago
This is not strictly just a compile question. I can get it to compile with
>javac -classpath c:/Tomcat5.5/common/lib/servlet-api.jar -d classes src/com/example/web/BeerSelect.java

It doesn't compile with what you suggested. The problem is when I compile it with removing the :classes:. then when I run it, it can't find the page. What are the authors of the book trying to accomplish with this syntax and is the fact that I am changing the syntax to get it to compile causing the problem with not being able to find the servlet.
16 years ago
Here is the web.xml. It is just a simple example from the book so no I am not using struts.

Thanks

Wendy

<Web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocaton="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<servlet>
<servlet-name>Ch3 Beer</servlet-name>
<servlet-class>com.example.web.BeerSelect</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Ch3 Beer</servlet-name>
<url-pattern>/SelectBeer.do</url-pattern>
</servlet-mapping>
</Web-app>
16 years ago
I know it is probably something simple but I am trying to go through the tutorial in chapter 3. The book says to use the following to compile the servlet

javac -classpath C:\JavaCode\MyProjects\beerV1>javac -classpath c:/Tomcat5.5/common/lib/servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java

when I use the :classes:. it won't compile the errors I get are that it can't find the servlet classes.

If I remove it the code compiles but when I run it, I get errors saying it "description The requested resource (/Beer-v1/SelectBeer.do) is not available."

Are these two issues connected? Any idea what I am doing wrong? Any suggestions on what to look at?

Thanks

Wendy
16 years ago