Click here to Skip to main content
15,883,711 members
Home / Discussions / Java
   

Java

 
GeneralRe: Dynamic Polymorphism Pin
Sudhanshu_India25-Feb-22 1:20
Sudhanshu_India25-Feb-22 1:20 
GeneralRe: Dynamic Polymorphism Pin
englebart11-Mar-22 11:56
professionalenglebart11-Mar-22 11:56 
QuestionJava programming Pin
Member 1554066219-Feb-22 0:02
Member 1554066219-Feb-22 0:02 
AnswerRe: Java programming Pin
OriginalGriff19-Feb-22 0:03
mveOriginalGriff19-Feb-22 0:03 
GeneralRe: Java programming Pin
MarkTJohnson22-Feb-22 7:23
professionalMarkTJohnson22-Feb-22 7:23 
GeneralRe: Java programming Pin
ramisthand764-Mar-22 23:26
ramisthand764-Mar-22 23:26 
GeneralRe: Java programming Pin
OriginalGriff5-Mar-22 0:24
mveOriginalGriff5-Mar-22 0:24 
QuestionJSP -> JavaBean Connectivity Issue Pin
Josh Hebert6-Feb-22 12:40
Josh Hebert6-Feb-22 12: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 12:42
Josh Hebert6-Feb-22 12:42 
QuestionRe: JSP -> JavaBean Connectivity Issue Pin
Richard MacCutchan7-Feb-22 0:44
mveRichard MacCutchan7-Feb-22 0:44 
AnswerRe: JSP -> JavaBean Connectivity Issue Pin
englebart12-Feb-22 14:29
professionalenglebart12-Feb-22 14:29 
AnswerRe: JSP -> JavaBean Connectivity Issue Pin
jschell17-Feb-22 11:26
jschell17-Feb-22 11:26 
QuestionSwitch from VB.Net to Java Pin
Kanel Roath4-Feb-22 4:16
Kanel Roath4-Feb-22 4:16 
AnswerRe: Switch from VB.Net to Java Pin
Richard MacCutchan4-Feb-22 5:00
mveRichard MacCutchan4-Feb-22 5:00 
GeneralRe: Switch from VB.Net to Java Pin
Kanel Roath5-Feb-22 2:44
Kanel Roath5-Feb-22 2:44 
GeneralRe: Switch from VB.Net to Java Pin
Richard MacCutchan5-Feb-22 2:59
mveRichard MacCutchan5-Feb-22 2:59 
AnswerRe: Switch from VB.Net to Java Pin
Dave Kreskowiak4-Feb-22 6:13
mveDave Kreskowiak4-Feb-22 6:13 
GeneralRe: Switch from VB.Net to Java Pin
Kanel Roath5-Feb-22 2:45
Kanel Roath5-Feb-22 2:45 
GeneralRe: Switch from VB.Net to Java Pin
Dave Kreskowiak5-Feb-22 5:34
mveDave Kreskowiak5-Feb-22 5:34 
AnswerRe: Switch from VB.Net to Java Pin
Gerry Schmitz5-Feb-22 6:04
mveGerry Schmitz5-Feb-22 6:04 
GeneralRe: Switch from VB.Net to Java Pin
trønderen5-Feb-22 8:17
trønderen5-Feb-22 8:17 
GeneralRe: Switch from VB.Net to Java Pin
Gerry Schmitz5-Feb-22 18:27
mveGerry Schmitz5-Feb-22 18:27 
AnswerRe: Switch from VB.Net to Java Pin
jschell17-Feb-22 11:33
jschell17-Feb-22 11:33 
QuestionJAVA Pin
Ku Hazwan29-Jan-22 16:15
Ku Hazwan29-Jan-22 16:15 
AnswerRe: JAVA Pin
Dave Kreskowiak29-Jan-22 18:40
mveDave Kreskowiak29-Jan-22 18: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.