You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chuck Amadi <ch...@breconbeacons.org> on 2001/06/05 11:31:12 UTC

newbie to struts - confirm hierachy( packages - webapps)!!

Hi, i have constructed a web app within my file system as follows:-
C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\classes\logon\LogonForm.java

 The struts-bbnpa is were im placing all my work. thus the examples
custom and logon packages are beneath my classes directory. Thus is this
the correct procedure as im about to venture into JDBC Project
(Postgresql) and im not sure weather the packages are one level above
\WEB-INF dir.

Any suggestions and confirmation extremely welcomed. Cheers inadvance.

Chuck (Graduate Systems Programmer)
--
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 it@breconbeacons.org) 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 it@breconbeacons.org) ac yna dilëwch bob copi.


Re: newbie to struts - confirm hierachy( packages - webapps)!!

Posted by Jonathan Asbell <ja...@i-2000.com>.
jeez.  You are up early!

----- Original Message -----
From: "Ted Husted" <hu...@apache.org>
To: <st...@jakarta.apache.org>
Sent: Tuesday, June 05, 2001 6:30 AM
Subject: Re: newbie to struts - confirm hierachy( packages - webapps)!!


> Some people like to keep the source Java files at a separate location,
> and then have Ant copy them over to the classes directory, but mixing
> the class and java files in the same folder works too.
>
> Personally, when using a package hierarchy for my classes, I tend to
> just name things
>
> .\logon\Form.java
>
> But, yes you should either put your packages class files below the
> classes directory, or in a JAR in the lib folder. For development at
> least, you probably just want to put them under classes.
>
> We put these under the WEB-INF folder so that they cannot be directly
> accessed by a client program (e.g. Web browser), only by the
> application.
>
> Chuck Amadi wrote:
> >
> > Hi, i have constructed a web app within my file system as follows:-
> >
C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\classes\logon\LogonForm
.java
> >
> >  The struts-bbnpa is were im placing all my work. thus the examples
> > custom and logon packages are beneath my classes directory. Thus is
> > this the correct procedure as im about to venture into JDBC Project
> > (Postgresql) and im not sure weather the packages are one level above
> > \WEB-INF dir.
> >
> > Any suggestions and confirmation extremely welcomed. Cheers inadvance.
> >
> > Chuck (Graduate Systems Programmer)
> > --
>


RE: Newie question

Posted by Torsten Terp <tt...@stofanet.dk>.
Hi,

Thanks a lot!
I will take a look at the link!

^torsten

> -----Original Message-----
> From: Ted Husted [mailto:husted@apache.org]
> Sent: Tuesday, June 05, 2001 2:11 PM
> To: struts-user@jakarta.apache.org
> Subject: Re: Newie question
> 
> 
> You could take a look at Part 2 of Strut by Strut, under Coming Soon at
> < http://www.husted.com/about/struts/ >
> 
> I'm working on some generic Access, Search, and Result actions there.
> 
> Though, the usual approach would be that control goes to an action that
> manages the data retrieval and forwards the result to another JSP for
> display. 
> 
> [JSP] -> [ACTION] -> [JSP] ...
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
> 
> Torsten Terp wrote:
> > 
> > Hi,
> > 
> > Im I have just started using Struts and the idea
> > of the framework seems great!! I could however
> > use some help getting started the right way!!
> > 
> > I want to do as folows:
> > 
> > A jsp page with an input fields takes as input
> > a string used to perform a seach in a database.
> > E.g., a substring of the name of some customer.
> > 
> > Control is forwarded to another jsp that displays
> > the results, e.g., the customernames containing the
> > substring provided in the input field above. These
> > customernames should be displayed in a html:select
> > 
> > Selecting one of the customers will result in another
> > search which retrieves all data for that particular
> > customer and displays it in another frame.
> > 
> > Im thinkind this is a pretty generic setup, so my
> > question is if anybody has example code of this.
> > 
> > Im using the jBoss application server as the model,
> > so its not the database pooling from struts im after,
> > its the control flow and populating the jsp's....
> > 
> > It would be greatly apreciated. Thanks in advance...
> > 
> > ^torsten
> 
> 

Re: Newie question

Posted by Ted Husted <hu...@apache.org>.
You could take a look at Part 2 of Strut by Strut, under Coming Soon at
< http://www.husted.com/about/struts/ >

I'm working on some generic Access, Search, and Result actions there.

Though, the usual approach would be that control goes to an action that
manages the data retrieval and forwards the result to another JSP for
display. 

[JSP] -> [ACTION] -> [JSP] ...

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/

