Re: Missing type on declaration - any poniters 1 error left

2001-07-26 Thread chuck amadi

HI, I will be Cheers 4 yer time and effect.Thanx
Calvin



On 25 Jul 2001 12:51:08 +0100, Chuck Amadi wrote:

Hi i have got it done to 1 error as below


webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
[9:1] 'class' or 'interface' keyword expected.
public ActionForward  perform (ActionMapping mapping,
   ^
1 error
Errors compiling ActionForward.

Chuck Amadi wrote:

Hi, can someone take a peek at my ActionFoward Class
-
webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
[10:1] Missing type on declaration
public perform(ActionMapping mapping,
  ^
webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
[35:1] Type expected or missing '}'
^
2 errors
Errors compiling ActionForward.

-

package classes.org.apache.struts.action;

/*Accessing Relational Databases
 *Struts can define the datasources for an application from within its
standard configuration file. A simple JDBC connection pool is also
provided.
 *See The Action Mappings Configuration File section and the Utilities
Developer Guide for details.
 *After the datasource is defined, here is an example of establishing a
connection from within a Action perform method.*/

public class ActionForward {
public perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response){
try {
javax.sql.DataSource dataSource =
servlet.findDataSource(null);
java.sql.Connection myConnection =
dataSource.getConnection();

//do what you wish with myConnection
} catch (SQLException sqle) {
getServlet().log(Connection.process, sqle);
} finally {

//enclose this in a finally block to make
//sure the connection is closed
try {
myConnection.close();
} catch (SQLException e) {
getServlet().log(Connection.close, e);
}
}
}

The path is C:/jakarta-tomcat-3.2.2/webapps/bbnpa/WEB-INF/classes/
do i need to creatE a base dir i.e
C:/jakarta-tomcat-3.2.2/webapps/bbnpa/action/WEB-INF/classes/org/apache/struts/action/ActionForward
Cheers Chuck
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal â rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.

-- 
The views expressed by the sender of this message don't 
necessarily represent those of Brecon Beacons National Park 
Authority. This message is intended for the addressee(s) only 
and is sent in confidence; if you receive it in error, please can you 
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn 
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. 
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion 
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn 
mewn camgymeriad, a fyddech gystal â rhoi gwybod i 
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.









Re: Missing type on declaration - any poniters 1 error left

2001-07-25 Thread Chuck Amadi

Hi i have got it done to 1 error as below


webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
[9:1] 'class' or 'interface' keyword expected.
public ActionForward  perform (ActionMapping mapping,
   ^
1 error
Errors compiling ActionForward.

Chuck Amadi wrote:
 
 Hi, can someone take a peek at my ActionFoward Class
 -
 webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
 [10:1] Missing type on declaration
 public perform(ActionMapping mapping,
   ^
 webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
 [35:1] Type expected or missing '}'
 ^
 2 errors
 Errors compiling ActionForward.
 
 -
 
 package classes.org.apache.struts.action;
 
 /*Accessing Relational Databases
  *Struts can define the datasources for an application from within its
 standard configuration file. A simple JDBC connection pool is also
 provided.
  *See The Action Mappings Configuration File section and the Utilities
 Developer Guide for details.
  *After the datasource is defined, here is an example of establishing a
 connection from within a Action perform method.*/
 
 public class ActionForward {
 public perform(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response){
 try {
 javax.sql.DataSource dataSource =
 servlet.findDataSource(null);
 java.sql.Connection myConnection =
 dataSource.getConnection();
 
 //do what you wish with myConnection
 } catch (SQLException sqle) {
 getServlet().log(Connection.process, sqle);
 } finally {
 
 //enclose this in a finally block to make
 //sure the connection is closed
 try {
 myConnection.close();
 } catch (SQLException e) {
 getServlet().log(Connection.close, e);
 }
 }
 }
 
 The path is C:/jakarta-tomcat-3.2.2/webapps/bbnpa/WEB-INF/classes/
 do i need to creatE a base dir i.e
 
C:/jakarta-tomcat-3.2.2/webapps/bbnpa/action/WEB-INF/classes/org/apache/struts/action/ActionForward
 Cheers Chuck
 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.

-- 
The views expressed by the sender of this message don't 
necessarily represent those of Brecon Beacons National Park 
Authority. This message is intended for the addressee(s) only 
and is sent in confidence; if you receive it in error, please can you 
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn 
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. 
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion 
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn 
mewn camgymeriad, a fyddech gystal â rhoi gwybod i 
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.



RE: Missing type on declaration - any poniters 1 error left

2001-07-25 Thread Mark Schenk

 Hi i have got it done to 1 error as below


 webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
 [9:1] 'class' or 'interface' keyword expected.
 public ActionForward  perform (ActionMapping mapping,
^
 1 error
 Errors compiling ActionForward.


Hi Chuck,

this list is meant for struts-related topics. What you have here is a
java-problem: I recommend one of the java-tutorial trails on java.sun.com.

Mark


Mark Schenk |   Ceci n'est pas une signature
Blackboard Project Manager  |
Delft University of Technology  |E-mail: [EMAIL PROTECTED]
Dept.: DTO  |Phone:  +31 152785448 (85448)
Room: LB00.680  |Fax:+31 152786359

-




Re: Missing type on declaration - any poniters 1 error left

2001-07-25 Thread Calvin Yu


I think your compiler can't find the initial class declaration.  Chances
are your actual syntax error occured before that line.  Make sure you
don't have too many '}' and that you're making a valid class
declaration.

It seems that a lot of your problems has more to do with your
understanding of Java than with Struts.  You might want to check out
some general java language message groups, as they might be better at
explaining the problems you are experiencing.

Calvin



On 25 Jul 2001 12:51:08 +0100, Chuck Amadi wrote:
 Hi i have got it done to 1 error as below
 
 
 webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
 [9:1] 'class' or 'interface' keyword expected.
 public ActionForward  perform (ActionMapping mapping,
^
 1 error
 Errors compiling ActionForward.
 
 Chuck Amadi wrote:
  
  Hi, can someone take a peek at my ActionFoward Class
  -
  webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
  [10:1] Missing type on declaration
  public perform(ActionMapping mapping,
^
  webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
  [35:1] Type expected or missing '}'
  ^
  2 errors
  Errors compiling ActionForward.
  
  -
  
  package classes.org.apache.struts.action;
  
  /*Accessing Relational Databases
   *Struts can define the datasources for an application from within its
  standard configuration file. A simple JDBC connection pool is also
  provided.
   *See The Action Mappings Configuration File section and the Utilities
  Developer Guide for details.
   *After the datasource is defined, here is an example of establishing a
  connection from within a Action perform method.*/
  
  public class ActionForward {
  public perform(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response){
  try {
  javax.sql.DataSource dataSource =
  servlet.findDataSource(null);
  java.sql.Connection myConnection =
  dataSource.getConnection();
  
  //do what you wish with myConnection
  } catch (SQLException sqle) {
  getServlet().log(Connection.process, sqle);
  } finally {
  
  //enclose this in a finally block to make
  //sure the connection is closed
  try {
  myConnection.close();
  } catch (SQLException e) {
  getServlet().log(Connection.close, e);
  }
  }
  }
  
  The path is C:/jakarta-tomcat-3.2.2/webapps/bbnpa/WEB-INF/classes/
  do i need to creatE a base dir i.e
  
C:/jakarta-tomcat-3.2.2/webapps/bbnpa/action/WEB-INF/classes/org/apache/struts/action/ActionForward
  Cheers Chuck
  --
  The views expressed by the sender of this message don't
  necessarily represent those of Brecon Beacons National Park
  Authority. This message is intended for the addressee(s) only
  and is sent in confidence; if you receive it in error, please can you
  let us know (at [EMAIL PROTECTED]) and then destroy all copies.
  Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
  adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
  Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
  yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
  mewn camgymeriad, a fyddech gystal â rhoi gwybod i
  ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
 
 -- 
 The views expressed by the sender of this message don't 
 necessarily represent those of Brecon Beacons National Park 
 Authority. This message is intended for the addressee(s) only 
 and is sent in confidence; if you receive it in error, please can you 
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn 
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. 
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion 
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn 
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i 
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.






RE: Missing type on declaration - any poniters 1 error left

2001-07-25 Thread Kevin McLain

You need to close the brace on your class declaration I believe.

Like this:

  public class ActionForward {
 
public perform(ActionMapping mapping,
ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
{
  try {
  javax.sql.DataSource dataSource =
  servlet.findDataSource(null);
  java.sql.Connection myConnection =
  dataSource.getConnection();
 
  //do what you wish with myConnection
  } catch (SQLException sqle) {
  getServlet().log(Connection.process, sqle);
  } finally {
 
  //enclose this in a finally block to make
  //sure the connection is closed
  try {
  myConnection.close();
  } catch (SQLException e) {
  getServlet().log(Connection.close, e);
  }
  }
  }
 } -- Add this brace here

-Original Message-
From: Calvin Yu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 7:55 PM
To: [EMAIL PROTECTED]
Subject: Re: Missing type on declaration - any poniters 1 error left



I think your compiler can't find the initial class declaration.  Chances
are your actual syntax error occured before that line.  Make sure you
don't have too many '}' and that you're making a valid class
declaration.

It seems that a lot of your problems has more to do with your
understanding of Java than with Struts.  You might want to check out
some general java language message groups, as they might be better at
explaining the problems you are experiencing.

Calvin



On 25 Jul 2001 12:51:08 +0100, Chuck Amadi wrote:
 Hi i have got it done to 1 error as below


 webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
 [9:1] 'class' or 'interface' keyword expected.
 public ActionForward  perform (ActionMapping mapping,
^
 1 error
 Errors compiling ActionForward.

 Chuck Amadi wrote:
 
  Hi, can someone take a peek at my ActionFoward Class

 --
---
 
webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
  [10:1] Missing type on declaration
  public perform(ActionMapping mapping,
^
 
webapps/bbnpa/WEB-INF/classes/org/apache/struts/action/ActionForward.java
  [35:1] Type expected or missing '}'
  ^
  2 errors
  Errors compiling ActionForward.
 

 --
---
 
  package classes.org.apache.struts.action;
 
  /*Accessing Relational Databases
   *Struts can define the datasources for an application from within its
  standard configuration file. A simple JDBC connection pool is also
  provided.
   *See The Action Mappings Configuration File section and the Utilities
  Developer Guide for details.
   *After the datasource is defined, here is an example of establishing a
  connection from within a Action perform method.*/
 
  public class ActionForward {
  public perform(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response){
  try {
  javax.sql.DataSource dataSource =
  servlet.findDataSource(null);
  java.sql.Connection myConnection =
  dataSource.getConnection();
 
  //do what you wish with myConnection
  } catch (SQLException sqle) {
  getServlet().log(Connection.process, sqle);
  } finally {
 
  //enclose this in a finally block to make
  //sure the connection is closed
  try {
  myConnection.close();
  } catch (SQLException e) {
  getServlet().log(Connection.close, e);
  }
  }
  }
 
  The path is C:/jakarta-tomcat-3.2.2/webapps/bbnpa/WEB-INF/classes/
  do i need to creatE a base dir i.e
 
C:/jakarta-tomcat-3.2.2/webapps/bbnpa/action/WEB-INF/classes/org/apache/stru
ts/action/ActionForward
  Cheers Chuck
  --
  The views expressed by the sender of this message don't
  necessarily represent those of Brecon Beacons National Park
  Authority. This message is intended for the addressee(s) only
  and is sent in confidence; if you receive it in error, please can you
  let us know (at [EMAIL PROTECTED]) and then destroy all copies.
  Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
  adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
  Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
  yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
  mewn camgymeriad, a fyddech gystal â rhoi gwybod i
  ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park