Pls help, i m totally new to java
Hi everyone, i m new to java, i have created a page with a textfield and two buttons, can someone tell me how to pass the text that i input in the text field into my database (mysql) when i click the add button (id:addButton) and then how to retrieve a data from a column of my database when i click the show button (id:showButton)?
my table name is todolist3 and the column in my database is item.
Thank you very much!!!
if u are completly new to java, u must at least read some tutorials about java and later, the tutorial of Java Studio Creator, and if u have time, something about jsp.
i dont want to be rude, but listen my advice, if u want to make your "example" to work, u need to copy the mysql conector into core, this is inside of creator, create a data source to bind your project to mysql table, and the best part, send and receive data from your mysql database.
any doubt just post again
Belthazor
Similar Messages
-
Totally New in Java - Please help!!
Hi Dear all,
l am totally new in Java, and l facing one problem,and really hope can get some help from yours,please!
l need to write this program:
The program should do the following:
1. Input two fields: action (action: add / delete), and account number (any
digit or character)
2. if the action is "add" then the program adds one text line to a text
file.
"New account is <account number>"
3. create the text file if it is not already exist (in c:\)
4. When program runs again with new input values, a new line will be
appended to the same file.
5. if the action is "delete" then the program finds the record and removes
the text line from the file.
My problem is :
l just know that l need to create the user interface first,but l don't know how to go on??
Would you please show me some step how to solve these problem?
Many many thanks!!
BaoBaoI don't know about Swing. I never use it.
The stuff to create and manipulate files is in the java.io package.
You'll probably want to use java.io.FileReader and java.io.FileWriter.
Note that FileWriter has a constructor that lets you append and not overwrite.
I'll start you off with a test.
public class AccountListAddTest() {
public static void main(String[] argv) {
AccountList accts = new AccountList();
accts.add("abcdefg12345"); // arg is a hypothetical account number
}Write an AccountList class that'll work if you compile and run this test. After you run this test for the first time, the file should contain the string
New account is abcdefg12345.
This test assumes that the filename is hardcoded into the AccountList class. To keep it simple, make the add method create a new appending FileWriter each time, write, then close the writer. -
I have two applications. One is Client, the other is Platform.
In the Platform, there are source files packaged into a library named ZtConfig.jar used by Client. If run Client and Platform, two applications can execute normally.
But if Client is started by user from platform, there is something wrong.
I noticed the error difficultly with finally catching exception.
I was puzzled. It is so strange. Pls help me. I list some codes here.
In Client where finally exception catched:
import zt.config;
try {
xmlFileUrl = new java.net.URL(
"file:///e:/Client/src/config/nsr1000.xml");
catch (IOException ex1) {
FileLogger.error(ex1.getMessage());
FileLogger.info("NSR1000Document.setIEDContent", xmlFileUrl.toString());
try {
xmlLoader = new XMLConfigLoader(xmlFileUrl);
finally {
FileLogger.error("NSR1000Document.setIEDContent",
"cannot new XMLConfigLoader object");
return; // the following codes cannot execute, so have to return here.
In the XMLConfigLoader, the constructor is
public XMLConfigLoader(java.net.URL xmlFileUrl) {
this.xmlFileUrl = xmlFileUrl;
configDoc = null;
builder = null;
xmlDoc = null;
Platform start Client application using the following code
Runtime.getRuntime().exec(
"java -jar e:/Client/Client.jar");I've got it!
Briefly, it is because classpath setting was overwritten by JBuilder.
Firstly, I start Platform from JBuilder. In its messages window. The command is
d:\j2sdk1.4.2_06\bin\javaw -classpath "JBPATH" zt.client.nsr1000.NSR1000App
Now, classpath environment variable was changed to be JBPATH. While I start
Client use Runtime.getRuntime().exec("java -jar Client.jar"), it will not run for classpath changed.
Then, I configured all packages used by Client into JBuilder libraries, including
Client.jar. And changed codes Runtime.getRuntime().exec("java -jar Client.jar") to be Runtime.getRuntime().exec("java -Xmx128m zt.client.nsr1000.NSR1000App")
I also changed CLASSPATH windows system environment variable.
I found this from command console, it can display exceptions. But from JBuilder, there is no exception that can be captured. So debug is difficult. -
PLEASE PLEASE HELP! am really new to java
pls pls pls help me! this is my case study i have to pass it by friday, it is about CONVERTING NUMBERS TO WORDS everything seems to be ok but when i run the program and type number from 11 to 19, it shows " ten nine nineteen" for example it typed 1015 it will show One thousand ten five fifteen". please i don't know where else to ask.
import java.io.*;
public class Case4 {
static InputStreamReader reader = new InputStreamReader(System.in);
static BufferedReader vamp = new BufferedReader(reader);
public static void main(String[] args) throws Exception {
int thou=0,hund=0,get100=0,ten=0,get10=0,one=0,get1=0,teen=0,num=0,get11=0;
String ans = "";
System.out.println("Converting Numbers to Words");
System.out.println("PREFINALS CASE STUDY");
System.out.println();
do{
thou=0;hund=0;get100=0;ten=0;get10=0;one=0;get1=0;teen=0;num=0;get11=0;
System.out.print("Enter Number: ");
num = Integer.parseInt(vamp.readLine());
if(num<19001) {
thou = num/1000;
switch (thou) {
case 1: System.out.print("One Thousand "); break;
case 2: System.out.print("Two Thousand "); break;
case 3: System.out.print("Three Thousand "); break;
case 4: System.out.print("Four Thousand "); break;
case 5: System.out.print("Five Thousand "); break;
case 6: System.out.print("Six Thousand "); break;
case 7: System.out.print("Seven Thousand "); break;
case 8: System.out.print("Eight Thousand "); break;
case 9: System.out.print("Nine Thousand "); break;
case 10: System.out.print("Ten Thousand "); break;
case 11: System.out.print("Eleven Thousand "); break;
case 12: System.out.print("Twelve Thousand "); break;
case 13: System.out.print("Thirteen Thousand "); break;
case 14: System.out.print("Fourteen Thousand "); break;
case 15: System.out.print("Fifteen Thousand "); break;
case 16: System.out.print("Sixteen Thousand "); break;
case 17: System.out.print("Seventeen Thousand "); break;
case 18: System.out.print("Eighteen Thousand "); break;
case 19: System.out.print("Nineteen Thousand "); break;
default: System.out.print("");break; }
get100 = num % 1000;
hund = get100/100;
switch (hund) {
case 9 : System.out.print("Nine Hundred "); break;
case 8 : System.out.print("Eight Hundred "); break;
case 7 : System.out.print("Seven Hundred "); break;
case 6 : System.out.print("Six Hundred "); break;
case 5 : System.out.print("Five Hundred "); break;
case 4 : System.out.print("Four Hundred "); break;
case 3 : System.out.print("Three Hundred "); break;
case 2 : System.out.print("Two Hundred "); break;
case 1 : System.out.print("One Hundred "); break;
default: System.out.print("");break;}
get10 = get100 % 100;
ten = get10 / 10;
switch (ten) {
case 9 : System.out.print("Ninety "); break;
case 8 : System.out.print("Eighty "); break;
case 7 : System.out.print("Seventy "); break;
case 6 : System.out.print("Sixty "); break;
case 5 : System.out.print("Fifty "); break;
case 4 : System.out.print("Fourty "); break;
case 3 : System.out.print("Thirty "); break;
case 2 : System.out.print("Twenty "); break;
case 1 : System.out.print("Ten"); break;
default: System.out.print("");break; }
get1 = get10 % 10;
one = get1/1;
switch (one) {
case 9 : System.out.print("Nine "); break;
case 8 : System.out.print("Eight "); break;
case 7 : System.out.print("Seven "); break;
case 6 : System.out.print("Six "); break;
case 5 : System.out.print("Five "); break;
case 4 : System.out.print("Four "); break;
case 3 : System.out.print("Three "); break;
case 2 : System.out.print("Two "); break;
case 1 : System.out.print("one"); break;
default: System.out.print("");break; }
get11 = get100 % 100;
teen = get11/1;
switch (teen) {
case 19 : System.out.print("Nineteen "); break;
case 18 : System.out.print("Eighteen "); break;
case 17 : System.out.print("Seventeen "); break;
case 16 : System.out.print("Sixteen "); break;
case 15 : System.out.print("Fifteen "); break;
case 14 : System.out.print("Fourteen "); break;
case 13 : System.out.print("Thirteen "); break;
case 12 : System.out.print("Twelve "); break;
case 11 : System.out.print("Eleven"); break;
default: System.out.print("");break; }
else
{System.out.print("INVALID INPUTS!");}
System.out.print("\n\nDo you want to convert another number(Y/N)?");
ans = vamp.readLine();
}while (!ans.equalsIgnoreCase("N"));
}This one will work for all cases.
import java.io.*;
public class Case4 {
static InputStreamReader reader = new InputStreamReader(System.in);
static BufferedReader vamp = new BufferedReader(reader);
public static void main(String[] args) throws Exception {
int thou=0,hund=0,get100=0,ten=0,get10=0,one=0,get1=0,teen=0,num=0,get11=0;
String ans = "";
System.out.println("Converting Numbers to Words");
System.out.println("PREFINALS CASE STUDY");
System.out.println();
do{
thou=0;hund=0;get100=0;ten=0;get10=0;one=0;get1=0;teen=0;num=0;get11=0;
System.out.print("Enter Number: ");
num = Integer.parseInt(vamp.readLine());
if(num<19001) {
thou = num/1000;
switch (thou) {
case 1: System.out.print("One Thousand "); break;
case 2: System.out.print("Two Thousand "); break;
case 3: System.out.print("Three Thousand "); break;
case 4: System.out.print("Four Thousand "); break;
case 5: System.out.print("Five Thousand "); break;
case 6: System.out.print("Six Thousand "); break;
case 7: System.out.print("Seven Thousand "); break;
case 8: System.out.print("Eight Thousand "); break;
case 9: System.out.print("Nine Thousand "); break;
case 10: System.out.print("Ten Thousand "); break;
case 11: System.out.print("Eleven Thousand "); break;
case 12: System.out.print("Twelve Thousand "); break;
case 13: System.out.print("Thirteen Thousand "); break;
case 14: System.out.print("Fourteen Thousand "); break;
case 15: System.out.print("Fifteen Thousand "); break;
case 16: System.out.print("Sixteen Thousand "); break;
case 17: System.out.print("Seventeen Thousand "); break;
case 18: System.out.print("Eighteen Thousand "); break;
case 19: System.out.print("Nineteen Thousand "); break;
default: System.out.print("");break; }
get100 = num % 1000;
hund = get100/100;
switch (hund) {
case 9 : System.out.print("Nine Hundred "); break;
case 8 : System.out.print("Eight Hundred "); break;
case 7 : System.out.print("Seven Hundred "); break;
case 6 : System.out.print("Six Hundred "); break;
case 5 : System.out.print("Five Hundred "); break;
case 4 : System.out.print("Four Hundred "); break;
case 3 : System.out.print("Three Hundred "); break;
case 2 : System.out.print("Two Hundred "); break;
case 1 : System.out.print("One Hundred "); break;
default: System.out.print("");break;}
get10 = get100 % 100;
ten = get10 / 10;
switch (ten) {
case 9 : System.out.print("Ninety "); break;
case 8 : System.out.print("Eighty "); break;
case 7 : System.out.print("Seventy "); break;
case 6 : System.out.print("Sixty "); break;
case 5 : System.out.print("Fifty "); break;
case 4 : System.out.print("Fourty "); break;
case 3 : System.out.print("Thirty "); break;
case 2 : System.out.print("Twenty "); break;
//case 1 : System.out.print("Ten"); break;
default: System.out.print("");break; }
if(get10 >19)
get1 = get10 % 10;
else
get1 = get10;// % 10;
one = get1/1;
switch (one) {
case 19 : System.out.print("Nineteen "); break;
case 18 : System.out.print("Eighteen "); break;
case 17 : System.out.print("Seventeen "); break;
case 16 : System.out.print("Sixteen "); break;
case 15 : System.out.print("Fifteen "); break;
case 14 : System.out.print("Fourteen "); break;
case 13 : System.out.print("Thirteen "); break;
case 12 : System.out.print("Twelve "); break;
case 11 : System.out.print("Eleven"); break;
case 10 : System.out.print("Ten"); break;
case 9 : System.out.print("Nine "); break;
case 8 : System.out.print("Eight "); break;
case 7 : System.out.print("Seven "); break;
case 6 : System.out.print("Six "); break;
case 5 : System.out.print("Five "); break;
case 4 : System.out.print("Four "); break;
case 3 : System.out.print("Three "); break;
case 2 : System.out.print("Two "); break;
case 1 : System.out.print("one"); break;
default: System.out.print("");break; }
//get11 = get100 % 100;
//teen = get11/1;
//switch (teen) {
//case 19 : System.out.print("Nineteen "); break;
//case 18 : System.out.print("Eighteen "); break;
//case 17 : System.out.print("Seventeen "); break;
//case 16 : System.out.print("Sixteen "); break;
//case 15 : System.out.print("Fifteen "); break;
//case 14 : System.out.print("Fourteen "); break;
//case 13 : System.out.print("Thirteen "); break;
//case 12 : System.out.print("Twelve "); break;
//case 11 : System.out.print("Eleven"); break;
//default: System.out.print("");break; }
else
{System.out.print("INVALID INPUTS!");}
System.out.print("\n\nDo you want to convert another number(Y/N)?");
ans = vamp.readLine();
}while (!ans.equalsIgnoreCase("N"));
} -
Pls help! Creating a new simple jsp iView...
Hi, I would like to create a totally new iView JSP project from scratch. I currently have NetWeaver and EP 6.0. This is what I have done so far on NetWeaver: <b>File > New > Project > Select Portal Application > click 'Next' > Type in Project name and root folder > click 'FINISH'</b>. Now, I think I have a project ready? I have some basic iView JSP code already. so now can someone provide me with detailed steps on what modifications and steps I need to make on my new project in order for my iView jsp to display on the EP 6.0? Any files like 'portalapp.xml' that I have to modify?
Thank you so much for your help,
Baggett.
What I know so far: I have looked at an example where I created one using an existing par. I know how to export .par file to EP 6.0, it's the steps before that I don't know. Thanks again.Hi, I think I found a little solution to my problem but now I have a new issue. I think I "solved" my problem by doing: <b>File > New > Project > Select Portal Application > click 'Next' > Type in Project name and root folder > click 'FINISH'. Now, I do:
File > New > Other > Portal Application > Create a new Portal Application Object > Select my Project > Portal Component/JSPDynPage (is this the 'easy' one to pick b/c it seems to update the portalapp.xml file, creates a jsp file (myFirstJSP.jsp) and bean for me) > I type in all the textfields for file name, package name, ... > click 'FINISH'. </b>
Is this a correct/good way of starting a JSP project(I don't really know what a JSPDynPage is)
Now I have a new issue. I open up myFirstJSP.jsp and NetWeaver highlights all the code (pasted below) in yellow and there is no error displayed:
<b><hbj:content id="myContext" >
<hbj:page title="PageTitle">
<hbj:form id="myFormId" >
</hbj:form>
</hbj:page>
</hbj:content></b>
So I try to paste this line into myFirstJSP.jsp: <b><%@ taglib uri="tagLib" prefix="hbj" %></b>and also paste this line onto portalapp.xml:
<b><component-profile>
<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
</component-profile> </b>
Now, I get an error saying: <b>"JSP Parsing Error:File "/dist/PORTAL_INF/pagelet/tagLib" not found"</b>
Why is this? How can I fix it?
Thanks so much,
Baggett. -
I've created simple data base in sql and a simple html page,here is the code:
<%@ page import="java.util.*" import="java.sql.*" %>
<%!
private String emp_code, emp_name, emp_dept, emp_title, emp_doj, emp_dob;
private String error, info, create;
private short age;
private Statement stmt;
%>
<%
//load the JDBC driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:Master","","");
Statement s = conn.createStatement();
s.executeUpdate("insert into employee_info values('" + emp_code + "', '" + emp_name + "','" + emp_dept + "','" + emp_title + "', '" + emp_doj + "','" + emp_dob + "') ");
System.out.println ("It has been successfully added");
%>
<HTML>
<HEAD>
<TITLE> ---: New Employee Information :--- </TITLE>
</HEAD>
<BODY>
<DIV ALIGN="center">
<H2> New Employee Information </H2></DIV>
<DIV ALIGN="center">
<p> � </p></DIV>
<FORM METHOD = "POST" ACTION = "NewEmp.jsp">
<H4>Employee Code: <INPUT TYPE= "text" NAME = "first1" SIZE = "17">����
Name: <INPUT TYPE = "TEXT" NAME = "first" SIZE = "51">�������
<font size="3">Title:�<SELECT name="Grade">
<OPTION SELECTED> - Select -
<OPTION >Programmer
<OPTION >Technetion
<OPTION>System Analyst
<OPTION>Network Administrator
</SELECT>�</font>
</H4>
<H4><font size="3">�</font>
</H4>
<H4><font size="3">Department Code:�</font><select name="Dept">
<OPTION SELECTED> - Select -
<OPTION >IT
<OPTION >Admin
<OPTION>MGM
<OPTION>CSD
<OPTION>SM
<OPTION>FIN
</SELECT>
��������
<font size="3"><b>DOB: </b> </font> <INPUT TYPE = "TEXT" NAME = "first2" SIZE = "18">������
<b><font size="3">DOJ: </font></b><INPUT TYPE = "TEXT" NAME = "first3" SIZE = "18">
</H4>
<p>�
</p>
<P align="center">
<INPUT TYPE = "SUBMIT" VALUE = "Submit">
<INPUT TYPE = "RESET">
<input type="button" value="Cancel" name="Cancel" onClick='javascript:window.close();'> </FORM>
<p align="center">�</p>
</BODY>
</HTML>
But I couldn't complete it or make the connection to the database, I want to fill in the blanks and then add it to the data base.
My database name is doctrak and the table name is employee_info and below the design of the table :
emp_code char 10
emp_name char 30
emp_dept char 15
emp_title char 10
emp_doj datetime 8
emp_dob datetime 8
I've installed the apatchi tomcat 401 and make the java environment.
So plz can any one help me in that?
ThanksBut I don't know how to handel the code, I didn't
study JSP or Java. I'm trying to learn it by doing
this, so please can you write the code for me in jsp
and how to put it in html then , how to do the
connection to my database?Iam sorry to disappoint you, but no.
If you are new to java and jsp taking up such a task to learn it is not ideal, nor
viable. I would suggest you learn the basics of the language first, then the basics
of jsp, then some jdbc and finally graduate to the example in question. There are
excellent tutorials avbl for all on the net.
Maybe someone else would even post the code here, but suggest you dont
waste time waiting on it.
All the best.
Cheers,
ram. -
I am totally new in Java.
I want to learn java. But I dont know how can i Do that. I also dont know which software i have to download. Which one is better for me as a new learner. Please some one help me.
Here are some links for your browser.
Free Tutorials and Such
Installation Notes - JDK 5.0 Microsoft Windows (32-bit)
Your First Cup of Java
The Java? Tutorial - A practical guide for programmers
New to Java Center
Java Programming Notes - Fred Swartz
How To Think Like A Computer Scientist
Introduction to Computer science using Java
The Java Developers Almanac 1.4
Object-Oriented Programming Concepts
Object-oriented language basics
Don't Fear the OOP
Free Java Books
Thinking in Java, by Bruce Eckel (Free online)
Core Servlet Programming, by Merty Hall (Free Online)
More Servlets, by Marty Hall (Free Online)
A Java GUI Programmer's Primer
Data Structures and Algorithms
with Object-Oriented Design Patterns in Java, by Bruno R. Preiss
Introduction to Programming Using Java, by David J. Eck
Advanced Programming for the Java 2 Platform
The Java Language Specification
Have fun
JJ -
I have an iphone 4 but can't update ios coz the phone has
No software update on general setings pls help i wanna download latest apps... Thank uYour iOS version is probably too old to support software update. You must update using iTunes on your computer.
Make sure your iTunes on the computer is current. Plug your iPhone into iTunes. Let it sync. Then choose "Check for Updates..." from the iPhone's summary tab in iTunes. That should od it for you. -
Hi i`m am such a newbie to java and am struggling to get it running on my pc. What i have done is this: DL the JDK update 10: DL Crimson Editor: i have gone into my enviroment variables and placed C:\Program Files\Java\jdk1.6.0_10\bin at the path variable and user variable. I also place at the classpath a ( . ) in the value field. so now when i try to run a small welcome program i got from the university - i get:
C:\>java code
Exception in thread "main" java.lang.NoClassDefFoundError: code
Caused by: java.lang.ClassNotFoundException: code
at.java.net.URLClassLoader$1.run<URLClassLoader.java:200>
at.java.security.AccessController.doPrivileged<Native Method>
at.java.net.URLClassLoader.findClass<URLClassLoader.java:188>
at.java.lang.ClassLoader.LoadClass<ClassLoader.java:307>
at.sun.misc.Launcher$AppClassLoader.LoadClass<Launcher.java:301>
at.java.lang.ClassLoader.LoadClass<ClassLoader.java:252>
at.java.lang.ClassLoader.LoadClassInternal<ClassLoader.java:320>
Could not find the main class: code. Program will exit.
C:\>javac java code
error: Class names, 'java,code' are only accepted if annotation processing is explicitly requested
1 error
c:\
Why is this happening - i have tried to step by step walkthrough but i still dont seem to get it right.
remember i am so so so new to programing its all very strange to me but i want to learn. Help me please.
Bulldog1965bulldog1965 wrote:
Hi i`m am such a newbie to java and am struggling to get it running on my pc. What i have done is this: DL the JDK update 10: DL Crimson Editor: i have gone into my enviroment variables and placed C:\Program Files\Java\jdk1.6.0_10\bin at the path variable and user variable. I also place at the classpath a ( . ) in the value field. so now when i try to run a small welcome program i got from the university - i get:
C:\>java code
Exception in thread "main" java.lang.NoClassDefFoundError: code
Caused by: java.lang.ClassNotFoundException: code
at.java.net.URLClassLoader$1.run<URLClassLoader.java:200>
at.java.security.AccessController.doPrivileged<Native Method>
at.java.net.URLClassLoader.findClass<URLClassLoader.java:188>
at.java.lang.ClassLoader.LoadClass<ClassLoader.java:307>
at.sun.misc.Launcher$AppClassLoader.LoadClass<Launcher.java:301>
at.java.lang.ClassLoader.LoadClass<ClassLoader.java:252>
at.java.lang.ClassLoader.LoadClassInternal<ClassLoader.java:320>
Could not find the main class: code. Program will exit.
C:\>javac java code
error: Class names, 'java,code' are only accepted if annotation processing is explicitly requested
1 erroryou are supposed to specify the name of the java file, eg.
javac Hello.java
where Hello.java is a file containing some class which has a method main declared to be public and static and
having parameter of type String[]
>
c:\
Why is this happening - i have tried to step by step walkthrough but i still dont seem to get it right.
remember i am so so so new to programing its all very strange to me but i want to learn. Help me please.
Bulldog1965 -
Please help! I am new with Java
I wrote a program of this problem but it won't run. I don't know why please help me. Thank you very much and here the problem: Define a Java class named NumberCruncher that has a single double value as its only instance variable. Then define methods that perform the following operations on its number: get, double, triple, square, cube. Thanks for reading my problem.
class NumberCruncher {
double single;
public static void main(String[] args) {
single = 20.0;
System.out.println("single double" + single);
System.out.println("times two" + single*2);
//Bla Bla -
Help me. i am new to java.
my question is
how do i create a size K of array, which there are two variable in side it?
the following example is in c
struct rr
int a;
int b;
rr c[k];
how do i open a file?
how do i read the data in the file to that array?
suppose that there are two numbers per line.the doc does not show what i want
so can any one give me an example?
thxlets say you want an array of 5 of them
class rr {
int a, b;
class RRarray{
int k = 5;
rr array[] = new rr[k]; -
Totally New to RMI, need help and advice.
Hi, all experts.
I am totally new in Java RMI. When I run a sample RMI application, still got problem.
Please give me some advice or recommend some basic materials for me to catch up.
Appreciate for you help. I need to finish one RMI project in a short period.
best regards,
Xiong FeiThe Java tutorials are usually a good place to start. Try: http://java.sun.com/docs/books/tutorial/rmi
-
Totally new - help please.
Good day everyone
I am totally new to Java, but eager to learn. Could you please provide me with info, leads etc. to get up and running ASAP? Where are the best tutorials (free download), where can I find good examples? I am planning to learn J2EE, as I am into building websites(also just started).
Regards
Adriaan.Assuming you've already got a development environment ( JDK possibly editor or IDE ) there are lots of free tutorials here:
http://developer.java.sun.com/developer/onlineTraining/
If you get any problems, a top tip is to search these forums before you ask your question, as being a beginner, someone is bound to have had the same problem, and solved it already. -
JAAS with TomCat 5.5 Unable to login.No error shown.PLS HELP ME:(
Log of tomcat:
Sep 28, 2006 3:21:49 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin;.;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM;C:\j2sdk1.4.2\bin;c:\mysql\bin;C:\apache-ant-1.6.5\bin;C:\Program Files\QuickTime\QTSystem\;C:\eclipse_ac\bin
Sep 28, 2006 3:21:49 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 28, 2006 3:21:49 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2547 ms
Sep 28, 2006 3:21:50 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 28, 2006 3:21:50 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Sep 28, 2006 3:21:50 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Sep 28, 2006 3:21:54 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive jaasLogin.war
Sep 28, 2006 3:21:57 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Sep 28, 2006 3:21:57 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Sep 28, 2006 3:21:57 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Sep 28, 2006 3:21:58 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 28, 2006 3:21:59 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Sep 28, 2006 3:21:59 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/109 config=null
Sep 28, 2006 3:21:59 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Sep 28, 2006 3:22:00 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10312 ms
===========================================================
Notice that line i bolded and italic..Does it means that my loginModule is not loaded?how to i configure my login.config so that it will call the module or whatsoever?because it my loginModule is not being called.any solutions to configure JAAS?pls help me..im new to this..=))) i wrote my login.conf and put in the /conf folder of tomcat..what else must i do?=)))Sorry, I am not sure about that.
Also, I don't see a particular line that was bolded in your original post.
The way I ensured that my LoginModule was being called (aside from the fact that I was able to login) was debugging it in Eclipse and placing a breakpoint in the LoginModule code.
You could try putting a System.out.println() statement in it to see if it is called. -
hi everyone,
i'm totally new to Java EE...i had used J2SE before to develop desktop applications (and with Swing for GUI too)...and i also used J2SE along with Tomcat to develop some simple web development...
now i'm going to get into a bigger Java web development project...and i would like to know more about Java EE and other technologies surrounding it...it'd be great if some of you can help =)
1) do i need Java EE instead of Java SE for web development? i ask because before i did some simple JSP/Servlet stuff with only J2SE SDK and Tomcat...
2) what is the purpose of Glassfish? i read that it is an application server...what is an application server for? what is the purpose of Glassfish over Java EE SDK/JRE?
3) for web development in Java, which IDE should i use? Eclipse or NetBeans? what are their pros and cons?
4) i know in these years, there are several popular java frameworks for web development such as Struts, Spring, etc...now for Java EE 5, what would be a good framework to use? Would JSF be the right direction to go as it is a framework from Sun?
hmm...i still have a lot more questions....but i'll limit the number of questions in this post...
thank you for your time and information!! =)1) do i need Java EE instead of Java SE for web
development? i ask because before i did somesimple
JSP/Servlet stuff with only J2SE SDK and Tomcat...You need Java EE with Java SE, not instead. you mean i need both of them installed? what is the procedure? like if i go to the following link for the SDK of Java EE 5...i still need to go to download SE and install it?
http://java.sun.com/javaee/downloads/index.jsp
>
Tomcat is a web container and it has the
implementation of the servletjsp classes which are
available in EE.
2) what is the purpose of Glassfish? i read thatit
is an application server...what is an application
server for? what is the purpose of Glassfish over
Java EE SDK/JRE?Glassfish is an application server which is used for
web applications (web container) as well as
enterprise components like EJB.so Glassfish is a counterpart of Tomcat? like i can use Glassfish instead of Tomcat? how about Apache? i have been using Apache as the web server whilte Tomcat being the app server...how does Glassfish integrate with Apache? or what web server should i use with Glassfish?
>
3) for web development in Java, which IDE should i
use? Eclipse or NetBeans? what are their pros and
cons?If you are going to use Glassfish, Netbeans would be
a better choice because it integrates well. For all
other application servers, I prefer Eclipse because I
don't know how to configure Netbeans and I have been
using Eclipse for a long time. The choice of IDE is
more of personal ease of use rather than actual
feature comparison.i don't know whether i should use Glassfish...it seems to me that it is expanding...and as i only had very little experience with Tomcat...switching to Glassfish would not be a waste of extra time for me...should i go with Glassfish then? or Tomcat is still considered more stable/reliable/compatible?
also...if Eclipse is good in other stuff...is it a good idea to find out more about Eclipse's support to Glassfish instead of going for NetBeans?
>
4) i know in these years, there are severalpopular
java frameworks for web development such asStruts,
Spring, etc...now for Java EE 5, what would be agood
framework to use? Would JSF be the right directionto
go as it is a framework from Sun?I haven't ever used JSF to comment on that but I
would suggest that you use Spring for good and clean
development.i understand this...as JSF is still quite new and developers have been using Struts and Spring forever...
Maybe you are looking for
-
Not working my setting for my icloud
not working my setting for my icloud
-
TNS-12560: TNS:protocol adapter error and TNS-00530: Protocol adapter error
i just installed oracle 11g on my windows xp professional box. Which user and password shall i use. What username and password should i be using to login to sql plus? when i use "Scott" "Tiger" it gives me ORA-12560: TNS:protocol adapter error occurr
-
I have Windows XP 32bit system. I am having a problem with the latest Flash Player. The problem occurs when entering the PC to play yahoo Canasta. All information required is entered and relevant windows are opened with correct data. When I click to
-
Error During Method Call in Scripting Host
Hey all , I am running a webdynpro application , which runs an Ecatt which in turn runs an Underlying SAP GUI recording , and as soon we hit the SAP GUI command we are getting an Error saying ERROR DURING METHOD CALL IN SCRIPTING HOST. As of now we
-
SAP guru's:- I watched one of issue for the solution in this website:- Here run the APP use the T-code 110, completed up to document generated and entered, now select the print tab, when they select print tab it is getting "print job schedule