Click here to Skip to main content
15,799,257 members
Home / Discussions / Java
   

Java

 
GeneralRe: Dynamic Polymorphism Pin
Sudhanshu_India25-Feb-22 2:20
Sudhanshu_India25-Feb-22 2:20 
GeneralRe: Dynamic Polymorphism Pin
englebart11-Mar-22 12:56
professionalenglebart11-Mar-22 12:56 
QuestionJava programming Pin
Member 1554066219-Feb-22 1:02
Member 1554066219-Feb-22 1:02 
AnswerRe: Java programming Pin
OriginalGriff19-Feb-22 1:03
mvaOriginalGriff19-Feb-22 1:03 
GeneralRe: Java programming Pin
MarkTJohnson22-Feb-22 8:23
professionalMarkTJohnson22-Feb-22 8:23 
GeneralRe: Java programming Pin
ramisthand765-Mar-22 0:26
ramisthand765-Mar-22 0:26 
GeneralRe: Java programming Pin
OriginalGriff5-Mar-22 1:24
mvaOriginalGriff5-Mar-22 1:24 
QuestionJSP -> JavaBean Connectivity Issue Pin
Josh Hebert6-Feb-22 13:40
Josh Hebert6-Feb-22 13:40 
I am doing an assignment for college and have been stuck on a problem for the last 2 days... all articles and forums have led me down a road of despair. I created a javabean and jsp, but when I run it on Tomcat, I get an error that the class cannot be found. What should be so simple is such a pain in my ___. For the love of God please someone help me haha!
*** I am running on TomCat v10 / Eclipse and have also tried just placing the files inside the TomCat dir; .jsp in ROOT and .java in WEB-INF/classes/ ***

>>> ImpDateBean.jsp <<<
Java
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="javabean.CurrentDate"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>JavaBean Training</title>
</head>
<body>
  <jsp:useBean id="Date" class="javabean.CurrentDate" scope="session">
    <jsp:setProperty name="Date" property="*" />
  </jsp:useBean>
  <p>
  Today's date is: <br>
  <jsp:getProperty name="Date" property="date_today" />
  </p>
  
</body>
</html>


>>> CurrentDate.java <<<
Java
package javabean;
import java.io.Serializable;
import java.util.Date;

public class CurrentDate implements Serializable {
  private Date date_today = new Date();
  private static final long serialVersionUID = 1L;
  
  public CurrentDate() {}
  
  public CurrentDate(Date date_today) {
	  this.date_today = date_today;
  }
  
  public Date getDay() {
	  return date_today;
  }
  
  public void setDay(Date date_today) {
	  this.date_today = date_today;
  }
}



Thank you!
-Josh
AnswerRe: JSP -> JavaBean Connectivity Issue Pin
Josh Hebert6-Feb-22 13:42
Josh Hebert6-Feb-22 13:42 
QuestionRe: JSP -> JavaBean Connectivity Issue Pin
Richard MacCutchan7-Feb-22 1:44
mveRichard MacCutchan7-Feb-22 1:44 
AnswerRe: JSP -> JavaBean Connectivity Issue Pin
englebart12-Feb-22 15:29
professionalenglebart12-Feb-22 15:29 
AnswerRe: JSP -> JavaBean Connectivity Issue Pin
jschell17-Feb-22 12:26
jschell17-Feb-22 12:26 
QuestionSwitch from VB.Net to Java Pin
Kanel Roath4-Feb-22 5:16
Kanel Roath4-Feb-22 5:16 
AnswerRe: Switch from VB.Net to Java Pin
Richard MacCutchan4-Feb-22 6:00
mveRichard MacCutchan4-Feb-22 6:00 
GeneralRe: Switch from VB.Net to Java Pin
Kanel Roath5-Feb-22 3:44
Kanel Roath5-Feb-22 3:44 
GeneralRe: Switch from VB.Net to Java Pin
Richard MacCutchan5-Feb-22 3:59
mveRichard MacCutchan5-Feb-22 3:59 
AnswerRe: Switch from VB.Net to Java Pin
Dave Kreskowiak4-Feb-22 7:13
mveDave Kreskowiak4-Feb-22 7:13 
GeneralRe: Switch from VB.Net to Java Pin
Kanel Roath5-Feb-22 3:45
Kanel Roath5-Feb-22 3:45 
GeneralRe: Switch from VB.Net to Java Pin
Dave Kreskowiak5-Feb-22 6:34
mveDave Kreskowiak5-Feb-22 6:34 
AnswerRe: Switch from VB.Net to Java Pin
Gerry Schmitz5-Feb-22 7:04
mveGerry Schmitz5-Feb-22 7:04 
GeneralRe: Switch from VB.Net to Java Pin
trønderen5-Feb-22 9:17
trønderen5-Feb-22 9:17 
GeneralRe: Switch from VB.Net to Java Pin
Gerry Schmitz5-Feb-22 19:27
mveGerry Schmitz5-Feb-22 19:27 
AnswerRe: Switch from VB.Net to Java Pin
jschell17-Feb-22 12:33
jschell17-Feb-22 12:33 
QuestionJAVA Pin
Ku Hazwan29-Jan-22 17:15
Ku Hazwan29-Jan-22 17:15 
AnswerRe: JAVA Pin
Dave Kreskowiak29-Jan-22 19:40
mveDave Kreskowiak29-Jan-22 19:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.