[OT] Installer for java projects

2003-11-19 Thread Carlos Sanchez
Can anyone tell me about a good installer for java projects (better if it's
free)

Don't mind if it's only for windows



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



RE: Help with URL localization (continued)

2003-10-21 Thread Carlos Sanchez
Maybe you can extend the request processor, see the url of the asked page,
update it with the localized url and redirect the user to that page

 -Mensaje original-
 De: Ruth, Brice [mailto:[EMAIL PROTECTED] 
 Enviado el: martes, 21 de octubre de 2003 17:41
 Para: Struts Users Mailing List
 Asunto: Help with URL localization (continued)
 
 
 Greetings.
 
 As per my previous thread on the best way to create a URL 
 structure like:
 
 http://domain/us/whatever
 http://domain/de/whatever
 etc.
 
 I've implemented the recommendations I received and now have a Filter 
 listening to each request and setting the locale 
 appropriately based on 
 the country code specified in the URL. Working great :) I 
 also have the 
 .jsp I'm working with mapped to an action with a path like 
 /us/index.do.
 
 Now, within this index page, I have links in my navigation, being 
 generated by the Struts HTML tags (html:link) - how would I best go 
 about incorporating the country URL prefix (/us/, /de/, /fr/, etc.) 
 without manually having to insert something like bean:write 
 name=locale property=country/ - also, instead of setting up an 
 action for each .jsp, for each language (/us/index.do; /de/index.do; 
 /us/crafts/crafts.do; /de/crafts/crafts.do; etc.) - what's a 
 better way 
 of doing this? Can I create an action using 
 org.apache.struts.actions.ForwardAction that uses a wildcard? So 
 something like /*/index.do would have a parameter of /index.jsp and 
 /*/crafts/crafts.do would have a parameter of /crafts/crafts.jsp.
 
 I'm looking for guidance - best way of accomplishing my goals of 
 code-reuse, ease-of-maintenance, as well as being able to provide the 
 flexibility in URL naming that marketing would like to see.
 
 Thanks,
 Brice
 
 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.
 
 
 
 -
 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]



RE: DynaActionForms

2003-10-13 Thread Carlos Sanchez
yourdynaform.set(propertyname,propertyvalue);

 -Mensaje original-
 De: Edgar P Dollin [mailto:[EMAIL PROTECTED] 
 Enviado el: lunes, 13 de octubre de 2003 19:35
 Para: Struts Users Mailing List
 Asunto: DynaActionForms
 
 
 I have an application with configuration files already.  
 Rather than have struts-config configure DynaForms, I would 
 like to populate the forms myself.
 
 Does anyone have any experience with how this behaves in struts?
 
 Thanks
 
 Edgar
 
 -
 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]



RE: [OT] Is JSTL in action update for Struts 1.1

2003-10-12 Thread Carlos Sanchez
Struts doesn't use JSTL, you can use JSTL + Struts to make your web app.

JSTL in action is a great book, with a good reference. 

I've read mainly the fmt tags section and I liked this more in another great
book Core JSTL: Mastering the JSP Standard Tag Library by David M. Geary 


 -Mensaje original-
 De: Marco Tedone [mailto:[EMAIL PROTECTED] 
 Enviado el: domingo, 12 de octubre de 2003 11:45
 Para: Struts-user-list
 Asunto: [OT] Is JSTL in action update for Struts 1.1
 
 
 Hi, now that JSTL and Struts-el are the main technologies in 
 Struts, I was wondering whether 'JSTL in Action' is updated 
 with the JSTL version used by Struts. Did anyone read this 
 book? Could anyone give me her impression about it?
 
 Have a nice sunday,
 
 Marco
 
 
 
 
 -
 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]



RE: redirect problem

