﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-andyj2ee-随笔分类-b/s integration</title><link>http://www.blogjava.net/andyj2ee/category/853.html</link><description>java tec sky</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 11:57:47 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 11:57:47 GMT</pubDate><ttl>60</ttl><item><title>利用scomp 生成指定package java jar 包命令</title><link>http://www.blogjava.net/andyj2ee/archive/2006/02/14/30631.html</link><dc:creator>java光环</dc:creator><author>java光环</author><pubDate>Tue, 14 Feb 2006 08:23:00 GMT</pubDate><guid>http://www.blogjava.net/andyj2ee/archive/2006/02/14/30631.html</guid><wfw:comment>http://www.blogjava.net/andyj2ee/comments/30631.html</wfw:comment><comments>http://www.blogjava.net/andyj2ee/archive/2006/02/14/30631.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/andyj2ee/comments/commentRss/30631.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/andyj2ee/services/trackbacks/30631.html</trackback:ping><description><![CDATA[scomp -out weather.jar weather_latlong.xsd&nbsp; myconfig.xsdconfig<BR><BR>Compiles a schema into XML Bean classes and metadata.<BR>Usage: scomp [opts] [dirs]* [schema.xsd]* [service.wsdl]* [config.xsdconfig]*<BR>Options include:<BR>&nbsp;&nbsp;&nbsp; -cp [a;b;c] - classpath<BR>&nbsp;&nbsp;&nbsp; -d [dir] - target binary directory for .class and .xsb files<BR>&nbsp;&nbsp;&nbsp; -src [dir] - target directory for generated .java files<BR>&nbsp;&nbsp;&nbsp; -srconly - do not compile .java files or jar the output.<BR>&nbsp;&nbsp;&nbsp; -out [xmltypes.jar] - the name of the output jar<BR>&nbsp;&nbsp;&nbsp; -dl - permit network downloads for imports and includes (default is off)<BR>&nbsp;&nbsp;&nbsp; -noupa - do not enforce the unique particle attribution rule<BR>&nbsp;&nbsp;&nbsp; -nopvr - do not enforce the particle valid (restriction) rule<BR>&nbsp;&nbsp;&nbsp; -noann - ignore annotations<BR>&nbsp;&nbsp;&nbsp; -novdoc - do not validate contents of &lt;documentation&gt;<BR>&nbsp;&nbsp;&nbsp; -compiler - path to external java compiler<BR>&nbsp;&nbsp;&nbsp; -javasource [version] - generate java source compatible for a Java version (1.4 or 1.5)<BR>&nbsp;&nbsp;&nbsp; -ms - initial memory for external java compiler (default '8m')<BR>&nbsp;&nbsp;&nbsp; -mx - maximum memory for external java compiler (default '256m')<BR>&nbsp;&nbsp;&nbsp; -debug - compile with debug symbols<BR>&nbsp;&nbsp;&nbsp; -quiet - print fewer informational messages<BR>&nbsp;&nbsp;&nbsp; -verbose - print more informational messages<BR>&nbsp;&nbsp;&nbsp; -version - prints version information<BR>&nbsp;&nbsp;&nbsp; -license - prints license information<BR>&nbsp;&nbsp;&nbsp; -allowmdef "[ns] [ns] [ns]" - ignores multiple defs in given namespaces (use ##local for no-namespace)<BR>&nbsp;&nbsp;&nbsp; -catalog [file] -&nbsp; catalog file for org.apache.xml.resolver.tools.CatalogResolver. (Note: needs resolver.jar from <A href="http://xml.apache">http://xml.apache</A><BR>.org/commons/components/resolver/index.html)<BR><img src ="http://www.blogjava.net/andyj2ee/aggbug/30631.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/andyj2ee/" target="_blank">java光环</a> 2006-02-14 16:23 <a href="http://www.blogjava.net/andyj2ee/archive/2006/02/14/30631.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Avoiding "Do you want to resend information" browser messages</title><link>http://www.blogjava.net/andyj2ee/archive/2005/04/04/2837.html</link><dc:creator>java光环</dc:creator><author>java光环</author><pubDate>Mon, 04 Apr 2005 08:24:00 GMT</pubDate><guid>http://www.blogjava.net/andyj2ee/archive/2005/04/04/2837.html</guid><wfw:comment>http://www.blogjava.net/andyj2ee/comments/2837.html</wfw:comment><comments>http://www.blogjava.net/andyj2ee/archive/2005/04/04/2837.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/andyj2ee/comments/commentRss/2837.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/andyj2ee/services/trackbacks/2837.html</trackback:ping><description><![CDATA[<!--StartFragment -->&nbsp;This might be a minor thing but significantly improves the user experience. The problem usually happens when the update action forwards to the view action. Instead of doing a redirect. This means the user sees /editPerson.action in the address field of the browser. But he is really looking at /viewPerson.action. This means that if he presses reload he will resubmit the data. It also means the user can navigate back to the /editPerson.action by using the back and forward buttons or the browser history.&nbsp;<BR><BR><!--StartFragment --> To avoid this you can use the <A href="http://www.theserverside.com/articles/article.tss?l=RedirectAfterGet">PRG (Post, Redirect and Get) Pattern</A>. It can be summarized as follows:&nbsp;<BR><!--StartFragment --> 
<P><B>Never show pages in response to POST<BR>Always load pages using GET<BR>Navigate from POST to GET using REDIRECT<BR></B></P>Using the PRG approach removes this possibility by never showing the /editPerson.action to the user. This means he cannot navigate back to the page in any way. In this case it means a redirect between the editPerson action (update action) and the viewPerson action (view action). 
<P></P>It is easily implemented in Webwork by using the redirect result type. The final mapping of editPerson and viewPerson looks like this. <BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">action&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="editPerson"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;class</SPAN><SPAN style="COLOR: #0000ff">="example.EditPersonAction"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">result&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="success"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="redirect"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="location"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">/viewPerson.action?id=${userId}</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">param</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">param&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="parse"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">true</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">param</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">result</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">result&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="invalid.token"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">/duplicate_post.vm</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">result</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">interceptor-ref&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="defaultStack"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">interceptor-ref&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="token"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">action</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">action&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="viewPerson"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;class</SPAN><SPAN style="COLOR: #0000ff">="example.ViewPersonAction"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">result&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="success"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">/view_person.vm</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">result</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">interceptor-ref&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="defaultStack"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">action</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV></DIV><!--StartFragment --> One thing to notice is the OGNL expression in the location (/viewPerson.action?id=${userId}) This means Webwork will evaluate the expression at runtime and replace ${userId}. In this case it is taken directly from a request parameter. 
<P>In Struts you would have to manually code the redirect as far as I know. </P><img src ="http://www.blogjava.net/andyj2ee/aggbug/2837.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/andyj2ee/" target="_blank">java光环</a> 2005-04-04 16:24 <a href="http://www.blogjava.net/andyj2ee/archive/2005/04/04/2837.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Preventing Duplicate Logins with Acegi Security </title><link>http://www.blogjava.net/andyj2ee/archive/2005/03/25/2432.html</link><dc:creator>java光环</dc:creator><author>java光环</author><pubDate>Fri, 25 Mar 2005 03:42:00 GMT</pubDate><guid>http://www.blogjava.net/andyj2ee/archive/2005/03/25/2432.html</guid><wfw:comment>http://www.blogjava.net/andyj2ee/comments/2432.html</wfw:comment><comments>http://www.blogjava.net/andyj2ee/archive/2005/03/25/2432.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/andyj2ee/comments/commentRss/2432.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/andyj2ee/services/trackbacks/2432.html</trackback:ping><description><![CDATA[Acegi Security sure makes things a lot simpler (once you have it
setup). Today on the AppFuse mailing list, I noticed a link to <a href="http://forum.springframework.org/viewtopic.php?t=4289">how to prevent duplicate logins</a>. No code needed, just some configuration changes. <em>Nice!</em><br>
<br>