Torsten Terp wrote:
> 
> Hi,
> 
> Im I have just started using Struts and the idea
> of the framework seems great!! I could however
> use some help getting started the right way!!
> 
> I want to do as folows:
> 
> A jsp page with an input fields takes as input
> a string used to perform a seach in a database.
> E.g., a substring of the name of some customer.
> 
> Control is forwarded to another jsp that displays
> the results, e.g., the customernames containing the
> substring provided in the input field above. These
> customernames should be displayed in a html:select
> 
> Selecting one of the customers will result in another
> search which retrieves all data for that particular
> customer and displays it in another frame.
> 
> Im thinkind this is a pretty generic setup, so my
> question is if anybody has example code of this.
> 
> Im using the jBoss application server as the model,
> so its not the database pooling from struts im after,
> its the control flow and populating the jsp's....
> 
> It would be greatly apreciated. Thanks in advance...
> 
> ^torsten

Newie question

Posted by Torsten Terp <tt...@stofanet.dk>.
Hi,

Im I have just started using Struts and the idea
of the framework seems great!! I could however
use some help getting started the right way!! 

I want to do as folows:

A jsp page with an input fields takes as input 
a string used to perform a seach in a database.
E.g., a substring of the name of some customer.

Control is forwarded to another jsp that displays
the results, e.g., the customernames containing the
substring provided in the input field above. These
customernames should be displayed in a html:select

Selecting one of the customers will result in another
search which retrieves all data for that particular 
customer and displays it in another frame.

Im thinkind this is a pretty generic setup, so my
question is if anybody has example code of this.

Im using the jBoss application server as the model, 
so its not the database pooling from struts im after,
its the control flow and populating the jsp's....

It would be greatly apreciated. Thanks in advance...

^torsten

Re: newbie to struts - confirm hierachy( packages - webapps)!!

Posted by Ted Husted <hu...@apache.org>.
Some people like to keep the source Java files at a separate location,
and then have Ant copy them over to the classes directory, but mixing
the class and java files in the same folder works too.

Personally, when using a package hierarchy for my classes, I tend to
just name things 

.\logon\Form.java

But, yes you should either put your packages class files below the
classes directory, or in a JAR in the lib folder. For development at
least, you probably just want to put them under classes.

We put these under the WEB-INF folder so that they cannot be directly
accessed by a client program (e.g. Web browser), only by the
application.

Chuck Amadi wrote:
> 
> Hi, i have constructed a web app within my file system as follows:-
> C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\classes\logon\LogonForm.java
> 
>  The struts-bbnpa is were im placing all my work. thus the examples
> custom and logon packages are beneath my classes directory. Thus is
> this the correct procedure as im about to venture into JDBC Project
> (Postgresql) and im not sure weather the packages are one level above
> \WEB-INF dir.
> 
> Any suggestions and confirmation extremely welcomed. Cheers inadvance.
> 
> Chuck (Graduate Systems Programmer)
> --

Re: newbie to struts - confirm hierachy( packages - webapps)!!

Posted by Jonathan Asbell <ja...@i-2000.com>.
I decided to NOT use the Struts.jar, but instead use the Struts source files, and then add my own directories below the classes directory for that particular web app.  That way I could tweak Struts and have a better way of replacing updates to the classes.  My setup is like this:
1) Struts framework - /struts/org/apache/struts etc... with my classpath pointing to /struts
2) My framework - /vnu/com/vnu/.... etc... with my classpath pointing to /vnu
3) My classes for the particular web app - 
WEB-INF/classes/com/mywebapp/actions
WEB-INF/classes/com/mywebapp/forms
WEB-INF/classes/com/mywebapp/globals
WEB-INF/classes/com/mywebapp/models
WEB-INF/classes/com/mywebapp/taglib
with the classpath pointing to WEB-INF/classes
  ----- Original Message ----- 
  From: Chuck Amadi 
  To: Craig R. McClanahan ; Petr Jiricka 
  Sent: Tuesday, June 05, 2001 5:31 AM
  Subject: newbie to struts - confirm hierachy( packages - webapps)!!


  Hi, i have constructed a web app within my file system as follows:- C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\classes\logon\LogonForm.java 
   The struts-bbnpa is were im placing all my work. thus the examples custom and logon packages are beneath my classes directory. Thus is this the correct procedure as im about to venture into JDBC Project (Postgresql) and im not sure weather the packages are one level above \WEB-INF dir. 
  Any suggestions and confirmation extremely welcomed. Cheers inadvance. 

  Chuck (Graduate Systems Programmer) 
  -- 
  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 it@breconbeacons.org) 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 it@breconbeacons.org) ac yna dilëwch bob copi.