473,830 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JSP Getting Started

539 Contributor
I have a subject that covers JSP(new to me), accessing database through JSP(new to me), applets, UML(also new to me)

So, as im learning java, all i did to learn faster is i've created some applications(wi th sense). With my style of self learning, i hope it could be effective in JSP too....

I like to be advanced on the planned topic to be discussed by our instructor(He is not a certified Java Programmer though)

So now, all i know about JSP is the following:
-basic tags
expression <%= something%>
declaration <%! something%>
i dont know the term <% something %> I think it is an invocation
equivalent to java (Please correct me on that part)

-Setting up tomcat.
-The ROOT folder
-WEB-INF theoritically knew where to put classes/jars etc....
(though im not tested them yet)
-getting the value of a html form through request.getPara meter("form input-type name)

Those are basics obviously...( I learned them through surfing)

And im planning to create a simple application.
What comes on my mind is to reimplement my previous project (Simple Hotel FrontDesk System) into Online Hotel Reservation System
-the registration is obviously done by the hotel frontdesk only....
-Maybe the BlackList feature would be added if i knew the real ( Deep )

Actually, we have proposed a project "Online Entrance Exam" to our instructor and he likes it... so he approved our proposal.....( Not Thesis )

But before we start banging that project, deadline is on October ( Final week in this semester )

I like to grasp the essentials of JSP and also the other techniques, new way, and theory behind that architectural design for web application platform....
(Please correct me on the phrase above)

Actually, the faculty decided to order a J2EE book from Sun( i think the book base is in Singapore) for about 2500php or $56.00

Unfortunately, that book is expected to be arrived on midterms.... unbelievable scenario(but that was true)....

I did attempt to buy a new book instead of waiting that precious book, but i doubt for having such book....(for $40.99)....

So i decided to wait that precious book, yet learning in advance from this forum and the other web resources....

What a long story :)

Well, anyway,

Here is what i suppose to know in JSP as im building my experimental application for the supplement on my final project( Not thesis though )

I like to know about the JSP Beans,

for example, i have a java class that contains setter and getter methods,
i like to jar them, unfortunately, i didn't found the right tutorial for it on the web...

so can you post a helpful url that would teach me how to do that?
and also, about how to access the jar file from the jsp container( doubt of terms )Please correct me....

Or can you show an example?
For example, i have a jar file in WEB-INF/lib/JARZKY.jar
and the content is com\myclass.cla ss(with setSetter() and getGetter() methods)

How can you invoke that class through JSP?


A sincere Java Lover,
sukatoa
Jul 3 '08
35 3666
r035198x
13,262 MVP
I think by validations you mean form validations? I normally do it in the client side as well as in the server side(just to be doubly sure, and thats the way it should be :)). I dont see it as a disadvantage because those are the things a web developer should do, lets say what happens when a ignorant(or any user) turns the javaScript off in the browser? I as a web developer ensure that the user doesnt skip the mandatory things that he needs to fill. I dont think that it comes down to performance, its a securuty thing for me.

regards,

ajos
Yes, always do validations both client side and server side. It's one of the golden rules of web programming.
Aug 6 '08 #11
JosAH
11,448 Recognized Expert MVP
Yes, always do validations both client side and server side. It's one of the golden rules of web programming.
Just a question: while I do understand that just client side validation would be
silly (no Javascript, request synthesis etc.) but what's wrong with just having
server side validation? (except for the server load).

kind regards,

Jos

ps. sorry for the hijack.
Aug 6 '08 #12
r035198x
13,262 MVP
If there's client side validations as well then the user doesn't have to wait for the page to be posted to the server just to be told that they left a field blank.
Aug 6 '08 #13
JosAH
11,448 Recognized Expert MVP
If there's client side validations as well then the user doesn't have to wait for the page to be posted to the server just to be told that they left a field blank.
Ah, ok; so the reason for double sided validation is just speed. But then you have
to keep both validations in sync with each other. (just wondering)

kind regards,

Jos
Aug 6 '08 #14
r035198x
13,262 MVP
Ah, ok; so the reason for double sided validation is just speed. But then you have
to keep both validations in sync with each other. (just wondering)

kind regards,

Jos
Can become a nightmare right? Generally the server side validator must not assume any client side validators. So his job is easier. He doesn't need to sync with anyone. The client side validator only needs to do the best he can to make sure that the server code is not called unnccessarily.
Aug 6 '08 #15
sukatoa
539 Contributor
Would you experts recommend me an article that discuss about creating effective javabeans or bugs of tomcat 5.5.x,

