You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Manri Offermann <ta...@eastbeam.co.jp> on 2005/03/14 14:19:10 UTC

3.1 & Friendly URLs ...

Hi All,

Following the instructions in the new documentation and gathering 
information from this mailing list and the WIKI, I have managed to run 3.1 
with Friendly URLs (and Spring 1.2 and Hibernate 3).

Currently the 3.1 distribution (alpha) has a PageServiceEncoder. To have 
external services mapped to a friendly URL I have added:

 <contribution configuration-id="tapestry.url.ServiceEncoders">
  <page-service-encoder id="external" extension="htm" service="external"/>
 </contribution>

in my hivemind.xml, which does seem to work.

One can live with PageService being mapped to *.html and ExternalService 
being mapped to *.htm, but I would be happier if both services could be 
mapped to the same extension (*.html for example).

Are there gonna be some additional ServiceEncoders in the final release?


Manri



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Where to call _RootDAO.initialize()

Posted by Alexey Romanchuk <ui...@gorodok.net>.
Hola!

sswawo> Hello everyone!

sswawo> Trying to use the Hyberclipe generated classes within my tapestry
sswawo> application.....

sswawo> Where do I call _RootDAO.initialize() ?

usually a call in in my servlet class in init function. another way is
call it in static area.



                       Alexey Romanchuk


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Where to call _RootDAO.initialize()

Posted by sa...@women-at-work.org.
Hello everyone!

Trying to use the Hyberclipe generated classes within my tapestry
application.....

Where do I call _RootDAO.initialize() ?

And when do I need to call it? Only when the whole web applications 
is starting up?

So far the database layer was simple and taken from an old example:

A static class called ConnectionService and once called Persistance Service.


Example:

public static String getHomepage(int uid, String uname, String domain) {

String value = null;
Connection conn = ConnectionService.getConnection();
try {
	String query = "select homepage from fb_homepages where uid=? and
approved='y'";

	PreparedStatement stmt = conn.prepareStatement(query);
	stmt.setInt(1, uid);
	ResultSet result = stmt.executeQuery();

			if (result.next()) {
				value = result.getString(1);
			}

		}

		catch (SQLException ex) {
			ConnectionService.closeConnection(conn);
		}

		ConnectionService.closeConnection(conn);

		if (value == null) {
			value = "http://".concat(domain).concat("/").concat(uname);
		}
		return value;
	}


How would it look ilke with a Hiberclipse/Hibernate Synchronizer generated
class with http://www.binamics.com/hibernatesync ?

Within a test class I could access it like that:

_RootDAO.initialize();
HomepagesDAO dao = new HomepagesDAO();
List homepages = dao.find("from Homepage as homepage ....");	

And can I genereally just access those classes like that or do I need to
care about sessions, transactions and factories too?

	

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: 3.1 & Friendly URLs ...

Posted by Howard Lewis Ship <hl...@gmail.com>.
Why limit yourself to the .htm[l] extension?  Why not .ext, .direct, .page?


On Mon, 14 Mar 2005 22:19:10 +0900, Manri Offermann
<ta...@eastbeam.co.jp> wrote:
> Hi All,
> 
> Following the instructions in the new documentation and gathering
> information from this mailing list and the WIKI, I have managed to run 3.1
> with Friendly URLs (and Spring 1.2 and Hibernate 3).
> 
> Currently the 3.1 distribution (alpha) has a PageServiceEncoder. To have
> external services mapped to a friendly URL I have added:
> 
>  <contribution configuration-id="tapestry.url.ServiceEncoders">
>   <page-service-encoder id="external" extension="htm" service="external"/>
>  </contribution>
> 
> in my hivemind.xml, which does seem to work.
> 
> One can live with PageService being mapped to *.html and ExternalService
> being mapped to *.htm, but I would be happier if both services could be
> mapped to the same extension (*.html for example).
> 
> Are there gonna be some additional ServiceEncoders in the final release?
> 
> Manri
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org