2003-10-10 Thread Carlos Sanchez
You can extend RequestProcessor using a intercepting filter pattern for
preprocessing
(http://java.sun.com/blueprints/patterns/InterceptingFilter.html), so you
don't have to check the session in every jsp.



public class MyRequestProcessor extends RequestProcessor {

PreProcessingFilter firstPreProcessingFilter;

public MyRequestProcessor() {

firstPreProcessingFilter =
new SessionPreProcessingFilter(
new AuthenticationPreProcessingFilter(null));

}

protected ActionForward processActionPerform(
HttpServletRequest request, HttpServletResponse response,
Action action, ActionForm form, ActionMapping mapping) throws
IOException, ServletException {

ActionForward actionForward = firstPreProcessingFilter.process(
request, response, action, form, mapping);

if (actionForward == null) {
return super.processActionPerform(request, response, action,
  form, mapping);
} else {
return actionForward;
}

}

}



/**
 * A base clase for all preprocessing filters. Usually, concrete filters
only
 * need to provide an implementation of codedoProcess/code.
 */
public abstract class PreProcessingFilter {

private PreProcessingFilter nextFilter;

public PreProcessingFilter(PreProcessingFilter nextFilter) {
this.nextFilter = nextFilter;
}

/**
 * Calls upon codedoProcess/code, and if necessary, continues to
call
 * codeprocess/code on the next filter.
 */
public ActionForward process(HttpServletRequest request,
 HttpServletResponse response, Action
action,
 ActionForm form,
 ActionMapping mapping) throws IOException,
ServletException {

ActionForward actionForward = null;

/* Process this filter. */
actionForward = doProcess(request, response, action, form, mapping);

/* Process next filter in the chain. */
if ((actionForward == null)  (nextFilter != null)) {
return nextFilter.process(request, response, action, form,
mapping);
} else {
return actionForward;
}

}

/**
 * Does the processing of this filter.
 *
 * @return codenull/code if the next filter must be processed; an
 * codeActionForward/code otherwise
 */
protected abstract ActionForward doProcess(HttpServletRequest request,
   HttpServletResponse response,
   Action action, ActionForm
form,
   ActionMapping mapping) throws
IOException, ServletException,
InternalErrorException;
}





 -Mensaje original-
 De: koen boutsen [mailto:[EMAIL PROTECTED] 
 Enviado el: viernes, 10 de octubre de 2003 13:32
 Para: Struts Users Mailing List
 Asunto: redirect problem
 
 
 Hi
 If my httpsession is invalid, I want to send the user to the 
 logon page.  I tried it in different ways, but get an error 
 everytime I tried it like this : (sessionIsValid is a 
 attribute in the session. If this attribute is null, it means 
 that my session does no longer exist).
 
 
 logic:notPresent name=sessionIsValid scope=session 
 logic:forward name=/sessionTimedOut/ /logic:notPresent
 
 
 This is the error I get :
 javax.servlet.jsp.JspException: Exception redirecting for 
 name /sessionTimedOut: java.lang.IllegalStateException
 [10/10/03 13:08:25:033 CEST] 5355efea SystemErr R 
 at 
 org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.
 java:164)
 [10/10/03 13:08:25:033 CEST] 5355efea SystemErr R 
 at org.apache.jsp._specialCode1._jspService(_specialCode1.java:164)
 [10/10/03 13:08:25:033 CEST] 5355efea SystemErr R 
 at 
 com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJs
 pBase.java:89)
 [10/10/03 13:08:25:033 CEST] 5355efea SystemErr R 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 [10/10/03 13:08:25:043 CEST] 5355efea SystemErr R 
 at 
 com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapp
 er.service(JspServlet.java:344)
 [10/10/03 13:08:25:043 CEST] 5355efea SystemErr R 
 at 
 com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(
 JspServlet.java:598)
 [10/10/03 13:08:25:043 CEST] 5355efea SystemErr R 
 
 Thanks for any help.
 
 Koen
 
 
 
 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: redirect problem

2003-10-10 Thread Carlos Sanchez
In struts-config.xml
controller processorClass=blah.blah.MyRequestProcessor/

My authentication filter used an atribute authenticationRequired in the
action mapping (note that this is not an elegant solution because it doesn't
follows the DTD specification)

action-mappings
type=es.udc.is203.j2ee.eshop.http.controller.frontcontroller.EShopActionMap
ping

action path=/user/UpdateUserProfileDetails
type=es.udc.is203.j2ee.eshop.http.controller.actions.user.UpdateUserProfile
DetailsAction
name=userProfileForm
scope=request
input=/user/EditUserProfile.do
validate=true
authenticationRequired=true/



/**
 * A filter to check if the action to be executed requires that the user had
 * been authenticated. If the user has not been authenticated and the action
 * requires it, codedoProcess/code returns the
codeActionForward/code
 * returned by codemapping.findForward(AuthenticationPage)/code.
 * br
 * The uri of the action to be executed is stored in the request as
 * codeuri/code and the parameters as codeparameters/code so them
can
 * be retrieved later to continue the operation.
 *
 * pTitle: IS e-Shop/p
 * pDescription: /p
 * pCopyright: Copyright (c) 2003/p
 * pCompany: /p
 * @author a href=mailto:[EMAIL PROTECTED]Carlos Sanchez Gonzalez/a
-
 * a href=mailto:[EMAIL PROTECTED]Ines Silva Liste/a  -
 * a href=mailto:[EMAIL PROTECTED]Jose Mora Garcia/a
 * @version 4.1
 */
