peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

psathish2 here are quotation of all rules you carelessly breaking. If you continue with same attitude you will soon find your self banned from this forum by your own ignorance!

For easy readability, always wrap programming code within posts in (code) (code blocks) and (icode) (inline code) tags.

Do not flood the forum by posting the same question more than once (ie in multiple forums).

Use (bbcode) only when it is necessary to the comprehension of your post. Avoid using an excessive amount of (bbcode) to alter font styles or to draw more attention to your post.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

It will never work as you directly inserted Java element into pure HTML without telling HTML you about to use something related to Java. You better start learning for example here, The Java EE 5 Tutorial

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Thank you man . . . . there is no way i can set it on the
web page its self nhe
I really aprecialte it

Sorry your respond doesn't make any sense...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Are you running this on Tomcat server?
What are you trying to achieve?
Are there any errors?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Rules of html

<a href="../index.jsp">index.jsp</a>
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Nice tutorial on Horizontal CSS Dropdown Menus. As for the menu item selected you need to pass this info from page to page based on button click with use of HttpServletRequest request

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Sorry, but with the code above you have very little chances of success as you ignored basics

HeaderSet connect(HeaderSet headers) throws java.io.IOException

Where is yours try-catch cause?
Also here is HeaderSet method as we know from API

void setHeader(int headerID, java.lang.Object headerValue)

this is your attempt

hsOperation.setHeader(HeaderSet.NAME, "Hello.txt");

Hello.txt hardly fit in any of the categories for headerValue COUNT, NAME, TYPE, LENGTH, TIME_ISO_8601, TIME_4_BYTE, DESCRIPTION, TARGET , HTTP, WHO, OBJECT_CLASS or APPLICATION_PARAMETER

If I may I will recommend you to read Kicking Butt with MIDP and MSA (website holds also examples from the book 19 - Text and Multimedia Messaging and 20- Bluetooth and OBEX. However even they are holding great examples of code, without rest of the book to explain you will not learn too much)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you want to learn JSP you better to get book like this one Beginning JSP, JSF and Tomcat Web Development, From Novice to Professional

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That code just look awful ! ! !
So much nicer if data would be retrieved from DB in servlet, stored in the bean and with session passed to JSP where everything would be displayed with few lines of necessary scriplet

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Also, you definately should not be doing this stuff as scriptlets in a JSP. This is a maintenance nightmare.

No point to repeat that, this guy completely ignore that for last two weeks from me. Another hopeless case to bang on...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Just compare it wit javaio API

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I did suggest JavaScript as way to validate form in the case if Ems do not want to go into other options.
ASP is not my speciality but you should be able to work out your requirements on these tutorials

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Change "Save as type" from "Text Documents (*.txt)" to "All Files" and in "File Name" type name with css file extention like styles.css. Always work for me...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You may want to work with Java Advanced Imaging API or Java - ImageIO. Both have very useful forums on java.net (JAI, ImageIO)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you work on web based technical documentation like Java APIs, Microsoft MSDN etc people do not really care about the "flashy" things. They need to quickly and efficiently find what they need. In other case people do expect from you to be "innovative" and give them certain stuff or something new to amaze them

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Ehmm, what exactly did you downloaded?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Download

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

restrict your user to download only after providing his/her information...
this is done by sessions concept in php or provide login form....

PHP is not only technology with sessions :D I can do it nicely in JSP ;)

I think our server supports ASP or could go for HTML and JavaScript - I'll go with whatever you suggest!!

Find out what your server supports, so you can take advantage of technology

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You need to upload your CV on some website if is stored on your pc nobody else can access it. Do google search for free hosting and set up your website

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Depends what you want to do:

  • simple form with html
  • html with JavaScript validation
  • use PHP/ASP/JSP/AJAX
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

What version of Tomcat server you have?
Why don't you use MySQL database which is free to use, better then MS Access in my opinion?
Why do you use j2sdkee1.2.1 when there are newer version of Java?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you please let me know what you using (PHP/ASP/ASP.NET)? Also if want you can PM address to your website and I will have look around how possibly they get on your DB.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes if you know AJAX, else you need to re-do your website to some technology like PHP, ASP, JSP

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You can do simple html form, however that can be cheated. So you need to look in some server side technology with ability to talk to database like PHP, ASP, JSP or AJAX (not exactly server side but can chat with database)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

LOL, Christmas came early this year...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Would you mind to share your solution?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

w3schools is always place to start and same goes forw3.org with full references and tutorials (however that will not teach you all the fancy things, remember that please)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

