RE: [Mav-user] opt-struts
What type of overhead would I incurr? [EMAIL PROTECTED] 04/02/03 02:33PM No, the opt-struts package is there to make life easier for people trying to convert a Struts application to Maverick. I wouldn't use it if you were starting from scratch or don't mind rewriting your controllers. Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:00 AM To: [EMAIL PROTECTED] Subject: [Mav-user] opt-struts Are there any advantages to wrapping Struts with Maverick? Seems like additional overhead when Maverick would suffice. -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ [INVALID FOOTER] --- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ [INVALID FOOTER] -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ [INVALID FOOTER]
RE: [Mav-user] Directory heirarchy when using Shunts Modes
I tried the code below. I can see the images at runtime, but not during design time. If I change the paths to see it at design time, then I can't see the images during runtime. head titleTest Page/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / link href=en/includes/screen_styles.css rel=stylesheet type=text/css media=screen/ link href=en/includes/print_styles.css rel=stylesheet type=text/css media=print/ /head ... table width=100% border=0 cellspacing=0 cellpadding=0 class=box1 tr td width=30 nowrapa href=http://www.lds.org; target=_topimg src=en/images/nav-small_christus.gif alt=The Church of Jesus Christ of Latter-day Saints border=0 width=30 height=20/a/td td width=100% nowrapa class=anchorHeader href=http://www.lds.org; title=The Church of Jesus Christ of Latter-day Saints target=_topThe Church of nobrJesus Christ/nobr of nobrLatter-day/nobr Saints/a/td td align=rightimg border=0 src=en/images/spacer.gif width=8 height=20/td td align=right nowrap valign=middle/td /tr /table Should I be using a transform to change the relative paths that Dreamweaver needs at design time to full paths that the browser needs at runtime? Maybe this is overkill, but I could use an XSLT to modify my Maverick.xml to include a default transform for all views that have *.vm files. This transform would change all the paths in the *.vm file to full paths. Please tell me that there's a better (and easier) way! :-) Thanks, Scott [EMAIL PROTECTED] 03/24/03 04:08PM Can you show an example of your vm files? I'm taking a wild guess at what you're trying to do here. Server-side includes will work with relative paths, however client-side includes won't. If you have a command something.m which includes a snippet of HTML like this: img src=images/foo.gif/ Then the browser is going to try to load the file /include/foo.gif - it has no idea how things are really structured on the backend. Your Japanese vm file needs to have a full path: img src=jp/images/foo.gif/ Does that explain the problem you're having? Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 9:12 PM To: [EMAIL PROTECTED] Subject: [Mav-user] Directory heirarchy when using Shunts Modes I am using Velocity + Maverick and Dreamweaver to create the *.vm files. I first developed my *.vm files in English. To better organize my files, I create various subdirectories for images and includes. Then I added the org.infohazard.maverick.shunt.LanguageShuntFactory and created resources for mode=jp (Japanese). I placed the en jp files under: context-/en/*.vm ||--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif ||--/includes/*.css |---/jp-/*.vm |--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif |--/includes/*.css Everything works fine during design time, but as expected, not when I deployed. The *.vm files did not see the files in the images and includes subdirectories. Is there any way to make this directory structure work when I deploy? As usual, thanks. Scott -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER] -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en [INVALID FOOTER]
[Mav-user] Accessing the Command string from the controller
Is there a way to access the command string from the controller? I'd like to create a generic controller that dispatches to handlers based on the command. I tried the param name=foo value=fee/ hoping to access this in the controller's perform() method from the ControllerContext.getParams(), but the getCtx() returned a null. Thanks, Scott -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER]
[Mav-user] Accessing the Command string from the controller - Correction
Some clarifications: 1) I'm looking to access the Command name ( command name=foo ... ). 2) Mis-wrote the last question - getCtx() works fine, but getParams() returned a null. [EMAIL PROTECTED] 03/21/03 12:37PM Is there a way to access the command string from the controller? I'd like to create a generic controller that dispatches to handlers based on the command. I tried the param name=foo value=fee/ hoping to access this in the controller's perform() method from the ControllerContext.getParams(), but the getCtx() returned a null. Thanks, Scott -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER] -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER]
RE: [Mav-user] Accessing the Command string from thecontroller- Correction
I found the problem. My original config file looked like this. command name=doSearch controller class=org.familysearch.prototypes.uiprototype2.ctl.Navigation/ param name=Command value=doSearch/ ... /command when it should have looked like this: command name=doSearch controller class=org.familysearch.prototypes.uiprototype2.ctl.Navigation param name=Command value=doSearch/ /controller ... /command Stupid mistake. I guess that's why I'm called a Newbie. -Scott [EMAIL PROTECTED] 03/21/03 04:09PM From: Scott Chun [mailto:[EMAIL PROTECTED] 1) I'm looking to access the Command name ( command name=foo ... ). Is it sufficient to examine the HttpServletRequest object available from the ControllerContext? 2) Mis-wrote the last question - getCtx() works fine, but getParams() returned a null. That's odd. Can I see your snippet of config file for the command? BTW, I recommend using the CVS copy of Maverick right now - the getParams() method has been renamed to getControllerParams(). Jeff Schnitzer [EMAIL PROTECTED] --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER] -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER]
[Mav-user] Directory heirarchy when using Shunts Modes
I am using Velocity + Maverick and Dreamweaver to create the *.vm files. I first developed my *.vm files in English. To better organize my files, I create various subdirectories for images and includes. Then I added the org.infohazard.maverick.shunt.LanguageShuntFactory and created resources for mode=jp (Japanese). I placed the en jp files under: context-/en/*.vm ||--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif ||--/includes/*.css |---/jp-/*.vm |--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif |--/includes/*.css Everything works fine during design time, but as expected, not when I deployed. The *.vm files did not see the files in the images and includes subdirectories. Is there any way to make this directory structure work when I deploy? As usual, thanks. Scott -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER]
[Mav-user] Tie transforms with shunts
Is it possible to select transforms with shunts? I'd like to apply a certain customzation to a view based on language or other factors. For example, I may want to change the options on a page based on user settings. Thanks -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en [INVALID FOOTER]
RE: [Mav-user] Newbie: Velocity + Maverick question
when I try http://localhost:8080/myproject/prototypes/uiprototype2/default.jsp I get: HTTP ERROR: 404 There is no such command prototypes/uiprototype2/welcome. RequestURI=/myproject/prototypes/uiprototype2/default.jsp [EMAIL PROTECTED] 03/12/03 12:51PM I'm sorry, I don't understand your question. Class files in myproject.war/WEB-INF/classes will automatically be found in your application's classpath. A class foo.Blah should be in the file WEB-INF/classes/foo/Blah.class. VM files (and JSP files, HTML files, etc) in the WAR will automatically be found at the path relative to the WAR. The path /yourcontext/prototype/uiprototype/yourfile.vm will be loaded from myproject.war/prototype/uiprototype/yourfile.vm. Are you getting some sort of error? Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 10:56 AM To: [EMAIL PROTECTED] Subject: RE: [Mav-user] Newbie: Velocity + Maverick question Thanks for the fix, but I'm still at a loss as to how to tell velocity and maverick where the class and vm files are. [EMAIL PROTECTED] 03/11/03 07:35PM You misspelled WEB-INF (note the dash, and if on a unix-based OS, the case is sensitive). Jeff -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 2:33 PM To: [EMAIL PROTECTED] Subject: [Mav-user] Newbie: Velocity + Maverick question I'm working on a prototype to learn Vellocity and Maverick. I what to deploy my test app to JBoss as follows: 1) JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\lib jdom.jar maverick.jar velocity-dep-1.3.1-r2.jar velocity-tools-view-0.6.jar 2) I modified my web.xml to include the Maverick and Velocity servlets. 3) My prototype jsp file (same as the friendbook-velocity example) is in: JBoss\server\default\deploy\myproject.ear\myproject.war\prototype\uiprot ot ype 4) My templates are in JBoss\server\default\deploy\myproject.ear\myproject.war\prototype\uiprot ot ype\templates 5) My class files are in: JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\classes\ or g\myproject\prototypes\uiprototype 6) The Maverick.xml file is in: JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\ How do I tell Maverick and Velocity where to find the class and vm files? Thanks in advance! Scott -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com [INVALID FOOTER] --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER] -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER] --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER] -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER]
RE: [Mav-user] Newbie: Velocity + Maverick question
That took care of finding welcome but now I get the following: 14:11:29,288 INFO [jbossweb] Velocity [error] ResourceManager : unable to find resource 'loginForm.vm' in any resource loader. 14:11:29,288 INFO [jbossweb] Velocity [error] #parse(): cannot find template 'loginForm.vm', called from template /prototypes/uiprototype2/welcome. vm at (15, 1) 14:11:29,298 INFO [jbossweb] Velocity [info] ResourceManager : found /prototypes/uiprototype2/trimOutside.vm with loader org.apache.velocity.tools .view.servlet.WebappLoader 14:11:29,298 INFO [jbossweb] Velocity [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = /prototypes/uiprotot ype2/trimOutside.vm [line 2,column 9] : $Id is not a valid reference. 14:11:29,308 INFO [jbossweb] Velocity [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = /prototypes/uiprotot ype2/trimOutside.vm [line 3,column 9] : $Source is not a valid reference. This application is just the opt-velocity example. Thanks again. Scott [EMAIL PROTECTED] 03/13/03 12:55PM My guess is that the content of your default.jsp is this: jsp:forward page=welcome.m/ This is a relative path, so the full path to default.jsp will be prepended to the welcome.m. Since you have no command prototypes/uiprototype2/welcome, you get 404. Try using an absolute path: jsp:forward page=/welcome.m/ Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 10:42 AM To: [EMAIL PROTECTED] Subject: RE: [Mav-user] Newbie: Velocity + Maverick question when I try http://localhost:8080/myproject/prototypes/uiprototype2/default.jsp I get: HTTP ERROR: 404 There is no such command prototypes/uiprototype2/welcome. RequestURI=/myproject/prototypes/uiprototype2/default.jsp [EMAIL PROTECTED] 03/12/03 12:51PM I'm sorry, I don't understand your question. Class files in myproject.war/WEB-INF/classes will automatically be found in your application's classpath. A class foo.Blah should be in the file WEB-INF/classes/foo/Blah.class. VM files (and JSP files, HTML files, etc) in the WAR will automatically be found at the path relative to the WAR. The path /yourcontext/prototype/uiprototype/yourfile.vm will be loaded from myproject.war/prototype/uiprototype/yourfile.vm. Are you getting some sort of error? Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 10:56 AM To: [EMAIL PROTECTED] Subject: RE: [Mav-user] Newbie: Velocity + Maverick question Thanks for the fix, but I'm still at a loss as to how to tell velocity and maverick where the class and vm files are. [EMAIL PROTECTED] 03/11/03 07:35PM You misspelled WEB-INF (note the dash, and if on a unix-based OS, the case is sensitive). Jeff -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 2:33 PM To: [EMAIL PROTECTED] Subject: [Mav-user] Newbie: Velocity + Maverick question I'm working on a prototype to learn Vellocity and Maverick. I what to deploy my test app to JBoss as follows: 1) JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\lib jdom.jar maverick.jar velocity-dep-1.3.1-r2.jar velocity-tools-view-0.6.jar 2) I modified my web.xml to include the Maverick and Velocity servlets. 3) My prototype jsp file (same as the friendbook-velocity example) is in: JBoss\server\default\deploy\myproject.ear\myproject.war\prototype\uiprot ot ype 4) My templates are in JBoss\server\default\deploy\myproject.ear\myproject.war\prototype\uiprot ot ype\templates 5) My class files are in: JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\classes\ or g\myproject\prototypes\uiprototype 6) The Maverick.xml file is in: JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\ How do I tell Maverick and Velocity where to find the class and vm files? Thanks in advance! Scott -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com [INVALID FOOTER
RE: [Mav-user] Newbie: Velocity + Maverick question
Thanks. I appreciate your time and efforts. I figured that was the problem, but being such a Newbie, I was not able to articulate it. The WAR file included in the examples worked fine, but my job is to make this prototype fit within an established architecture. Is there any materials on absolute/relative paths you can refer me to? Scott [EMAIL PROTECTED] 03/13/03 02:42PM This is the friendbook-velocity example? I'm afraid you can't just take a webapp and move all the templates around. There are various relative and absolute paths encoded in the templates and the maverick config file. Moving around the files will break things. If you want to reference files with a path like /prototypes/uiprototype2, you need to design your webapp around those paths. This is not a Maverick issue, it's a J2EE (and web) issue regarding the way that paths are resolved in WAR files. If you're new to J2EE development, I strongly recommend that you start with well-established design approaches - build your application as a WAR file and deploy it that way. Start by putting all templates at the root of the WAR instead of building a hierarchy. Don't try to create an expanded directory structure in JBoss. The ant buildfile for friendbook-velocity should be good to start with. Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 1:19 PM To: [EMAIL PROTECTED] Subject: RE: [Mav-user] Newbie: Velocity + Maverick question That took care of finding welcome but now I get the following: 14:11:29,288 INFO [jbossweb] Velocity [error] ResourceManager : unable to find resource 'loginForm.vm' in any resource loader. 14:11:29,288 INFO [jbossweb] Velocity [error] #parse(): cannot find template 'loginForm.vm', called from template /prototypes/uiprototype2/welcome. vm at (15, 1) 14:11:29,298 INFO [jbossweb] Velocity [info] ResourceManager : found /prototypes/uiprototype2/trimOutside.vm with loader org.apache.velocity.tools .view.servlet.WebappLoader 14:11:29,298 INFO [jbossweb] Velocity [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = /prototypes/uiprotot ype2/trimOutside.vm [line 2,column 9] : $Id is not a valid reference. 14:11:29,308 INFO [jbossweb] Velocity [warn] org.apache.velocity.runtime.exception.ReferenceException: reference : template = /prototypes/uiprotot ype2/trimOutside.vm [line 3,column 9] : $Source is not a valid reference. This application is just the opt-velocity example. Thanks again. Scott [EMAIL PROTECTED] 03/13/03 12:55PM My guess is that the content of your default.jsp is this: jsp:forward page=welcome.m/ This is a relative path, so the full path to default.jsp will be prepended to the welcome.m. Since you have no command prototypes/uiprototype2/welcome, you get 404. Try using an absolute path: jsp:forward page=/welcome.m/ Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 10:42 AM To: [EMAIL PROTECTED] Subject: RE: [Mav-user] Newbie: Velocity + Maverick question when I try http://localhost:8080/myproject/prototypes/uiprototype2/default.jsp I get: HTTP ERROR: 404 There is no such command prototypes/uiprototype2/welcome. RequestURI=/myproject/prototypes/uiprototype2/default.jsp [EMAIL PROTECTED] 03/12/03 12:51PM I'm sorry, I don't understand your question. Class files in myproject.war/WEB-INF/classes will automatically be found in your application's classpath. A class foo.Blah should be in the file WEB-INF/classes/foo/Blah.class. VM files (and JSP files, HTML files, etc) in the WAR will automatically be found at the path relative to the WAR. The path /yourcontext/prototype/uiprototype/yourfile.vm will be loaded from myproject.war/prototype/uiprototype/yourfile.vm. Are you getting some sort of error? Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 10:56 AM To: [EMAIL PROTECTED] Subject: RE: [Mav-user] Newbie: Velocity + Maverick question Thanks for the fix, but I'm still at a loss as to how to tell velocity and maverick where the class and vm files are. [EMAIL PROTECTED] 03/11/03 07:35PM You misspelled WEB-INF (note the dash, and if on a unix-based OS, the case is sensitive). Jeff -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 2:33 PM To: [EMAIL PROTECTED] Subject: [Mav-user] Newbie: Velocity + Maverick question I'm working on a prototype to learn Vellocity and Maverick. I what to deploy my test app to JBoss as follows: 1) JBoss\server\default\deploy\myproject.ear\myproject.war\web.inf\lib jdom.jar