<strong>Update:</strong> I tried this on AppFuse and it does work, but
I don't like the default implemementation. If a user is already logged
in, you can't log in with that same user until the initial session
times out. I'd prefer the first session gets invalidated when the
second login is made. What's your preference?<img src ="http://www.blogjava.net/andyj2ee/aggbug/2432.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/andyj2ee/" target="_blank">java光环</a> 2005-03-25 11:42 <a href="http://www.blogjava.net/andyj2ee/archive/2005/03/25/2432.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Developing Test-Driven Web Applications with Spring and Hibernate</title><link>http://www.blogjava.net/andyj2ee/archive/2005/03/25/2423.html</link><dc:creator>java光环</dc:creator><author>java光环</author><pubDate>Fri, 25 Mar 2005 01:43:00 GMT</pubDate><guid>http://www.blogjava.net/andyj2ee/archive/2005/03/25/2423.html</guid><wfw:comment>http://www.blogjava.net/andyj2ee/comments/2423.html</wfw:comment><comments>http://www.blogjava.net/andyj2ee/archive/2005/03/25/2423.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/andyj2ee/comments/commentRss/2423.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/andyj2ee/services/trackbacks/2423.html</trackback:ping><description><![CDATA[<p>
<font size="-1">One of the hardest parts about J2EE development is
getting started. There is an immense amount of open source tools for
web app development. Making a decision on which technologies to use can
be tough--actually beginning to use them can be even more difficult. </font></p>


<p><font size="-1">Once you've decided to use Struts and Hibernate, how
do you go about implementing them? If you look on the Hibernate site or
the Struts site, you'll probably have a hard time finding any
information on integrating the two. What if you want to throw Spring
into the mix? For developers, one of the best ways to learn is by
viewing sample apps and tutorials that explain how to extend those
applications. In order to learn (and remember) how to integrate open
source technologies such as Hibernate, Spring, Struts, and Ant/XDoclet,
Raible created AppFuse. </font></p>


<p><font size="-1">The beauty of AppFuse is you can actually get
started with Hibernate, Spring, and Struts without even knowing much
about them. Using test-driven development, AppFuse and its tutorials
will show you how to develop a J2EE web application quickly and
efficiently.</font></p>
<img src ="http://www.blogjava.net/andyj2ee/aggbug/2423.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/andyj2ee/" target="_blank">java光环</a> 2005-03-25 09:43 <a href="http://www.blogjava.net/andyj2ee/archive/2005/03/25/2423.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>