In IE6 is on the right hand side and same goes for FF3. Was issue solved or this error is on IE7?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Try this one, Horizontal CSS Dropdown Menus .
What do you think of it?

Grantmitch1 commented: :) +1
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

you just copy and paste the examples from w3schools

Copy & paste is not a way to learn for begginer. Always, always re-type the code. It doesn't matter if it is html, css, Java, C++ or any other. By typing it, you pay more attention what is happening inside the code, you built up on already existing knowledge by adding new blocks...

HI2Japan commented: Completely agree with you. Very good advice. +3
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That is difficult question. It does really depends on the business location. You will definitely not charge same money on this UK, USA or India based company

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

JavaBeans components, or beans, are reusable software components that follow simple naming and design conventions so they present a standard interface to other beans, programs, and tools.

Simply put bean is just storage class something like this one, which does use setter and getter methods for attributes to be stored or retrieved

package bean;

public class MyBean
{
	private String username;
	private String password;
	
	public MyBean() {}
	
	public void setUsername(String str)
	{
		username = str;
	}
	
	public String getUsername() { return username;}
	
	public void setPassword(String str)
	{
		password = str;
	}
	
	public String getPassword() { return password;}
}

and the above approaches will help you retrieve or set data for your bean

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Question: What is purpose of this forum?
A) People asking questions, expecting quick answers and just flooding it with post .
B) People asking questions and expecting quick answers.
C) People asking questions and actively searching answers.

Similar question been already answer already here just few hours back http://www.daniweb.com/forums/post653222-2.html

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If servlets are not mapped with use of web.xml you call it like this from the form for example

<form action="http://localhost:8080/PROJECT_NAME/servlet/SERVLET_NAME_NO_FILE_EXTENSION" method="POST">
YOUR FORM HERE
</form>

The web.xml mapping will look like this

<servlet>
       <servlet-name>SERVLET_NAME_YOU_WANT_TO_CALL_IT</servlet-name>
       <servlet-class>REAL_SERVLET_NAME_NO_FILE_EXTENSRION</servlet-class>
    </servlet>

    <servlet-mapping>
       <servlet-name>SERVLET_NAME_YOU_WANT_TO_CALL_IT</servlet-name>
       <url-pattern>/A_NAME.jsp</url-pattern>
    </servlet-mapping>

Example:
REAL_SERVLET_NAME_NO_FILE_EXTENSRION is FrontController
SERVLET_NAME_YOU_WANT_TO_CALL_IT I want to be Front
A_NAME.jsp I want to be front.jsp
to call my FrontController I will do following

<form action="front.jsp" method="POST">
FORM CODE HERE
</form>
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes to get properties in JSP as follows

<%@ page language="java"%>

<jsp:useBean id="mybean" scope="application" class="Helloserv"/>
<jsp:getProperty name="mybean" property="username"/>
<jsp:getProperty name="mybean" property="password"/>

In my other post I marked place where you create session, that is basically where you store data in the bean and past it on the JSPs following after that

session.setAttribute( "mybean", mybean );
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Well you just round it up all nicely as I asked...
You do not feel boring, but bored. However in my opinion you are lazy expecting us to do your home works so you can pass module. Too bad

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

My bad, I forgot this possibility. It will be because I attempted only once, but on the end I did just quick Java code to sort it out... ;)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes, if the results from database confirm is is registered user and he/she is authorized then you should create bean. You can store username and password there, however storing unique user ID in bean would be better solution

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

search engine is the best.... go through it...and add more features like user login,posting blogs,forums like that....

Search engine will be difficult to accomplish as first they have to learn "tools of trade".
As for wikipedia type of project it can be reasonable project to do, specially as you have to learn the language first and that have to be done fast to quote extend.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

He can only take away 17, when you give neg rep it takes away half of what you have for rep power. He can, however, give all 34.

Last time when I checked you gave and took same amount, maybe the change been implement while I was away last month

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
  1. Start using proper English, if English is your second language
    • Use dictionary
    • Use in build spell checker of Firefox
  2. @what happen >>> there is no answer ... , so where is your problem and how did you try to solve it?

PS: Would be nice if in every post you summarize what still needs to be done. It is unlike situation that people will go through all you posts...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You misunderstand the idea of JSP-servlet relation. Bellow is something you should do (I did not compile it so it may not be 100% correct)

Simple html login screen

