You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Vlachogiannis Evangelos <ev...@aegean.gr> on 2002/11/22 21:38:05 UTC
Portal Messenger-Forum Potrlets
Others portlets... PortlaMessenger can send mail and post to a forum
(database) which can be accessed usingForumVieer Portlet.
<portlet-entry name="ForumViewer" hidden="false" type="instance"
application="false">
<meta-info>
<title>ForumViewer</title>
<description>ForumViewer</description>
</meta-info>
<classname>gr.aegean.syros.jetspeed.portal.portlets.ForumViewer</classname>
<media-type ref="html"/>
</portlet-entry>
<portlet-entry name="ViewFormPortlet" hidden="false" type="instance"
application="false">
<meta-info>
<title>ViewFormPortlet</title>
<description>ViewFormPortlet</description>
</meta-info>
<classname>gr.aegean.syros.jetspeed.portal.portlets.ViewFormPortlet</classna
me>
<media-type ref="html"/>
</portlet-entry>
Consider changing fix database usl with portlet 'parameters.
--------------------------------------------
Evangelos Vlachogiannis
Researcher - PhD. Candidate
Dept. of Products and Systems Design http://www.syros.aegean.gr)
University of the Aegean (http://www.aegean.gr)
Syros - Greece
........................................................................
Phone: +32281-097126
Mob: +3097-6560466
FAX: +32281-097009
e-mail: evlach@aegean.gr
Web: http://www.syros.aegean.gr/users/evlach
--------------------------------------------
RE: Portal Messenger-Forum Potrlets
Posted by David Sean Taylor <da...@bluesunrise.com>.
I gave it a quick review.
A few comments:
There's a lot of this kind of stuff:
out.append("<h2>Portal Messenger</h2>");
out.append("<form
action=\"http://"+request.getServerName()+"/jetspeed/portal\"
method=\"post\">");
out.append("<br>Sent to: <select size=\"1\" name=\"option\"> <option
selected>email</option><option>forum</option><option>both</option></select>"
);
Its an unwritten rule to always use templates for all content (don't hard
code html in java)
We can't hard code connection info in Java. Jetspeed uses Torque or at least
a configurable data source, and has to be db agnostic
public static String
dbDriver="org.gjt.mm.mysql.Driver";//TurbineResources.getString("database.de
fault.driver");
public static String
dbUsername="root";//TurbineResources.getString("database.default.username");
public static String
dbPassword="";//TurbineResources.getString("database.default.password");
public static String dbURL=
"jdbc:mysql://evlach.syros.aegean.gr:3306/myforum";
//TurbineResources.getString("database.default.url");
Recommend using Torque for the DB stuff
This is mySQL specific:
String q = "SHOW FIELDS FROM " + table; //get columns
David
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>