[OT] How to retrieve a session attribute in Applet

2003-10-29 Thread Vernon Smith

I need to access a session attribute in Applet. Since it can't  be passed into Applet 
as a parameter from a JSP file, I need to figure out a way to retrieve it. 

Thanks for your inputs.

Vernon 



FREE ADHD DVD or CD-Rom (your choice) - click here!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
AOL users go here: 
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda2.com/1/c/563632/131726/311392/311392
This offer applies to U.S. Residents Only

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Anyone still use the layout component ?

2003-10-11 Thread Vernon Smith

I didn't see my reply shown up on this mail list. I post it again as the followings.

Thanks Ted for your response.

To my knowledge, the Tiles and the component serve the same functionality but doing 
thing differently. I am not sure what your compatible mean here. In regarding of 
i18n, the Tiles forces us to use the a set of JSP files per locale approach while the 
one doesn't. We can't afford to use the approach since we don't have enough man power 
to maintain a large set of JSP files.

The problem we have with the component is the TC tag pool configuration must be false 
at TC 4.1 up to 5.0 beta. According to the TC online document, the cause very likely 
is on the tag implementation. We need to find out what need to be fixed.

Any suggestions?

Thanks,

v.
--

- Original Message -

DATE: Wed, 08 Oct 2003 20:58:39
From: Ted Husted [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: 

Tiles was designed to be backwardly compatible, so it's liable to drop 
right in you want to migrate.

HTH, Ted.

Vernon Smith wrote:

 Anyone out there still use the layout component, the one before the Tile? Any usage 
 problem on Tomcat 4.1.x up? I believe it was contributed by David Geary. 
 
 Thanks,
 
 
 
 
 Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
 http://login.mail.lycos.com/r/referral?aid=27005
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
Ted Husted,
   Junit in Action  - http://www.manning.com/massol/,
   Struts in Action - http://husted.com/struts/book.html,
   JSP Site Design  - http://www.amazon.com/exec/obidos/ISBN=1861005512.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Anyone still use the layout component ?

2003-10-11 Thread Vernon Smith
Thanks very much Craig for you response.


To my knowledge, the Tiles and the component serve the same functionality but doing 
thing differently. I am not sure what your compatible mean here. In regarding of 
i18n, the Tiles forces us to use the a set of JSP files per locale approach while 
the one doesn't. We can't afford to use the approach since we don't have enough man 
power to maintain a large set of JSP files.
  

I don't see why you are drawing this conclusion.  The individual pages 
produced via Tiles can be localized by the same mechanisms as non-Tiles 
and non-Template pages (such as using the bean:message tag to look up 
localized text in a resource bundle).


We use the JSTL fmt tag to retrieve locale messages/strings, but not the 
bean:message tag. Last time, that was about eight,nine months ago, we had spent a 
quite chunk of time testing out Tiles on localization. The Tiles didn't work with the 
resource bundle approach. In response of our question, the Tiles creator stated that 
the Tiles could be used in i18n with the different JSP files per locale approach. 

The problem, I recall, is that Tiles cachs a single locale region content of a JSP 
file in the server. When a user access the same JSP file with a different locale, what 
s/he gets isn't a page with the desired locale but the one cached on the server.

I also had experienced different language regions shown up on a page due to the 
mechanism. I don't know whether this Tiles mechanism has been changed or not in the 
past some months. 


The problem we have with the component is the TC tag pool configuration must be 
false at TC 4.1 up to 5.0 beta. According to the TC online document, the cause very 
likely is on the tag implementation. We need to find out what need to be fixed.
  

The Tiles implementation included in Struts 1.1, like all the other 
Struts 1.1 tag libraries, should run fine with tag instance pooling enabled.

The component I indicated here is the layout component by David Geary, not Tiles.




Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Anyone still use the layout component ?

2003-10-08 Thread Vernon Smith

Anyone out there still use the layout component, the one before the Tile? Any usage 
problem on Tomcat 4.1.x up? I believe it was contributed by David Geary. 

Thanks,




Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Anyone still use the layout component ?

2003-10-08 Thread Vernon Smith
Thanks Ted for your response.

What do you mean by compatible, however? To my knowledge, the two components do 
thing differently, although they serve the same functionality. In terms of an i18n 
solution, the Tile forces us to use one set of jsp files per locale approach, while 
the other one doesn't. We can't use the Tile, even though we like to since we don't 
have the manpower to maintain a large set of jsp files. We have no choice, but stay 
away from Tile.

The problem we run into with the component is that the tag pool setting in the server 
configuration has to be false on  TC 4.1 up to TC 5.0. The tag implementation seems 
not quite right somewhere in the component. We need to find out where the source is to 
resolve the issue. 


BTW, we had raised the Tile i18n approach issue before in this mailing list. The 
author argued (harshly) that is not a Tile issue. (Who's problem then?)


Thanks,

v.
--

- Original Message -

DATE: Wed, 08 Oct 2003 20:58:39
From: Ted Husted [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: 

Tiles was designed to be backwardly compatible, so it's liable to drop 
right in you want to migrate.

HTH, Ted.

Vernon Smith wrote:

 Anyone out there still use the layout component, the one before the Tile? Any usage 
 problem on Tomcat 4.1.x up? I believe it was contributed by David Geary. 
 
 Thanks,
 
 
 
 
 Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
 http://login.mail.lycos.com/r/referral?aid=27005
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
Ted Husted,
   Junit in Action  - http://www.manning.com/massol/,
   Struts in Action - http://husted.com/struts/book.html,
   JSP Site Design  - http://www.amazon.com/exec/obidos/ISBN=1861005512.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JavaServer Faces

2003-10-08 Thread Vernon Smith
This question indeed has be asked before. JSF only covers the frontend portion of an 
application, namingly the V and C. The Struts addresses more development issues.
 
An article on integration Struts and JSF recently appears on the developerWork(IBM) 
web (if my memory is correct). That is to say you can use the two together.

Hope this helps.

--

- Original Message -

DATE: Thu, 9 Oct 2003 11:19:59 
From: Andrew Hill [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: 

I reckon Craig might know a wee little bit about that ;-)
Why not search the archive and see what he has said about it.
  -Original Message-
  From: Horky Adam G A1C 805 CSPTS/SCBE [mailto:[EMAIL PROTECTED]
  Sent: Thursday, 9 October 2003 03:28
  To: [EMAIL PROTECTED]
  Subject: JavaServer Faces


  Does anyone know enough about Struts and JavaServer Faces to provide an
opinion about the superiority of one over the other?





  A1C Adam G Horky

  Application Development Programmer, SCBE

  (618)256-2300








Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Please help a Tiles problem

2003-04-05 Thread Vernon
, Vernon [EMAIL PROTECTED] 
wrote:

Thanks very much for your information, Cedric.

I have read through the Tiles related articles linked to the Struts-Tiles 
page, and have not seen the plug in procedure for standalone usage. A 
plugin procedure, I find, is on the following page 
http://www.onjava.com/pub/a/onjava/excerpt/progjakstruts_14/index2.html. 
It is about Struts. I don't use Struts however. How I initialize the 
Tiles?

On Fri, 04 Apr 2003 10:12:48 +0200, Cedric Dumoulin [EMAIL PROTECTED] 
wrote:

The error message says that the definition factory is not found. Have 
you initialized the tile plugin ?

Cedric

Vernon wrote:

1. The error message:

root cause

javax.servlet.ServletException: Can't get definitions factory from 
context.
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533) 







at org.apache.jsp.page_jsp._jspService(page_jsp.java:189)

2. The translated JSP file

public void _jspService(HttpServletRequest request, HttpServletResponse 
response)
throws java.io.IOException, ServletException {

JspFactory _jspxFactory = null;
javax.servlet.jsp.PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType(text/html;charset=ISO-8859-1);
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write(\r\n);
out.write(\r\n);
out.write(\r\n\r\n);
if (_jspx_meth_c_if_0(pageContext))
return;
out.write(\r\n);
if (_jspx_meth_c_if_1(pageContext))
return;
// ...
out.write(\r\n);
if (_jspx_meth_c_if_37(pageContext))
return;
out.write(\r\n\r\n\r\n\r\n\r\n\r\n\r\n);
out.write(\r\n\r\n);
if (_jspx_meth_tiles_insert_0(pageContext))
return;
} catch (Throwable t) {
out = _jspx_out;
if (out != null  out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);  line 
189
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
3. The JSP file with the definitions

% taglib prefix=tiles uri=/WEB-INF/tlds/struts-tiles.tld %
% taglib prefix=c uri=/WEB-INF/tlds/c.tld %
c:if test=${empty applicationScope.FRONT}
tiles:definition id=FRONT template=/jsp/templates/myLayout.jsp
put name=title  value=Front Page /
put name=header value=/jsp/signon/header.jsp /
put name=footer value=/jsp/homepage/footer.jsp /
put name=body   value=/jsp/frontpage/content.jsp /
/tiles:definition
/c:if
c:if test=${empty applicationScope.SIGNON}
tiles:definition id=SIGNON extends=FRONT
put name=title  value=Sign On /
put name=body   value=/jsp/signon/content.jsp /
/tiles:definition
/c:if
!--

--
If I erase all defintions, but keep the first one, the attributes 
wouldn't loaded.

The Tiles is from http://www.lifl.fr/~dumoulin/tiles/.

I don't have any JSP debugging tool. Can someone please tell me where 
is wrong or how to find out the cause.

Vernon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Vernon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Please help a Tiles problem

2003-04-05 Thread Vernon
Where the plug-in configuration shall go? I don't use Struts, but Tiles 
only. According to the document on tiles-documentation.war, the 
TilesServlet shall be used, if my understanding is correct.

On Sat, 05 Apr 2003 16:45:59 -0700, David Graham [EMAIL PROTECTED] 
wrote:

I noticed in your debug output that you're using TilesServlet.  Are you 
using Struts 1.1?  You don't need the TilesServlet; all you need is to 
configure the TilesPlugin.

plug-in className=org.apache.struts.tiles.TilesPlugin 
set-property property=definitions-config
value=/WEB-INF/tiles-defs.xml/
/plug-in
David


From: Vernon [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Please help a Tiles problem
Date: Sat, 05 Apr 2003 15:23:14 -0800
I start getting quite frustrated on this issue after a few days of 
researching on the Tiles home page, Tiles Struts home page, Struts email 
archive, the tiles-documentation.war, and google on Tiles. The whole 
development is stop at this point.

I have read somewhere at the email archive: it is not need to process 
the initialition if the definition is stored in a JSP file, which is the 
case I posted my previous post.

I change the definition method, using a xml file instead. After having a 
xml file and modification of web.xml, I get the logging message when I 
start/reload the applicaiton:

8242 DEBUG [main] org.apache.struts.tiles.xmlDefinition.I18nFactorySet   
(I18n
FactorySet.java:301) - definitions={FRONT={name=FRONT, 
path=/jsp/templates/mmSig
nUpLayout.jsp, role=null, controller=null, controllerType=null, 
controllerInstan
ce=null, attributes={footer=/jsp/homepage/footer.jsp, title=Front Page, 
header=/
jsp/signon/header.jsp, body=/jsp/frontpage/content.jsp}}
}
8282 DEBUG [main] org.apache.struts.tiles.xmlDefinition.I18nFactorySet   
(I18n
FactorySet.java:305) - factory loaded : {FRONT={name=FRONT, 
path=/jsp/templates/
mmSignUpLayout.jsp, role=null, controller=null, controllerType=null, 
controllerI
nstance=null, attributes={footer=/jsp/homepage/footer.jsp, title=Front 
Page, hea
der=/jsp/signon/header.jsp, body=/jsp/frontpage/content.jsp}}
}
8292 DEBUG [main] org.apache.struts.tiles.xmlDefinition.I18nFactorySet   
(I18n
FactorySet.java:269) - default factory:{FRONT={name=FRONT, 
path=/jsp/templates/m
mSignUpLayout.jsp, role=null, controller=null, controllerType=null, 
controllerIn
stance=null, attributes={footer=/jsp/homepage/footer.jsp, title=Front 
Page, head
er=/jsp/signon/header.jsp, body=/jsp/frontpage/content.jsp}}
}
8302 DEBUG [main] org.apache.struts.tiles.xmlDefinition.I18nFactorySet   
(I18n
FactorySet.java:217) - Factory initialized from file '/WEB-INF/tiles- 
defs.xml'.
8312 INFO  [main]  org.apache.struts.tiles.TilesServlet 
(TilesServlet.java:1
17) - Tiles Factory successfully loaded

The definition seems in place. However, when I point to the url of a 
page, I get the following error messages:

java.lang.NullPointerException
	at 
org.apache.struts.taglib.tiles.InsertTag.processName(InsertTag.java:527)
	at 
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:486)
	at 
org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:444)
	at org.apache.jsp.page_jsp._jspx_meth_tiles_insert_0(page_jsp.java:73)
	at org.apache.jsp.page_jsp._jspService(page_jsp.java:52)
...

And in the translated JSP Java file, there is

public void _jspService(HttpServletRequest request, HttpServletResponse 
response)
throws java.io.IOException, ServletException {

JspFactory _jspxFactory = null;
javax.servlet.jsp.PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType(text/html;charset=ISO-8859-1);
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write(\r\n\r\n);
if (_jspx_meth_tiles_insert_0(pageContext))   === line 52
return;
} catch (Throwable t) {
out = _jspx_out;
if (out != null  out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
private boolean _jspx_meth_tiles_insert_0(javax.servlet.jsp.PageContext 
pageContext)
throws Throwable {
JspWriter out = pageContext.getOut();
/*   tiles:insert  */
org.apache.struts.taglib.tiles.InsertTag _jspx_th_tiles_insert_0 = 
(org.apache.struts.taglib.tiles.InsertTag) 
_jspx_tagPool_tiles_insert_name_flush.get(org.apache.struts.taglib.tiles.InsertTag.class) 



;
_jspx_th_tiles_insert_0.setPageContext(pageContext);
_jspx_th_tiles_insert_0.setParent

Re: Please help a Tiles problem

2003-04-04 Thread Vernon
Thanks very much for your information, Cedric.

I have read through the Tiles related articles linked to the Struts-Tiles 
page, and have not seen the plug in procedure for standalone usage. A 
plugin procedure, I find, is on the following page 
http://www.onjava.com/pub/a/onjava/excerpt/progjakstruts_14/index2.html. It 
is about Struts. I don't use Struts however. How I initialize the Tiles?

On Fri, 04 Apr 2003 10:12:48 +0200, Cedric Dumoulin [EMAIL PROTECTED] 
wrote:

The error message says that the definition factory is not found. Have you 
initialized the tile plugin ?

Cedric

Vernon wrote:

1. The error message:

root cause

javax.servlet.ServletException: Can't get definitions factory from 
context.
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533) 



at org.apache.jsp.page_jsp._jspService(page_jsp.java:189)

2. The translated JSP file

public void _jspService(HttpServletRequest request, HttpServletResponse 
response)
throws java.io.IOException, ServletException {

JspFactory _jspxFactory = null;
javax.servlet.jsp.PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType(text/html;charset=ISO-8859-1);
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write(\r\n);
out.write(\r\n);
out.write(\r\n\r\n);
if (_jspx_meth_c_if_0(pageContext))
return;
out.write(\r\n);
if (_jspx_meth_c_if_1(pageContext))
return;
// ...
out.write(\r\n);
if (_jspx_meth_c_if_37(pageContext))
return;
out.write(\r\n\r\n\r\n\r\n\r\n\r\n\r\n);
out.write(\r\n\r\n);
if (_jspx_meth_tiles_insert_0(pageContext))
return;
} catch (Throwable t) {
out = _jspx_out;
if (out != null  out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);  line 
189
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
3. The JSP file with the definitions

% taglib prefix=tiles uri=/WEB-INF/tlds/struts-tiles.tld %
% taglib prefix=c uri=/WEB-INF/tlds/c.tld %
c:if test=${empty applicationScope.FRONT}
tiles:definition id=FRONT template=/jsp/templates/myLayout.jsp
put name=title  value=Front Page /
put name=header value=/jsp/signon/header.jsp /
put name=footer value=/jsp/homepage/footer.jsp /
put name=body   value=/jsp/frontpage/content.jsp /
/tiles:definition
/c:if
c:if test=${empty applicationScope.SIGNON}
tiles:definition id=SIGNON extends=FRONT
put name=title  value=Sign On /
put name=body   value=/jsp/signon/content.jsp /
/tiles:definition
/c:if
!--

--
If I erase all defintions, but keep the first one, the attributes 
wouldn't loaded.

The Tiles is from http://www.lifl.fr/~dumoulin/tiles/.

I don't have any JSP debugging tool. Can someone please tell me where is 
wrong or how to find out the cause.

Vernon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Vernon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Build the Tiles

2003-04-03 Thread Vernon
Hi, all,

I need to use the Tiles as a standalone component in my project. I am new to Tiles in 
less than on week. I follow the chapter 11, Developing applications with Tiles, of 
Struts in Action to set up Tiles. I run into a couple of problem and hope someone 
can give me a hand.

The tiles.jar file I get from Cedric Dumoulln's site, which was built in the last 
Noverber. But the all common libraries are the most recent releases. I think the old 
build might cause those problem. 

After uploaded the rc1 source base, I only can see the Tiles installation, but not 
compiling and archive Tiles. Can I build Tile from the source? If yes, how I can do it?

Thanks for your helps.

Vernon





Please help a Tiles problem

2003-04-03 Thread Vernon
1. The error message:

root cause

javax.servlet.ServletException: Can't get definitions factory from context.
	at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
	at org.apache.jsp.page_jsp._jspService(page_jsp.java:189)

2. The translated JSP file

 public void _jspService(HttpServletRequest request, HttpServletResponse 
response)
   throws java.io.IOException, ServletException {

   JspFactory _jspxFactory = null;
   javax.servlet.jsp.PageContext pageContext = null;
   HttpSession session = null;
   ServletContext application = null;
   ServletConfig config = null;
   JspWriter out = null;
   Object page = this;
   JspWriter _jspx_out = null;
   try {
 _jspxFactory = JspFactory.getDefaultFactory();
 response.setContentType(text/html;charset=ISO-8859-1);
 pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
 application = pageContext.getServletContext();
 config = pageContext.getServletConfig();
 session = pageContext.getSession();
 out = pageContext.getOut();
 _jspx_out = out;
 out.write(\r\n);
 out.write(\r\n);
 out.write(\r\n\r\n);
 if (_jspx_meth_c_if_0(pageContext))
   return;
 out.write(\r\n);
 if (_jspx_meth_c_if_1(pageContext))
   return;
// ...
 out.write(\r\n);
 if (_jspx_meth_c_if_37(pageContext))
   return;
 out.write(\r\n\r\n\r\n\r\n\r\n\r\n\r\n);
 out.write(\r\n\r\n);
 if (_jspx_meth_tiles_insert_0(pageContext))
   return;
   } catch (Throwable t) {
 out = _jspx_out;
 if (out != null  out.getBufferSize() != 0)
   out.clearBuffer();
 if (pageContext != null) pageContext.handlePageException(t);  
line 189
   } finally {
 if (_jspxFactory != null) 
_jspxFactory.releasePageContext(pageContext);
   }
   3. The JSP file with the definitions

% taglib prefix=tiles uri=/WEB-INF/tlds/struts-tiles.tld %
% taglib prefix=c uri=/WEB-INF/tlds/c.tld %
c:if test=${empty applicationScope.FRONT}
   tiles:definition id=FRONT template=/jsp/templates/myLayout.jsp
   put name=title  value=Front Page /
   put name=header value=/jsp/signon/header.jsp /
   put name=footer value=/jsp/homepage/footer.jsp /
   put name=body   value=/jsp/frontpage/content.jsp /
   /tiles:definition
/c:if
c:if test=${empty applicationScope.SIGNON}
   tiles:definition id=SIGNON extends=FRONT
   put name=title  value=Sign On /
   put name=body   value=/jsp/signon/content.jsp /
   /tiles:definition
/c:if
!--

--
If I erase all defintions, but keep the first one, the attributes wouldn't 
loaded.

The Tiles is from http://www.lifl.fr/~dumoulin/tiles/.

I don't have any JSP debugging tool. Can someone please tell me where is 
wrong or how to find out the cause.

Vernon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: RE: re. i18n

2002-10-25 Thread Vernon Wu

To my knowledge, there are two ways to set up locale. One is to use the container's 
configuration setting for 
application. The other is to have an application itself session locale attribute. The 
Struts as well as the PetStore use the 
second approach. The locale setting can be changed inside of the container by either 
calling Config.set method for the 
first approach, or reset the locale variable value,

session.setAttribute(org.apache.struts.action.Action.LOCALE_KEY,newLocale);

for the Struts case for the second approach.

The statement, ?locale is unchangeable during a session? is still not true even in 
Struts. Does your code also 
demonstrate locale resetting?
 

10/22/2002 8:15:28 AM, Russ Bonsall [EMAIL PROTECTED] wrote:


Vernon,

The last time I checked the Pet Store application does not use Struts.  If
you look at the Struts source code you will find that the user's locale is
stored in session and is later used when reconciling which message resources
to use.  Look at the processLocale() method from the RequestProcessor below
(very similar to the processLocale() in ActionServlet for 1.0.2).


Jeff, 

It appears you are doing everything right.  I think you're right in saying
there is something small that you're missing.  You shouldn't need to change
any localization settings through Control Panel.  The browser setting is
what is sent with your request.  I'm sorry I couldn't be of more help.

Russ


protected void processLocale(HttpServletRequest request,
 HttpServletResponse response) {

// Are we configured to select the Locale automatically?
if (!appConfig.getControllerConfig().getLocale()) {
return;
}

// Has a Locale already been selected?
HttpSession session = request.getSession();
if (session.getAttribute(Action.LOCALE_KEY) != null) {
return;
}

// Use the Locale returned by the servlet container (if any)
Locale locale = request.getLocale();
if (locale != null) {
if (log.isDebugEnabled()) {
log.debug( Setting user locale ' + locale + ');
}
session.setAttribute(Action.LOCALE_KEY, locale);
}

}

-Original Message-
From: Vernon Wu [mailto:vernonw;gatewaytech.com]
Sent: Monday, October 21, 2002 4:30 PM
To: [EMAIL PROTECTED]
Subject: re. i18n



I saw the following statement in today mail archive.

   Also keep in mind that the locality is stored in session.  This
means you
   cannot switch languages while using the same session.  The best way
to test
   is by setting your language, close and reopen your browser.

This statement is not true. The Pet Store allows users change the locale
anywhere in the middle of session. You can 
test out yourself by driving a demo version from 
http://developer.java.sun.com/developer/technicalArticles/J2EE/deployathon3/

BTW, the locale information management, including changing locale method,
demonstrated in the latest version PS is 
not the best way by today's standard. Take a look at JSP/JSTL articales on
onjava.com by Hans Bergsten.

Hope this helps.

Vernon







--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




re. i18n

2002-10-21 Thread Vernon Wu

I saw the following statement in today mail archive.

Also keep in mind that the locality is stored in session.  This means you
cannot switch languages while using the same session.  The best way to test
is by setting your language, close and reopen your browser.

This statement is not true. The Pet Store allows users change the locale anywhere in 
the middle of session. You can 
test out yourself by driving a demo version from 
http://developer.java.sun.com/developer/technicalArticles/J2EE/deployathon3/

BTW, the locale information management, including changing locale method, demonstrated 
in the latest version PS is 
not the best way by today's standard. Take a look at JSP/JSTL articales on onjava.com 
by Hans Bergsten.

Hope this helps.

Vernon



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




A better practice: environment entry vs. initialization parameter?

2002-10-20 Thread Vernon Wu


A few of email addresses needed to be accessed from time to time in my current 
project. They can be definited either as 
initialization parameters or environment entries. I can see some pros and cons of 
those two implementations. Do 
someone have  some experience with those two implementation for a heavy loaded 
application?

Thanks for sharing your informaiton.

Vernon



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: Book Opinions

2002-10-20 Thread Vernon Wu
Nat,

I am thinking about walking the opposite direction as you do. After playing about the 
Pet Market from Macromedia MX, I 
wish my Java Web application have the degree of rich UI. You might be able to tell me 
how to add the MX on the top 
of Struts, or similar MVC Java web application: replaying JSP, the V with MX, also 
the V with least possible work.

I don't know any Struts books out there. But you shall be able to find tons of on-line 
tutorial in the subject. Remember 
Google is yor friend. One book I can recommend is Advanced JaveServer Pages by 
David Geary. The frameworks 
introduced in the book are very similar with those in Struts, including MVC one.

If you want to write back, please send to my email address.

Regards,

Vernon  

10/20/2002 9:32:49 PM, Nat Papovich [EMAIL PROTECTED] wrote:

Hello All -

I'm a recent addition to this list, while I begin learning Struts. Not only am I
beginning to learn Struts, I'm beginning to learn all things Java.

I come from a ColdFusion/Fusebox background, but as a leader in that
community, I have secretly wanted more structure from a framework, along with
transitioning to a more robust web language. Fusebox also does an incomplete,
kludgy job dealing with MVC, of which I am fond.

I'm quickly getting knee-deep in many resources, and am burning through my old
to be read book collection of OO programming and JSP (working on Bruce Eckel's
Thinking in Java now). I consider myself to be well-versed in OO, very
comfortable with structured programming (structured meaning well-designed in
this case, not opposed to OO), but being a huge proponent of ColdFusion's
leading framework, I recognize the importance of starting off on the right foot
in my J2EE adventure (and think Struts is that right foot).

That exhaustive background was meant to help you fine folks make book
recommendations for me. I have bookmarked and visit some of the excellent online
resources for Struts and Java, but I'm the kind of guy who likes to spend money,
have something bound, with a glossy cover, sitting on my desk - it's like a
security blanket to me.

So of the apparently excellent titles either currently available or
soon-to-be-released, which one should I start with? Undoubtedly, I will acquire
another, and another, but for now... ?

Thanks,
NAT

Nat Papovich
Senior Partner  Lead Architect
Fusium, Inc.
503-913-1659
Buy the book: http://fusium.com/go/book


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org






--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: RE: How can I get a value from a Javascript for a formbean?

2002-10-03 Thread Vernon Wu

Hi, Mark,

Thanks for sharing your code.

I haven't use Javascript a lot and am sort of figuring out how the JavaScript code 
works: the data will be stored in the 
formbean after the submit button is clicked. It will great appreciated if you can 
elabourate how it works with a formbean.

Regards,

Vernon

10/3/2002 5:42:19 AM, Galbreath, Mark [EMAIL PROTECTED] wrote:

Use the attached JavaScript file for your codebase and call the appropriate
function based on the user's action (onChange(), delete, submite, etc.).
It's self-evident what values need to be passed.

Mark

-Original Message-
From: Vernon Wu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 02, 2002 9:42 PM
To: [EMAIL PROTECTED]
Subject: How can I get a value from a Javascript for a formbean?


I have two selected lists in a form. The data in the second list will change
accordingly when the selected item in the first 
list is changed. My question is how to get the second selected item for the
formbean. I use a framworks similar with 
Struts. Here is the code segment:

  select name=field01 onchange=SetField02()
option %= Pform.field01SelectionAttr(-1) % value=-1-1/option
option %= Pform.field01SelectionAttr(0) % value=00/option
option %= Pform.field01SelectionAttr(1) % value=11/option
option %= Pform.field01SelectionAttr(2) % value=22/option
  /select
  select name=field02
   option value=0 selected /option 
  /select

script language=javascript

function SetField02(){
   //...   
   return ;
}

/script



--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




How can I get a value from a Javascript for a formbean?

2002-10-02 Thread Vernon Wu

I have two selected lists in a form. The data in the second list will change 
accordingly when the selected item in the first 
list is changed. My question is how to get the second selected item for the formbean. 
I use a framworks similar with 
Struts. Here is the code segment:

  select name=field01 onchange=SetField02()
option %= Pform.field01SelectionAttr(-1) % value=-1-1/option
option %= Pform.field01SelectionAttr(0) % value=00/option
option %= Pform.field01SelectionAttr(1) % value=11/option
option %= Pform.field01SelectionAttr(2) % value=22/option
  /select
  select name=field02
option value=0 selected /option 
  /select

script language=javascript

function SetField02(){
//...   
return ;
}

/script



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: RE: RE: The right place/time to clean up a session before sessiontim e out, or user logoff

2002-09-24 Thread Vernon Wu


Jason,

Your solution covers the log off case. How about session time out, say, a user leave a 
page of the application and 
browse another site. There isn't log off action in this case. 

 
9/23/2002 7:31:36 PM, Miller, Jason [EMAIL PROTECTED] wrote:





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




User Notification

2002-09-23 Thread Vernon Wu

I need to implement a message system, sort like email but inside the Java web 
application only for its users. After one 
user, A, sends a message to another, B, B shall be notified to retrieve the updated 
messages if B is on line. I plan to 
implement messages as stored in a DOM. My question is how the notification shall be 
implemented.  I only use a web 
container, and considering to add in a JMS server for IM.

Any suggestions?

Thanks,

Vernon



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




The right place/time to clean up a session before session time out,or user logoff

2002-09-23 Thread Vernon Wu

In order to keep track of who is online, I need to keep a list of on line users. When 
a user sign in, which can have more 
than one routes, an account information object is created. The class implements the 
HttpSessionBindingListener 
interface. The user id is added into the list in the valueBound method. 

I would like to have a single one place to remove the user id from the list when user 
sign out, or session time out. The 
valueUnbound method is not a good place since the session is invalidated already when 
the invalidate method is 
called. The sessionDestroyed method of the HttpSessionListener interface isn't a right 
place neither.

Any suggestions?





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: User Notification

2002-09-23 Thread Vernon Wu


I want to have a better implementaiton over unnecessary DB access. That is the reason 
I would like to use a 
notification mechanism. 


9/23/2002 2:41:05 PM, Eddie Bush [EMAIL PROTECTED] wrote:

Sounds like a simple DB-lookup to me.  You aren't going to update the 
client until they refresh at page at least.  You'd just have to include 
something that polled for new messages in each page you wanted them to 
receive notification.  I'm not familiar with what you mean by stored as 
a DOM or the implications of that, so maybe this is a bad suggestion ;-)

Vernon Wu wrote:

I need to implement a message system, sort like email but inside the Java web 
application only for its users. After one 
user, A, sends a message to another, B, B shall be notified to retrieve the updated 
messages if B is on line. I plan to 
implement messages as stored in a DOM. My question is how the notification shall be 
implemented.  I only use a web 
container, and considering to add in a JMS server for IM.

Any suggestions?

Thanks,

Vernon


-- 
Eddie Bush




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: RE: The right place/time to clean up a session before session time out, or user logoff

2002-09-23 Thread Vernon Wu


I have tried something similar with yours: a object stored in the session and with a 
HttpSessionBindingListener 
implementation. When the invalidate method is called in the logoff action, it is too 
late for the valueUnbound method to 
retrieve anything from the session since it is invalid already.

9/23/2002 2:56:58 PM, Miller, Jason [EMAIL PROTECTED] wrote:





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: User Notification

2002-09-23 Thread Vernon Wu


I don't follow you. Can you explain with more details?

9/23/2002 3:55:04 PM, Eddie Bush [EMAIL PROTECTED] wrote:

Yeah you could persist it to a DB though and show the message from the 
DB when they ask to do that... and just rely on your 
session-manager-thingie for notification.

James Higginbotham wrote:

Ok, then you could use JMS to store a message in a topic and check for
it on each request to show the user an indicator if a message exists.
But, unless you turn off persistence for the topic, you will be using a
DB on the backend anyway. And a query against a DB on a field that is
indexed (such as the userid) would be very fast. 

The other option (assuming you are using only 1 server or have sticky
sessions in place) is to create a session manager that you store these
messages in a list, stored in a hash keyed by user id. It would probably
be a singleton within the app server's VM. You would then check this
manager on each request and show the indicator/message as appropriate.
Just attach a session listener so that when the user's session times out
or you kill it forcefully, your session manager will drop any existing
messages. Course, this isn't persistent so if the user isn't signed in,
they will never get the message (thus, see option 1 and previous posts
to this list). 

James


-- 
Eddie Bush




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Struts vs. JSTL for i18n

2002-09-23 Thread Vernon Wu


That can't be true since JSTL comes after the Struts tag library. 

What is your definition of easier? 

9/23/2002 4:22:21 PM, Matt Raible [EMAIL PROTECTED] wrote:

It seems that Struts makes it much easier to do i18n than JSTL.  Please
correct me if I'm wrong.

Struts = bean:message key=index.title/

JSTL = 
  fmt:bundle basename=org.roller.presentation.AppResources
   fmt:message key=index.title/
  /fmt:bundle

Thanks,

Matt


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: RE: User Notification

2002-09-23 Thread Vernon Wu


What else would you suggest? 

The reason I am thinking about use DOM is that messages are stored in a XML format in 
DB since the number of 
messages can vary. The XML format data needs to be parsed either SAX or DOM. If DOM 
parsing is too slow, SAX 
parsing into a collection object is a way to get around.

   
9/23/2002 3:03:49 PM, Galbreath, Mark [EMAIL PROTECTED] wrote:

I hope he means stored as an XML doc.  Parsing DOMs are notoriously slow.

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 5:41 PM

Sounds like a simple DB-lookup to me.  You aren't going to update the 
client until they refresh at page at least.  You'd just have to include 
something that polled for new messages in each page you wanted them to 
receive notification.  I'm not familiar with what you mean by stored as 
a DOM or the implications of that, so maybe this is a bad suggestion ;-)

Vernon Wu wrote:

I need to implement a message system, sort like email but inside the Java
web application only for its users. After one 
user, A, sends a message to another, B, B shall be notified to retrieve the
updated messages if B is on line. I plan to 
implement messages as stored in a DOM. My question is how the notification
shall be implemented.  I only use a web 
container, and considering to add in a JMS server for IM.

Any suggestions?

Thanks,

Vernon


-- 
Eddie Bush




--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: RE: RE: The right place/time to clean up a session before sessiontim e out, or user logoff

2002-09-23 Thread Vernon Wu

Jason,

Now, I see what you're doing here. Rather than calling the session invalidate method 
in the log off, you call the method 
to clean up the session. That is some thought. I, however, think there shall be a more 
straight forward solution than 
twise thing around by the servlet desing.

Thanks for explaining your solution.

Vernon
 
9/23/2002 7:31:36 PM, Miller, Jason [EMAIL PROTECTED] wrote:





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]