<html>
<head>
<title>Ask for Names Example</titls>
</head>
<body bgcolor="LightSkyBlue">
<h3 align="center">Login event with use of the POST method</h3>
<form action="LoginEvent" method="post">
<p align="center">Username: <input type="text" site="20" name="username">
&nbsp;&nbsp;&nbsp;
Password: <input type="text" size="20" name="password"></p>
<p align="center"><input type="submit" value="Submit"></p>
</form>
</body>
</html>

Note: The form parameter action uses LoginEvent servlet that has been mapped through web.xml.

servlet to get data and connect to db

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class FrontController extends HttpServlet
{
	Connection conn;
	Statement stmt;
	
	public void init() throws ServletException
	{
		try
		{
			Class.forName("com.mysql.jdbc.Driver").newInstance();
		}
		catch (Exception ex)
		{
			System.out.println("Exception is : " + ex.toString() );
		}
	
	public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
	{
		String username = request.getParameter("username");
		String password = request.getParameter("password");
		boolean bValid = true;
		HttpSession session = request.getSession();
		
		if( (name.lenght() == 0) || (password.length() == ))
		{
			bValid = false;
		}
		
		if(bValid) // submited data are OK
		{
			try
			{
				conn = DriverManager.getConnection("jdbc:mysql://localhost/" 
														+ "database_name?user=your_username&password=your_password");
				stmt = conn.createStatement();
			}
			catch(SQLException ex)
			{
				System.out.println("SQLException : " + ex.getMessage() );
			}
			
			/**
			 * DO THE REST OF DATABASE REQUESTS
			 *
			 * DO NOT FORGET TO CLOSE CONNECTION
			 *
			 **/			
		}
		
		if(bValid)
		{
			// YOU MAY WANT TO CREATE SOME SESSIONS HERE
			RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/accept.jsp");
			dispatcher.forward(request, response);
		}
		else
		{
			RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/reject.jsp");
			dispatcher.forward(request, response);
		}
	}
}
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

hey all,
I was also thinking about a chatting application. However I am kinda new to programming. Would someone pliz guide me on how to go about it using C++ or C#(i've gone through the basics of C++). Can the chatting "operation" be achieved by scripting also?

If you want to do chat application in C++ or C# you should ask this question in appropriate section of our forum
C++ here
C# here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes, there are very simple solutions to this problem, but it would be very nice if bajanstar can clarify his intentions. Otherwise we wasting our time to provide numerous solutions to lousy specified requirements...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Also first link to java2s.com is loose-win situation.
I would not recommend that site to beginner because either they will learn nothing from it as it does not contain any explanation to the code (code there is simple free copy to code from numerous books, some already out of date) or they will just copy&paste without understanding what that thing does.
However I use that site time-to-time, but I think I'm past the learning of for or while loops...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Does it compile?
Are there any errors?
Is it doing what you expect to do?

And please start using code tags (without spaces inside square brackets)

private final String = "For easy readability, always wrap programming code within posts in (code) (code blocks) and (icode) (inline code) tags.";
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Also, do not send PMs to plead for project topics.

Did the person sent some PMs?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Reputation is "a way" everybody can see what members think of you and the answers you provide.

Gray rep - (not black) is from new members, if I'm correct below post count of 10 (correct me if I'm wrong)
Green rep - from these above 10 posts that agree/are happy with your respond. Their reputation power is different (according to member list top score goes to ancient dragon :) with currently 34 reputation point to give/take from any of us )
Orange rep - from these above 10 post that did not like your respond

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

This forum is full of similar questions so why don't you use the search option?

Laziness is the worst illness student can caught...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@Boss, I am newbie here working independently on this project.
I'm not boss, I'm student

@Frankly speaking I have no source of guidelines other than your forum.
So people from Sun Microsystem just waste their time creating their website with documentation and tutorials you been suggested to have look at? Plus many others that run other similar related sites?

@And can you suggest me some idea about how to restrict student against answering/polling same module twice.
There is more then one solution, but I would do it like this
Have module table that consist of

  • student_id (string)
  • test_table_name (string)
  • test_name (string)
  • taken (boolean) {default false}
  • score_or_mark (int or character depending on the marking system)
    1. A, B, C, D, E
    2. 1, 2, 3, 4, 5
    3. 10%, 20%, 30% (the sign of percentage doesn't have to be store, you should know what is stored)

Note: I would use test_table_name as this would enable me to have each test questions with possible answers, plus correct answer stored in different table (easier to maintain)

Lets say module has 3 marking assignments. Therefore student name will appear in the table 3x, each time with different name of the test. By default taken column will be false and will change to true as soon student submit the assignment. Will help of this column you will be able to display only test/assignments that have to be done.