You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Bryan Field-E. <br...@ne...> - 2002-03-11 15:20:52
|
This looks like a problem with Struts in JBuilder... It looks something like Struts can't find it's own config file (struts-config.xml), or along those lines. On Mon, 2002-03-11 at 07:45, John Menke wrote: > I am trying to run the examples in Jbuilder and get: > > javax.servlet.ServletException: Cannot create rewrite URL: > java.net.MalformedURLException: Cannot retrieve ActionForwards collection > > I know it was running previously from within Tomcat.... strange...cannot > figure out what changed. > > -john > > > _______________________________________________ > Simper-Users mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simper-users |
|
From: John M. <jo...@ea...> - 2002-03-11 15:19:07
|
It looks like JBuilder changes the WEB.XML file and removes:
<filter>
<filter-name>simper</filter-name>
<filter-class>org.netmeme.simper.Simper</filter-class>
<init-param>
<param-name>initClass</param-name>
<param-value>org.netmeme.simper.demo.DemoInit</param-value>
</init-param>
</filter>
<!-- Map the filter to everything (JSP pages and Struts Actions). That way
the JSP pages can
use persistence as well - hopefully, in a read-only capacity. -->
<filter-mapping>
<filter-name>simper</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Actually, it replaces the web.xml and saves the old version as web.xml~.
I replaced the web.xml and everthing works in Tomcat... Still cannot run
from JBuilder.
-----Original Message-----
From: John Menke [mailto:jo...@ea...]
Sent: Monday, March 11, 2002 9:46 AM
To: simper-users
Subject: Cannot retrieve ActionForwards collection
I am trying to run the examples in Jbuilder and get:
javax.servlet.ServletException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrieve ActionForwards collection
I know it was running previously from within Tomcat.... strange...cannot
figure out what changed.
-john
|
|
From: John M. <jo...@ea...> - 2002-03-11 14:45:03
|
I am trying to run the examples in Jbuilder and get: javax.servlet.ServletException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrieve ActionForwards collection I know it was running previously from within Tomcat.... strange...cannot figure out what changed. -john |
|
From: John M. <jo...@ea...> - 2002-03-07 00:53:20
|
Is it proven to work? the docs speak of 1-1 and 1-N but not n-n. Bryan gave me a tip as to how to configure the mapping table (with a primary key) but i still can't figure out the correct combination of queries and relations to make it work. any sample code would be much appreciated if it exists. -john |
|
From: John M. <jo...@ea...> - 2002-03-06 20:47:20
|
First, I would like to thank anyone for trying to help me with this problem.
I am only guessing as to how to code this and need some clarification on how
using a linking table is accomplished.
I'm following the DemoInit.java example of how to register tables and have
the following:
MODEL SQL:
-- Table: stock
CREATE TABLE "stock" (
"stock_pkey" int4 NOT NULL,
"symbol" varchar(5) NOT NULL,
"name" varchar(50) NOT NULL,
"price" numeric(5, 3),
CONSTRAINT "stock_symbol_key" UNIQUE ("symbol"),
CONSTRAINT "stock_pkey" PRIMARY KEY ("stock_pkey")
);
-- Table: portfolio
CREATE TABLE "portfolio" (
"portfolio_pkey" int4 NOT NULL,
"name" varchar(50),
"investor_pkey" int4,
CONSTRAINT "portfolio_pkey" PRIMARY KEY ("portfolio_pkey"),
CONSTRAINT "FKinvestor" FOREIGN KEY ("investor_pkey") REFERENCES
"investor" ("investor_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT
DEFERRABLE INITIALLY IMMEDIATE
);
-- Table: portfolio_stock - The Linking Table
CREATE TABLE "portfolio_stock" (
"portfolio_stock_pkey" int4 NOT NULL,
"stock_pkey" int4 NOT NULL,
"portfolio_pkey" int4 NOT NULL,
CONSTRAINT "portfolio_stock_pkey" PRIMARY KEY ("portfolio_stock_pkey"),
CONSTRAINT "FKportfolio" FOREIGN KEY ("portfolio_pkey") REFERENCES
"portfolio" ("portfolio_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT
DEFERRABLE INITIALLY IMMEDIATE,
CONSTRAINT "FKstock" FOREIGN KEY ("stock_pkey") REFERENCES "stock"
("stock_pkey") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE
INITIALLY IMMEDIATE
);
TABLE REGISTRATIONS
// Register the stock table, and all it's queries
simper.registerTable("stock", "stock_pkey", null, new
PKGenIDTable("next_id_table"));
simper.registerQuery("stock", "all", null, "name", true);
// Register the portfolio table, and all it's queries
simper.registerTable("portfolio", "portfolio_pkey", null, new
PKGenIDTable("next_id_table"));
simper.registerQuery("portfolio", "all", null, "name", true);
Here is where it gets tricky, I'm not sure how to code this
// Register the linking table portfolio_stock table, and all it's queries
simper.registerTable("portfolio_stock", "portfolio_stock_pkey", null, new
PKGenIDTable("next_id_table"));
simper.registerQuery("portfolio_stock", "by_portfolio_pkey",
"portfolio_pkey=?", "portfolio_pkey", true);
simper.registerQuery("portfolio_stock", "by_stock_pkey", "stock_pkey=?",
"stock_pkey", true);
Query syntax for a relation is:
// simper.registerRelation( source-table-name, source-relation-name,
source-key, destination-table, destionation-table-query-name)
From what I understand:
source-table-name = in a linking relation this would be one side of a many
to many
source-relation-name = this is used in the jsp to specify the fk
source-key = the primary key of one side of the many to many
destination-table = the linking table in a many to many relationship
destination-table-query-name = links source pk to query based on source pk
for the linking table?
// the Relations for the linking table
simper.registerRelation("stock", "stock_fk", "stock_pkey",
"portfolio_stock", "by_stock_pkey");
simper.registerRelation("portfolio", "portfolio_fk", "portfolio_pkey",
"portfolio_stock", "by_portfolio_pkey");
Is this correct syntax?
In the example jsp a foreign key is used like this:
<bean:write name="oneBook" property="author.name"/>
Going through a linking table what would the property syntax be?
My foreign key relations are stock_fk and portfolio_fk
So I'm guessing
property = "stock_fk.portfolio_fk.name" to retrieve the name in the
portfolio table
and
property = "portfolio_fk.stock_fk.name" to retrieve the name in the stock
table
Any help would be greatly appreciated.
-john
|