Im not sure about google's suggested...... .

I've encountered errors on getting the exact value from my bean........
If im gonna restart the tomcat, the errors gone, but when im going to add additional jsp code that filters the input, then the errors came back again.......
Aug 9 '08 #16
sukatoa
539 Contributor
Would you experts recommend me an article that discuss about creating effective javabeans or bugs of tomcat 5.5.x,

Im not sure about google's suggested...... .

I've encountered errors on getting the exact value from my bean........
If im gonna restart the tomcat, the errors gone, but when im going to add additional jsp code that filters the input, then the errors came back again.......
That problem specifically, i've used an arraylist......

Base on my observation, when i used the class arraylist on my bean, a random interval will fail the updated value to be retrieved......

Is this problem already exists?
Aug 9 '08 #17
sukatoa
539 Contributor
That problem specifically, i've used an arraylist......

Base on my observation, when i used the class arraylist on my bean, a random interval will fail the updated value to be retrieved......

Is this problem already exists?
I got it,

For me, there is a conflict when creating a bean that extends/contains an Object type ArrayList that will be used for storing some data that represents a String value.....

I don't know what's the real reason, but when i try to convert an Object type list into String type list

Expand|Select|Wrap|Line Numbers
  1. ArrayList<String> ret = new ArrayList<String>();
  2. for(Object obj: ObjectList){
  3.        ret.add((String)obj);
  4. }
  5. return ret;
The conflict occurs, in any time interval, the conversion fails........
Just for sure, i restarted the tomcat for the class files to be refreshed......

Hence, changing the type of the List into String resolves the issue........
Aug 9 '08 #18
sukatoa
539 Contributor
This is my first time to have IF/ELSE statements more than i've expected on a single file..........

Is it natural to have more if/else statement on just a single JSP file?
or can you recommend to me experts how to reduce such structure? ( URL )

Looking forward on your replies,
sukatoa
Aug 10 '08 #19
r035198x
13,262 MVP
...

The conflict occurs, in any time interval, the conversion fails........
...
What was the exact error message?
Aug 11 '08 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2545
by: Philip Ronan | last post by:
OK, here's my 2p worth: === Q. Why am I getting the error message 'Headers already sent'? A. PHP produces this error message when you try to set a header for a web page after you have already started sending out the content of the page. Web content is always delivered with a few headers at the top, ending with a blank line. For example, a web page might start like this:
1
2357
by: soni29 | last post by:
Hi, I'm going to be starting a project with a friend of mine in C#, we're doing it to learn the language a little better, to get more experience with it. We've already come up with an idea of the application to build, but need advise on how to get started, to share the work? Also if there are free servers available with sourcesafe, so we can use that, and just any basic advise on getting started, how to split work. Thank you.
0
1533
by: cara_little | last post by:
Good Morning, I'm trying to get started with the Enterprise Library to evaluate it and recommend to the rest of the developers in the company. However, I'm having a heck of a time getting started and must be missing something. All of our development is completed in VB. I have installed Enterprise Library on my machine - however I can't compile the project. Is the code only available in C#? which means I have to have C# installed just to...
0
1706
by: tamdino | last post by:
Please accept my apologies if I am posting this in the wrong place. I am trying to get started using MySQL-Front and I am totally lost. Does anyone know where there is a tutorial for getting started with this interface? Thanks, Tammy
84
3954
by: Bibby | last post by:
Hi, I'm interested in getting started in the programming world. I've dabbled in C, C++ and VB6. Which would be the best language to focus my attention to regarding the following considerations: Hireability Portability Flexibility The likely candidates seem to be Java, VB.Net, C, C++, C#.
6
2188
by: Jack Duijf | last post by:
Hello, I am looking for a person in The Netherlands that is willing to help me getting started with Vb.net. Please send a message to jack@aicn.nl if you can help me getting started with the Microsoft Developement Enviroment. Thanks,
1
4747
by: =?Utf-8?B?Q29kZVNsaW5nZXI=?= | last post by:
I plan to build my own 2008 Server/Hyper-V system and will not be using one of the tested Dell or HP systems from the release notes and could use some pointers as to my assumnptions and answers to a few questions. Some getting started with Hyper-V assumptions. Please tell me if I am off base here. 1. Any recent Intel quad core processor has the needed x64 architecture with hardware assisted virtualization and data execution protection...
0
9777
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9635
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10473
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10518
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10196
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5772
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4407
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3954
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3070
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.