Author Login
Post Reply
user Digest 1 Apr 2008 17:17:57 -0000 Issue 7954
Topics (messages 184874 through 184882):
Re: [S2] Logging Issues
184874 by: Laurie Harper
184880 by: Kelly Graus
Re: struts-dojo-plugin-2.1.0 and googlemaps-tags
184875 by: aj2r
Re: New to Struts
184876 by: Nils-Helge Garli Hegvik
184878 by: aum strut
Re: Servlet Exception While editing the values
184877 by: Laurie Harper
Struts2 and JavaScript localization
184879 by: Filippov, Andrey
184881 by: Chris Pratt
Re: Struts constants
184882 by: Matthew Seaborn
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_184874.ezm (zipped)You can't have log4j route exception errors to the log file if you don't
catch the exception and pass it to log4j... If you allow the exception
to propagate all the way up, it will be logged by the container. Short
story: if you want to control where something gets logged to, you need
to control how it is logged.
L.
Kelly.Graus wrote:
> Hello,
>
> I am writing an application using Struts (2.0.11), Spring (2.5.1), and
> Hibernate (3.2.6), running on Tomcat (6.0.13). We have a legacy webapp
> running on Tomcat that outputs some important information to the default
> Tomcat logs. We aren't really in a position to change that application, so
> we're trying to update our new webapp to put all messages in a different log
> file. I'm trying to do this using log4j (1.2.15).
>
> So far, I can add messages to the new log in my java code. I am also
> getting freemarker.cache debug messages in the new log. However, all other
> messages are still being put in the default Tomcat logs. For example, if
> the database I'm trying to access closes its connection and I don't catch
> the exception that is thrown, it gets printed to the screen, and put in the
> catalina log. I would like that exception to go in the new log file instead
> (and yes, eventually I will catch the exception and have struts display a
> nicer error message for the user).
>
> Below are the relevant parts of my web.xml, and my log4j.properties file.
> Any help would be greatly appreciated!
>
> Thanks!
>
> Kelly
>
>
> [web.xml]
> [snip]
> <context-param>
> <description>This context parameter specifies the name and location
> of the log4j properties file.</description>
> <param-name>log4jConfigLocation</param-name>
> <param-value>/WEB-INF/classes/log4j.properties</param-value>
> </context-param>
> <filter>
> <filter-name>struts2-cleanup</filter-name>
>
> <filter-class>
org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
> </filter>
> <filter>
> <filter-name>sitemesh</filter-name>
>
> <filter-class>
com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
> </filter>
> <filter>
> <filter-name>struts2</filter-name>
>
> <filter-class>
org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> </filter>
>
> <filter-mapping>
> <filter-name>struts2-cleanup</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>sitemesh</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> <listener>
>
> <listener-class>
org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
>
> <listener>
>
> <listener-class>
org.springframework.web.util.Log4jConfigListener</listener-class>
> </listener>
> [snip]
>
> [log4j.properties]
> log4j.rootLogger=DEBUG, rollingFileAppender
>
> # Rolling file Appender
> log4j.appender.rollingFileAppender=
org.apache.log4j.RollingFileAppender> log4j.appender.rollingFileAppender.File=${catalina.home}/logs/lessonDownloader.log
> log4j.appender.rollingFileAppender.MaxFileSize=1024KB
> log4j.appender.rollingFileAppender.MaxBackupIndex=10
> log4j.appender.rollingFileAppender.layout=
org.apache.log4j.PatternLayout> log4j.appender.rollingFileAppender.layout.ConversionPattern=%d %p [%c] -
> %m%n*
>
> # Control logging for other packages
> log4j.logger.org.apache.commons=WARN
> log4j.logger.org.apache.struts2=WARN
> log4j.logger.org.springframework=WARN
> log4j.logger.org.hibernate=WARN
> log4j.logger.org.apache.jasper=WARN
> log4j.logger.org.apache.catalina=WARN
> log4j.logger.com.opensymphony.xwork2=WARN
>