public class AuthenticationPreProcessingFilter extends PreProcessingFilter {

public AuthenticationPreProcessingFilter(PreProcessingFilter nextFilter)
{
super(nextFilter);
}

protected ActionForward doProcess(HttpServletRequest request,
  HttpServletResponse response,
  Action action, ActionForm form,
  ActionMapping mapping) throws
IOException,
ServletException,
InternalErrorException {

EShopActionMapping eShopActionMapping =
(EShopActionMapping) mapping;

if (eShopActionMapping.getAuthenticationRequired()) {

if (SessionManager.isUserAuthenticated(request)) {
return null;
} else {
String uri = request.getRequestURI();
uri = uri.substring(request.getContextPath().length());
request.setAttribute(uri, uri);
request.setAttribute(parameters,
 request.getParameterMap().entrySet());
return mapping.findForward(AuthenticationPage);
}

} else {
return null;
}

}
}


 -Mensaje original-
 De: koen boutsen [mailto:[EMAIL PROTECTED] 
 Enviado el: viernes, 10 de octubre de 2003 14:52
 Para: Struts Users Mailing List
 Asunto: RE: redirect problem
 
 
 So,I have to write my session control in the doProcess() method ?
 
 How do I have to configure my application so that every 
 request goes through this filter ?
 
 --
 
 - Original Message -
 
 DATE: Fri, 10 Oct 2003 13:58:40
 From: Carlos Sanchez [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' 
 [EMAIL PROTECTED],[EMAIL PROTECTED]
 Cc: 
 
 You can extend RequestProcessor using a intercepting filter 
 pattern for 
 preprocessing 
 (http://java.sun.com/blueprints/patterns/InterceptingFilter.h
 tml), so 
 you don't have to check the session in every jsp.
 
 
 
 public class MyRequestProcessor extends RequestProcessor {
 
 PreProcessingFilter firstPreProcessingFilter;
 
 public MyRequestProcessor() {
 
 firstPreProcessingFilter =
 new SessionPreProcessingFilter(
 new AuthenticationPreProcessingFilter(null));
 
 }
 
 protected ActionForward processActionPerform(
 HttpServletRequest request, HttpServletResponse response,
 Action action, ActionForm form, ActionMapping 
 mapping) throws
 IOException, ServletException {
 
 ActionForward actionForward = 
 firstPreProcessingFilter.process(
 request, response, action, form, mapping);
 
 if (actionForward == null) {
 return super.processActionPerform(request, 
 response, action,
   form, mapping);
 } else {
 return actionForward;
 }
 
 }
 
 }
 
 
 
 /**
  * A base clase for all preprocessing filters. Usually, concrete 
 filters only
  * need to provide an implementation of codedoProcess/code.  */
 public abstract class PreProcessingFilter {
 
 private PreProcessingFilter nextFilter;
 
 public PreProcessingFilter(PreProcessingFilter nextFilter) {
 this.nextFilter = nextFilter;
 }
 
 /**
  * Calls upon codedoProcess/code, and if necessary, 
 continues 
 to call
  * codeprocess/code on the next filter.
  */
 public ActionForward process(HttpServletRequest request

RE: How to pull messages from multiple Bundles?

2003-09-17 Thread Carlos Sanchez
Oh, sorry, forget my last post and here's an aswer to your problem (which
was also mine)

Watch this from thread Multiple message resources with JSTL



 -Mensaje original-
 De: Kris Schneider [mailto:[EMAIL PROTECTED] 
 Enviado el: viernes, 12 de septiembre de 2003 16:35
 Para: Struts Users Mailing List
 Asunto: Re: Multiple message resources with JSTL
 
 
 Here's something that appears to be a step in the right 
 direction. First, use a single context init param for 
 javax.servlet.jsp.jstl.fmt.localizationContext.
 The param-value content should match the parameter 
 attribute of the message-resources element in your default 
 Struts config file. For example, your default Struts config 
 file would include:
 
 message-resources parameter=com.obs.webapp.messages.Messages/
 
 Then, add something like the following to a module Struts config file:
 
 message-resources 
 parameter=com.obs.webapp.messages.MessagesModule1/
 
 Finally, extend SwitchAction like so:
 
 import javax.servlet.jsp.jstl.core.Config;
 ...
 public ActionForward execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) 
 throws Exception {
   ActionForward forward = super.execute(mapping, form, 
 request, response);
 
   ModuleConfig moduleConfig =
 RequestUtils.getModuleConfig(request, 
 getServlet().getServletContext());
 
   MessageResourcesConfig messageConfig =
 moduleConfig.findMessageResourcesConfig(Globals.MESSAGES_KEY);
 
   if (messageConfig != null) {
 Config.set(request,
Config.FMT_LOCALIZATION_CONTEXT,
messageConfig.getParameter());
   }
 
   return forward;
 }
 
 So, as long as you use the new switch action to move between 
 modules, it should pick up the messages associated with the 
 new module and make them available to JSTL. I haven't looked 
 into how to integrate with module switching via a forward 
 with contextRelative=true, but there might be something 
 possible there as well...
 
 Quoting Carlos Sanchez [EMAIL PROTECTED]:
 
  I'm using JSTL + Struts configured for modules
  
  I'm using JSTL fmt tag for messages, instead of Struts tags, 
  configured in web.xml
  
context-param
  
 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa
 ram-name
  param-valuecom.obs.webapp.messages.Messages/param-value
/context-param
  
  I'd like to add more message resources, one for each module.
  
  Adding more context-param's doesn't work, it uses the last one.
  
  Can I configure it in web.xml, have I to use fmt:setBundle in the 
  jsps, ...?
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 
 -
 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]



RE: html:link/ URL Parameters

2003-09-11 Thread Carlos Sanchez
I agree, but when you want to put static parameters in the jsp I use c:url
with html-el:link instead.

c:url var=homeURL value=/toModule.do
c:param name=prefix value=/
c:param name=page value=/MainPage.do/
/c:url
html-el:link href=${homeURL}
fmt:message key=DefaultSidebar.home/
/html-el:link

It's a pity that html:link doesn't allow multiple parameters, or maybe c:url
should allow writing a message.


 -Mensaje original-
 De: Kris Schneider [mailto:[EMAIL PROTECTED] 
 Enviado el: jueves, 11 de septiembre de 2003 20:20
 Para: Struts Users Mailing List
 Asunto: Re: html:link/  URL Parameters
 
 
 I'm as fond of JSTL as the next developer, but it's a 
 case-by-case basis as to whether it trumps Struts (or any 
 other) tags. The big win with using html:link, or 
 html-el:link, is the ability to leverage the path of your actions:
 
 html:link action=/path/to/action ...
 
 They also have built-in support for maps as a collection of 
 request parameters. c:url, on the other hand, requires the 
 use of c:param child elements, one per parameter. So, 
 especially for a Struts app, I'd say c:url is much *less* 
 sophisticated.
 
 And then there's transaction control token support...
 
 For your specific case (as Robert replied):
 
 html:link action=/viewOrder
paramId=orderNo
paramName=order
paramProperty=ponum
 View Order
 /html:link
 
 If you need multiple request parameters, make use of a map:
 
 html:link action=/viewOrder
name=paramMap
 View Order
 /html:link
 
 Or:
 
 html:link action=/viewOrder
name=someBean
property=paramMap
 View Order
 /html:link
 
http://jakarta.apache.org/struts/userGuide/struts-html.html#link

Quoting Pat Quinn [EMAIL PROTECTED]:

 Cheers guys i'll have a look into JSTL URL.
 
 
 From: Vic Cekvenic [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: html:link/  URL Parameters
 Date: Thu, 11 Sep 2003 08:39:14 -0400
 
 Consider using JSTL URL for link, it is much more sophisticated. hth,
 .V
 
 Pat Quinn wrote:
 Hi Guys,
 
 I trying to use the html:link/ tag library with dynamic url 
 parameters
 e.g (which doesn't work).
 
 
 html:link action=/viewOrder.do?orderNo=c:out
 value=${order.ponum}/View Order/html:link
 
 
 
 How should i do this with out using the standard HTML Href tag?

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
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]



Multiple message resources with JSTL

2003-09-11 Thread Carlos Sanchez
I'm using JSTL + Struts configured for modules

I'm using JSTL fmt tag for messages, instead of Struts tags, configured in
web.xml

  context-param
param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name
param-valuecom.obs.webapp.messages.Messages/param-value
  /context-param

I'd like to add more message resources, one for each module.

Adding more context-param's doesn't work, it uses the last one.

Can I configure it in web.xml, have I to use fmt:setBundle in the jsps, ...?




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