my dog learned polymorphism*
The moose likes JSP and the fly likes Need a few JSP tips Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Need a few JSP tips " Watch "Need a few JSP tips " New topic
Author

Need a few JSP tips

Pavan SridharaMurthy
Greenhorn

Joined: Oct 17, 2008
Posts: 5
Hi.. [This is my first post.. Kindly excuse me if my post does not conform to the T&C of this forum!;)]

Im a newbie.. [not just to this forum but to java as well..!]

I started learning java from HeadFirst from last week and have managed to pick up a handful of concepts. I could only do four chapters from that book because.. I have to currently design a project i.e. create a webpage that accesses a database and allows user to add/modify/delete data from it..So i've conveniently started referring HeadFirst JSP simultaneously..

I'd appreciate it if somebody could give me a few tips on how i should get along with the project...

This is what i've accomplished as of now:

Created the database [im working with Oracle 10G]
Created the login page[using HTML]
For the next steps on linking the page to the db i started reading HF JSP and i've read up till MVC concepts and the beerselect page program..

I think i might be losing it a lil bit here...
[ October 20, 2008: Message edited by: Pavan SridharaMurthy ]
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by Pavan SridharaMurthy:
Kindly excuse me if my post does not conform to the T&C of this forum!;)]

Im a newbie.. [not just to this forum but to java as well..!]


well, welcome to javaranch.. and please give meaningfull subject line...

HeadFirst is a good book... i suggest you that please work out some of the example from HeadFirst.

mainly.. you should know the basic concept about java and how to work with IDE and without IDE .

you are working? if not please try to catch your friends and ask them about basic flow from jsp to Database and viceversa.

Hope This Helps
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Im a newbie.. [not just to this forum but to java as well..!]


If you are new to Java, why do you want to start with JSP's. Not a good start point at all.
My suggestion is try your hands at the basics first before gulping the bigger ones.
And please take some time to read the Ask good questions link below.


Hope this helps
[ October 17, 2008: Message edited by: Amit Ghorpade ]

SCJP, SCWCD.
|Asking Good Questions|
Pavan SridharaMurthy
Greenhorn

Joined: Oct 17, 2008
Posts: 5
Thanks a lot for replying...
Right.. I'll watch that subject line next time..

yes im workhing.. I just started my training 3 months back.. we were asked to learn java in a fortnight.. and now we've been given the project that i've mentioned earlier..

by IDE you mean somkething like eclipse??
and without it is like working from command prompt..right???
Pavan SridharaMurthy
Greenhorn

Joined: Oct 17, 2008
Posts: 5
Thanks a bunch for replying Amit...
I'll keep that in mind.. And that is a real nice link..
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by Pavan SridharaMurthy:
by IDE you mean somkething like eclipse??


correct
Pavan SridharaMurthy
Greenhorn

Joined: Oct 17, 2008
Posts: 5
I am currently using eclipse for the project but im doing all the examples from the book at command prompt and this is where im having trouble... the BeerSelect and BeerExpert programs don't compile at all...

i have 2 programs[as given in the book] one BeerExpert.java which is in the folder
c:\java\xyz\beerv1\src\com\example\model\BeerExpert.java
In the BeerExpert.java I have included it into a package as

package com.example.model;

the other BeerSelect.java which is at
c:\java\xyz\beerv1\src\com\example\web\BeerSelect.java

and in the file BeerSelect.java Im importing it as

import com.example.model.*;

And im compiling at my cmd prompt as

c:\java\xyz\beerv1> javac -classpath programfiles/apachesoftwarefoundation/tomcat5.5/common/lib/servlet-api.jar:classes: -d classes src/com/example/model/BeerExpert.java


And the warning im getting is

Note: src/com/example/model/BeerExpert.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

This is the code from the book.[for BeerExpert.java]

package com.example.model;
import java.util.*;

public class BeerExpert {

public List getbrands(String color) {

List brands = new ArrayList();

if (color.equals("amber")) {

brands.add("Jack Amber");
brands.add("Red Moose");
}

else {

brands.add("Jail Pale Ale");
brands.add("Gout Stout");
}

return(brands);

}
}


Could you please tell where Im going wrong here..?
Pavan SridharaMurthy
Greenhorn

Joined: Oct 17, 2008
Posts: 5
Sorry.. I forgot to mention this...
Im on Windows XP platform..
Using JDK1.6.0 and JRE1.6.0
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Originally posted by Pavan SridharaMurthy:
Thanks a bunch for replying Amit...
I'll keep that in mind.. And that is a real nice link..


You are welcome
And you can edit the subject of this post by clicking the
More descriptive the subject, more quicker and useful responses for your post.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Originally posted by Pavan SridharaMurthy:
Right.. I'll watch that subject line next time..
Why wait until next time?

Please go back and change your post to add a more meaningful subject by clicking the .

Here a few more tips for making the most of JavaRanch as a resource:

Please use real words when posting to the forums. Abbreviations such as "coz" in place of "because" only serve to make your posts more difficult to read and less likely to generate useful responses. Please read this for more information.

Also, please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
[ October 17, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need a few JSP tips