Attachment:
user_184880.ezm (zipped)Hi Laurie,
Thanks for the reply! I found the "swallowOutput" attribute in the
Tomcat context that caused the exceptions to be placed in my application
log. However, I'm now setting up global exception mapping in struts so I
can handle unexpected problems without showing the user a stack trace.
Making no changes other than adding a single global exception mapping
for
java.lang.Exception allows me to display a better error page to the
user, but from reading the documentation I would have though that this
would break my logging, since I didn't set the logEnabled property on
the exception interceptor to true. However, all logging seems to work
correctly. Do you know why this is?
Thanks!
Kelly
Laurie Harper wrote:
> You can't have log4j route exception errors to the log file if you
> don't catch the exception and pass it to log4j... If you allow the
> exception to propagate all the way up, it will be logged by the
> container. Short story: if you want to control where something gets
> logged to, you need to control how it is logged.
>
> L.
>
> Kelly.Graus wrote:
>> Hello,
>>
>> I am writing an application using Struts (2.0.11), Spring (2.5.1), and
>> Hibernate (3.2.6), running on Tomcat (6.0.13). We have a legacy webapp
>> running on Tomcat that outputs some important information to the default
>> Tomcat logs. We aren't really in a position to change that
>> application, so
>> we're trying to update our new webapp to put all messages in a
>> different log
>> file. I'm trying to do this using log4j (1.2.15).
>>
>> So far, I can add messages to the new log in my java code. I am also
>> getting freemarker.cache debug messages in the new log. However, all
>> other
>> messages are still being put in the default Tomcat logs. For
>> example, if
>> the database I'm trying to access closes its connection and I don't
>> catch
>> the exception that is thrown, it gets printed to the screen, and put
>> in the
>> catalina log. I would like that exception to go in the new log file
>> instead
>> (and yes, eventually I will catch the exception and have struts
>> display a
>> nicer error message for the user).
>>
>> Below are the relevant parts of my web.xml, and my log4j.properties
>> file. Any help would be greatly appreciated!
>>
>> Thanks!
>>
>> Kelly
>>
>>
>> [web.xml]
>> [snip]
>> <context-param>
>> <description>This context parameter specifies the name and
>> location
>> of the log4j properties file.</description>
>> <param-name>log4jConfigLocation</param-name>
>> <param-value>/WEB-INF/classes/log4j.properties</param-value>
>> </context-param>
>> <filter>
>> <filter-name>struts2-cleanup</filter-name>
>>
>> <filter-class>
org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
>>
>> </filter>
>> <filter>
>> <filter-name>sitemesh</filter-name>
>>
>> <filter-class>
com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
>>
>> </filter>
>> <filter>
>> <filter-name>struts2</filter-name>
>>
>> <filter-class>
org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>>
>> </filter>
>> <filter-mapping>
>> <filter-name>struts2-cleanup</filter-name>
>> <url-pattern>/*</url-pattern>
>> </filter-mapping>
>> <filter-mapping>
>> <filter-name>sitemesh</filter-name>
>> <url-pattern>/*</url-pattern>
>> </filter-mapping>
>> <filter-mapping>
>> <filter-name>struts2</filter-name>
>> <url-pattern>/*</url-pattern>
>> </filter-mapping>
>> <listener>
>>
>> <listener-class>
org.springframework.web.context.ContextLoaderListener</listener-class>
>>
>> </listener>
>> <listener>
>>
>> <listener-class>
org.springframework.web.util.Log4jConfigListener</listener-class>
>>
>> </listener>
>> [snip]
>>
>> [log4j.properties]
>> log4j.rootLogger=DEBUG, rollingFileAppender
>>
>> # Rolling file Appender
>> log4j.appender.rollingFileAppender=
org.apache.log4j.RollingFileAppender>> log4j.appender.rollingFileAppender.File=${catalina.home}/logs/lessonDownloader.log
>>
>> log4j.appender.rollingFileAppender.MaxFileSize=1024KB
>> log4j.appender.rollingFileAppender.MaxBackupIndex=10
>> log4j.appender.rollingFileAppender.layout=
org.apache.log4j.PatternLayout>> log4j.appender.rollingFileAppender.layout.ConversionPattern=%d %p [%c] -
>> %m%n*
>>
>> # Control logging for other packages
>> log4j.logger.org.apache.commons=WARN
>> log4j.logger.org.apache.struts2=WARN
>> log4j.logger.org.springframework=WARN
>> log4j.logger.org.hibernate=WARN
>> log4j.logger.org.apache.jasper=WARN
>> log4j.logger.org.apache.catalina=WARN
>> log4j.logger.com.opensymphony.xwork2=WARN
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_184875.ezm (zipped)
With debug="true" I receive the message "DEBUG: error downloading remote
script"
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184876.ezm (zipped)There is no shortcut to learning a new framework. I suggest buying a
couple of books and taking your time reading the documentation and
trying out the examples that are available. Search engines is also a
good way to find relevant information. Anything you need to get
started, both for Struts 1 and Struts 2, should be available at
http://struts.apache.org/
Nils-H
On Tue, Apr 1, 2008 at 11:59 AM, pavanbh <pavanbh2006@(protected):
>
> Hi All,
>
> I am new to struts and wana to learn it.Any help or suggestion in this
> regard is much appriciated.
> please help me
>
>
>
>
> Thanks,
> Pavan
>
>
>
> --
> View this message in context: http://www.nabble.com/New-to-Struts-tp14313460p16417500.html
>
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
>
>
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_184878.ezm (zipped)documentation is the best place to get started...
keep one thing do not read only try them side by side.
below are some of the others link which might help you.
http://www.wantii.com/wordpress/?p=9
http://www.roseindia.com
i hope these are the perfect starter.
-aum
On Tue, Apr 1, 2008 at 4:33 PM, Nils-Helge Garli Hegvik <nilsga@(protected)>
wrote:
> There is no shortcut to learning a new framework. I suggest buying a
> couple of books and taking your time reading the documentation and
> trying out the examples that are available. Search engines is also a
> good way to find relevant information. Anything you need to get
> started, both for Struts 1 and Struts 2, should be available at
> http://struts.apache.org/
>
> Nils-H
>
> On Tue, Apr 1, 2008 at 11:59 AM, pavanbh <pavanbh2006@(protected):
> >
> > Hi All,
> >
> > I am new to struts and wana to learn it.Any help or suggestion in this
> > regard is much appriciated.
> > please help me
> >
> >
> >
> >
> > Thanks,
> > Pavan
> >
> >
> >
> > --
> > View this message in context:
> http://www.nabble.com/New-to-Struts-tp14313460p16417500.html
> >
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> >
> >
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_184877.ezm (zipped)The exception is the result of something in your JSP -- probably a bug
in some of the embedded Java code. I would suggest:
1) wrapping the entire JSP with <% try{% > and <%} catch (Throwable t) {
t.printStackTrace(); }%> to isolate the problem
2) if that's not enough to solve it, start simplifying the JSP, until
you figure out which portion is causing the error
You should also consider replacing all the scriptlet and runtime
expression fragments with equivalent Struts or JSTL tags and/or moving
logic into your action.
L.
puneet duggal wrote:
> frnds when i have applied Validations on my form so when i submit My Form in Edit Mode after leaving one field Empty then it throws a servlet Exception
>
> heres My formbean:-
>
> <form-bean name="auditorMasterbean"
> type="
org.apache.struts.validator.LazyValidatorForm"
> scope="request">
>
> <form-property name="searchresult"
> type="
java.util.ArrayList"/>
> </form-bean>
>
> heres My action :-
>
>
> <action
> path="/update"
> type="updateaudit"
> input="/EditAuditor.jsp"
> name="auditorMasterbean"
> scope="request"
> validate="true">
> <forward name="success" path="/auditormaster.jsp?a=1"/>
> <forward name="failure" path="/pages/AddAuditor.jsp"/>
>
> </action>
>
>
>
>
> <html>
> <head>
> <%@(protected)" %>
> <%@(protected)" %>
>
> <LINK href="css/StyleSheet.css" type=text/css rel=stylesheet>
> <title>Add Auditor</title>
> </head>
> <body>
> <html:form action="update">
> <%
> if(request.getParameter("a")!=null) {
> if((Integer.parseInt(request.getParameter("a")))==1 ) {
> %>
> <p class="savemsg"><FONT COLOR="green"><B>RECORD SAVED</B></FONT>
> <%
> }else if((Integer.parseInt(request.getParameter("a")))==0){
> %>
> <FONT color="red"><B> Error !Try Again</B></FONT></p>
> <%
> }else if((Integer.parseInt(request.getParameter("a")))==3){
> %>
> <FONT color="red"><B>Auditor Name Already Exist</B></FONT></p>
> <%
> }
> }
> %>
> <%
> String s= request.getParameter("id");
> %>
> <table width="90%" align="center">
> <tr>
> <th id="Pageheader" align="left">Edit Auditor </th></tr>
> <tr>
> <td>
> <table width="100%" align="center">
> <tr>
> <td>
> <div id="divPersonal">
> <div id="PType" style="font-size: 11px; width: 100%; font-family: verdana">
> </div>
> </div>
> <div id="divOthers">
> <div id="OType" style="font-size: 11px; width: 797; font-family: verdana; height: 346">
> <fieldset>
> <legend>Auditor Detail </legend>
> <html:hidden property="ids" value="<%=s%>"/>
> <%
>
java.util.ArrayList l=(
java.util.ArrayList)session.getAttribute("searchresult");
> session.setAttribute("l",l);
> %>
>
> <logic:iterate id="result" name="l">
>
>
> <logic:equal name="result" property="id" value="<%=s%>">
> <table width="814" align="center">
> <tr>
> <td align="right" width="303" colspan="">
> Name
> <span id="Label40" style="display:inline-block;color:Red;height:10px;width:3px;">*</span></td>
> <td width="202" style="height: 26px" >
>
> <html:text name="result" property="Nam" maxlength="50" styleId="tbxnames" tabindex="1" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20"/></td>
>
> <td width="295" style="height: 26px" >
> <html:errors property="Nam"/> </td>
> </tr>
> <tr>
> <td align="right" width="303" colspan="">
> <span id="Label9">Address 1</span>
> <span id="Label29" style="display:inline-block;color:Red;height:10px;width:3px;">*</span></td>
> <td width="202" style="height: 26px" >
> <html:text name="result" property="Address1" maxlength="50" styleId="tbxAddress1" tabindex="2" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
>
> <td width="295" style="height: 26px" >
> <html:errors property="Address1"/></td>
>
> </tr>
> <tr>
> <td align="right" style="height: 17px" width="303">
> <span id="Label10">Address 2</span></td>
> <td style="height: 17px" width="202" >
> <html:text name="result" property="Address2" maxlength="50" styleId="tbxAddress2" tabindex="3" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
>
> <td style="height: 17px" width="295" >
> </td>
>
> </tr>
> <tr>
> <td align="right" style="height: 17px" width="303">
> <span id="Label10">Address 3</span></td>
> <td style="height: 17px" width="202" >
> <html:text name="result" property="Address3" maxlength="50" styleId="tbxAddress3" tabindex="4" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
>
> <td style="height: 17px" width="295" >
> </td>
>
> </tr>
> <tr>
> <td align="right" style="height: 22px" width="303">
> City
> <span id="Label31" style="display:inline-block;color:Red;height:10px;width:3px;">*</span>
> </td><td style="height: 22px" width="202" >
> <html:text name="result" property="City" maxlength="50" styleId="ab" tabindex="5" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
> <td style="height: 22px" width="295" >
> <html:errors property="City"/></td>
>
> </tr>
> <tr>
> <td align="right" style="height: 21px" width="303"> Pincode<span id="Label32" style="display:inline-block;color:Red;height:10px;width:3px;">*</span>
> </td>
> <td style="height: 21px" width="202">
> <html:text name="result" property="Pincode" maxlength="6" styleId="tbxpincode" tabindex="6" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
> <td style="height: 21px" width="295">
> <html:errors property="Pincode"/></td>
> </tr>
>
> <tr>
> <td align="right" style="height: 31px" width="303" >
> <span id="Label41">State</span><span id="Label33" style="display:inline-block;color:Red;height:10px;width:3px;">*</span></td>
> <td align="left" style="height: 31px" width="202">
>
> <html:select name="result" property="stat" tabindex="7" size="1">
> <html:option value="Andaman and Nicobar Islands">Andaman and Nicobar Islands</html:option>
> <html:option value="Andhra Pradesh">Andhra Pradesh</html:option>
> <html:option value="Arunachal Pradesh">Arunachal Pradesh</html:option>
> <html:option value="Assam">Assam</html:option>
> <html:option value="Bihar">Bihar</html:option>
> <html:option value="Chandigarh">Chandigarh</html:option>
> <html:option value="Chattisgarh">Chattisgarh</html:option>
> <html:option value="Dadra And NagarHaveli">Dadra And NagarHaveli</html:option>
> <html:option value="Daman And Diu">Daman And Diu</html:option>
> <html:option value="Delhi">Delhi</html:option>
> <html:option value="Goa">Goa</html:option>
> <html:option value="Gujrat">Gujrat</html:option>
> <html:option value="Harayana">Harayana</html:option>
> <html:option value="Himachal Pradesh">Himachal Pradesh</html:option>
> <html:option value="Jammu And Kashmir">Jammu And Kashmir</html:option>
> <html:option value="Jharkhand">Jharkhand</html:option>
> <html:option value="Karnataka">Karnataka</html:option>
> <html:option value="Kerala">Kerala</html:option>
> <html:option value="Lakshadweep">Lakshadweep</html:option>
> <html:option value="Manipur">Manipur</html:option>
> <html:option value="Madhya Pradesh">Madhya Pradesh</html:option>
> <html:option value="Maharashtra">Maharashtra</html:option>
> <html:option value="Meghalaya">Meghalaya</html:option>
> <html:option value="Mizoram">Mizoram</html:option>
> <html:option value="Nagaland">Nagaland</html:option>
> <html:option value="Orissa">Orissa</html:option>
> <html:option value="Pondicherry">Pondicherry</html:option>
> <html:option value="Punjab">Punjab</html:option>
> <html:option value="Rajasthan">Rajasthan</html:option>
> <html:option value="Sikkim">Sikkim</html:option>
> <html:option value="TamilNadu">TamilNadu</html:option>
> <html:option value="Tripura">Tripura</html:option>
> <html:option value="uttarPradesh">uttarPradesh</html:option>
> <html:option value="Uttranchal">Uttranchal</html:option>
> </html:select>
> </td>
>
> <td align="left" style="height: 31px" width="295">
> </td>
>
> </tr>
>
>
> <tr>
> <td align="right" style="height: 31px" width="303" >
> Membership Info</td>
> <td align="left" style="height: 31px" width="202">
> <html:text name="result" property="Membershipinfo" maxlength="50" styleId="tbxCity0" tabindex="8" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
>
> <td align="left" style="height: 31px" width="295">
> </td>
>
> </tr>
>
>
> <tr>
> <td align="right" style="height: 31px" width="303" >
> PAN
> <span id="Label35" style="display:inline-block;color:Red;height:10px;width:3px;">*</span></td>
> <td align="left" style="height: 31px" width="202">
> <html:text name="result" property="Pan" maxlength="16" styleId="tbx" tabindex="9" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
>
>
> <td align="left" style="height: 31px" width="295">
> <html:errors property="Pan"/></td>
>
>
> </tr>
> </logic:equal>
> </logic:iterate>
>
>
> <tr>
> <td align="right" style="height: 31px" width="303" >
> </td>
> <td align="left" style="height: 31px" width="202"> </td>
>
> <td align="left" style="height: 31px" width="295"> </td>
>
> </tr>
>
>
> </table>
>
>
>
> <div id="ValidationSummary2" style="color:Red;width:377px;display:none;">
> </div>
> <p> </p>
> </fieldset>
> </div>
> </div>
> </td>
> </tr>
> </table>
> </td>
> </tr>
> <tr>
> <td align="left"><html:link action="page1">Back</html:link></td>
> </tr>
> <tr align="right">
> <td><hr>
> <p>
> <html:submit/>
> <input id="btnCancel" style="font-weight: bold; font-size: 11px; width: 120px; color: white; font-family: verdana; height: 20px; border-style: none; background-color: #630000" tabIndex="22" type="reset" value="Cancel" name="btnCancel"></td>
> </tr>
> </table>
> </html:form>
> </body>
> </html>
>
> So when i submit this form leaving a field blank it through a servlet exception but it works fine if i dont leave a fiied blank csee below the exception:-
>
> exception
> javax.servlet.ServletException at
org.apache.struts.chain.ComposableRequestProcessor.process (
ComposableRequestProcessor.java:283) at
org.apache.struts.action.ActionServlet.process (
ActionServlet.java:1858) at
org.apache.struts.action.ActionServlet.doPost (
ActionServlet.java:459) at
javax.servlet.http.HttpServlet.service (
HttpServlet.java:716) at
javax.servlet.http.HttpServlet.service (
HttpServlet.java:809) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:200) at
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:146) at
org.apache.catalina.core.StandardWrapperValve.invoke (
StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPi
> peline.java:596) at
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:433) at
org.apache.catalina.core.ContainerBase.invoke (
ContainerBase.java:948) at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve
>
>
>
> root cause
> org.apache.jasper.JasperException at
org.apache.jasper.servlet.JspServletWrapper.service (
JspServletWrapper.java:207) at
org.apache.jasper.servlet.JspServlet.serviceJspFile (
JspServlet.java:240) at
org.apache.jasper.servlet.JspServlet.service (
JspServlet.java:187) at
javax.servlet.http.HttpServlet.service (
HttpServlet.java:809) at
org.apache.catalina.core.ApplicationDispatcher.invoke (
ApplicationDispatcher.java:627) at
org.apache.catalina.core.ApplicationDispatcher.doForward (
ApplicationDispatcher.java:382) at
org.apache.catalina.core.ApplicationDispatcher.forward (
ApplicationDispatcher.java:306) at org.apache.struts.chain.commands.servlet.PerformForward
>
>
>
> ---------------------------------
> Yahoo! for Good helps you make a difference

Attachment:
user_184879.ezm (zipped)Hello everybody,
I have a javascript dropdown calendar on one of my struts2 jsp. I have
bi-lingual application. So I need to read bundle files to switch
language. Please, does someone know how to use these files in
javascript.
Here is my js snippet:
<script language="JavaScript" type="text/JavaScript">
window.onload = function(){bscal.init()}
var bscal = {
left : 0,
top : 0,
width: 0,
height: 0,
format: "%d.%m.%Y",
wds : new
Array("%{getText('bscal_day1')}","tue","wen","thu","fri","sat","sun"),
...
The way like this "%{getText('bscal_day1')} (like on jsp) does not work.
I appreciate your help.
Best regards, Filippov Andrey

Attachment:
user_184881.ezm (zipped)You'd have to put that expression in a tag that can process it. Try
something like:
wds : new Array('<s:property
value="%{getText('bscal_day1')}"/>',"tue","wen","thu","fri","sat","sun"),
(*Chris*)
On Tue, Apr 1, 2008 at 6:40 AM, Filippov, Andrey
<andrey.filippov@(protected):
> Hello everybody,
>
>
>
>
>
> I have a javascript dropdown calendar on one of my struts2 jsp. I have
> bi-lingual application. So I need to read bundle files to switch
> language. Please, does someone know how to use these files in
> javascript.
>
>
>
> Here is my js snippet:
>
>
>
> <script language="JavaScript" type="text/JavaScript">
>
> window.onload = function(){bscal.init()}
>
> var bscal = {
>
> left : 0,
>
> top : 0,
>
> width: 0,
>
> height: 0,
>
> format: "%d.%m.%Y",
>
>
>
> wds : new
> Array("%{getText('bscal_day1')}","tue","wen","thu","fri","sat","sun"),
>
> ...
>
>
>
> The way like this "%{getText('bscal_day1')} (like on jsp) does not work.
>
>
>
> I appreciate your help.
>
>
>
> Best regards, Filippov Andrey
>
>

Attachment:
user_184882.ezm (zipped)What I meant was if the following is defined in the struts.xml
<constant name="struts.url.includeParams" value="none" />
How does that make it to the URLTag#setIncludeParams method and how can make our own constants?
From: Martin Gainty [mailto:mgainty@(protected)]
Sent: 28 March 2008 00:09
To: Matthew Seaborn
Subject: Re: Struts constants
given the following operationMode param in struts.xml:
<action name="resubmitApplication" class="
org.apache.struts2.showcase.validation.SubmitApplication">
<interceptor-ref name="store">
<param name="operationMode">RETRIEVE</param>
</interceptor-ref>
Java class
com.opensymphony.xwork2.ActionInvocation mockActionInvocation = org.easymock.EasyMock.createControl().createMock(
com.opensymphony.xwork2.ActionInvocation.class);
org.apache.struts2.interceptor.MessageStoreInterceptor interceptor = new
org.apache.struts2.interceptor.MessageStoreInterceptor();
String operationMode = interceptor.getRequestOperationMode(mockActionInvocation);
HTH
M-
----- Original Message -----
From: Matthew Seaborn<mailto:Matthew.Seaborn@(protected)>
To: 'Struts Users Mailing List'<mailto:user@(protected)>
Sent: Thursday, March 27, 2008 2:09 PM
Subject: Struts constants
How can you get hold of the constants defined in the struts.xml?
Matthew Seaborn
Software Architect
t +44(0) 208 484 0729
m +44(0) 7949 465 142
e matthew.seaborn@performgroup.com<mailto:matthew.seaborn@(protected)>
[cid:image001.jpg@(protected)]
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/
________________________________________________________________________
CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system.
SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence.
VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient's responsibility to ensure that email is virus free.
AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group.
COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278.
________________________________________________________________________
CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system.
SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence.
VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipients responsibility to ensure that email is virus free.
AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group.
COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278.