encoding problem

2003-03-29 Thread santhosh
Hello all,

I am using struts in our project. application server is JBOSS with Tomcat as servlet 
container.  If i set contenet type ans UTF-8 
(<%@ page contentType="text/html;charset=UTF-8"%>) in jsp i am getting the following 
error.

org.apache.jasper.JasperException: null(-1,-1) Cannot read file: ze file

if i use other charset like EUC-JP  or  Shift-jis  its working fine.  Can i get some 
solution how to solve this problem.

waiting for the reply




Thanx with regds
santhosh hegde A


design concern

2003-03-15 Thread santhosh
Hello Everybody,

I have one design concern.  In our project we have ejb's.  Now in some modules i have 
only the some sql quries to be executed based on the user search condition.  here 
where should i prepare the sql queries.  should i create in Action class or  session 
bean.

waiting for the reply.

Thanx with regds
santhosh hegde A


Re: forwarding to servlet

2003-03-14 Thread santhosh
Thank you very much AduPlssis.  its working now.
- Original Message -
From: "du Plessis, Corneil C" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 14, 2003 1:06 PM
Subject: RE: forwarding to servlet


> You should 
>
> -----Original Message-
> From: santhosh [mailto:[EMAIL PROTECTED]
> Sent: 14 March, 2003 09:06
> To: 'Struts Users Mailing List'
> Subject: forwarding to servlet
>
>
> Hello everybody,
>
> In struts i want to forward to a servlet than a jsp.  So in
> struts-config.xml how to configure it.  if it is jsp we configure like
> following for e.g
> lik this i want to forward to a
> servlet.  how to give the path.  i have a servlet which i can call from
the
> browser like the following.
>
> http://127.0.0.1:8080/dvdapp2/action  .  and i have configured in
> web.xml like the following.
>
> 
>   error
>   hansen.playground.error
>   
>
>   
>   error
>   /action
>   
>
>
> Now if i configure like this  
> exception if  FileNotFoundException.
>
>
>
> please help me out in this.
>
>
> Thanx with regds
> santhosh hegde A
>
> __
>
> Disclaimer and confidentiality note
>
>
> Everything in this e-mail and any attachments relating to the official
business of
> Standard Bank Group Limited is proprietary to the company. It is
confidential, legally
> privileged and protected by law. Standard Bank does not own and endorse
any other content.
> Views and opinions are those of the sender unless clearly stated as being
that of Standard Bank.
>
> The person addressed in the e-mail is the sole authorised recipient.
Please notify the sender
> immediately if it has unintentionally reached you and do not read,
disclose or use the content
> in any way.
>
> Standard Bank can not assure that the integrity of this communication has
been maintained nor
> that it is free of errors, virus, interception or interference.
>
> __
>
> -
> 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]



forwarding to servlet

2003-03-13 Thread santhosh
Hello everybody,

In struts i want to forward to a servlet than a jsp.  So in struts-config.xml how to 
configure it.  if it is jsp we configure like following for e.g 
lik this i want to forward to a servlet.  
how to give the path.  i have a servlet which i can call from the browser like the 
following.

http://127.0.0.1:8080/dvdapp2/action  .  and i have configured in web.xml like the 
following.  


  error
  hansen.playground.error
  
  
  
  error
  /action
  


Now if i configure like this 
exception if  FileNotFoundException.  



please help me out in this.


Thanx with regds
santhosh hegde A


Re: standalone with struts

2003-03-13 Thread santhosh
Forward means, if we use jsp's then after processing in action class we
forward the control to the view using  findforward() method
 e.g   return (mapping.findForward(forward));.  Like this how to forward
to  standalone applet which actually sent the request.


- Original Message -
From: "Sebastien BRUNOT" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, March 13, 2003 6:51 PM
Subject: RE: standalone with struts


> What do you mean by forwarding the request to applet ?
>
> S. Brunot
>
> -Message d'origine-
> De: santhosh [SMTP:[EMAIL PROTECTED]
> Date: jeudi 13 mars 2003 14:08
> A: 'Struts Users Mailing List'
> Objet: standalone  with struts
>
> Hi Folks,
>
> My requirement is as follows.
>
> I have a standalone application which is build using swings.   This
> application talks to server for some of the functionalities to achieve.
In
> the server side i want to use struts framework .  My question is  1)  Can
a
> standalone application talk to server which uses struts framework?  2) if
> yes  how to forward the request to applet after processing in the action
> class?
>
> It will be very much helpful if i get the answers as soon as possible as i
> have to answer  to our client as soon as possible.
>
> waiting for the reply
>
> Thanx with regds
> santhosh hegde A
>
>
> -
> 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]



standalone with struts

2003-03-13 Thread santhosh
Hi Folks,

My requirement is as follows.

I have a standalone application which is build using swings.   This application talks 
to server for some of the functionalities to achieve.  In the server side i want to 
use struts framework .  My question is  1)  Can a standalone application talk to 
server which uses struts framework?  2) if yes  how to forward the request to applet 
after processing in the action class?  

It will be very much helpful if i get the answers as soon as possible as i have to 
answer  to our client as soon as possible.

waiting for the reply

Thanx with regds
santhosh hegde A


Re: encoding problem

2002-08-16 Thread santhosh

If i use both  then  form  dedisp[lay is working  but  japanese characters
from  resource file is not displaying correctly.
- Original Message -
From: "Padma Ginnaram" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, August 16, 2002 3:38 PM
Subject: RE: encoding problem


> You need both, refer to
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12490.html
for
> details.
> -Original Message-
> From: santhosh [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 17, 2002 3:01 AM
> To: 'Struts Users Mailing List'
> Subject: encoding problem
>
>
>
>
> In my jsp i have the directive " <%@ page contentType= "text/html;
> charset=Shift_JIS" %>"
>
> In this case if i input any japanese character  when redisplaying the form
> these character displays perfectly.
>
> But the japanese characters from resource_ja.properties doesnot display
> correctly.
>
>
> At the same time instead of  putting above said directine , if i put  html
> tag  ""
>
> the characters from resource_ja.properties  display perfectly  but  when
> redisplaying the form after submitting , japanese characters entered in
the
> form does not display correctly.
>
> But i want both to display perfectly.
>
> Can anyone  suggest me the proceedure by which i can handle this situation
> perfectly.
>
> thanx with regds
>
> santhosh hegde A
>
> --
> 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]>




encoding problem

2002-08-16 Thread santhosh



In my jsp i have the directive " <%@ page contentType= "text/html; charset=Shift_JIS" 
%>"

In this case if i input any japanese character  when redisplaying the form these 
character displays perfectly.

But the japanese characters from resource_ja.properties doesnot display correctly.


At the same time instead of  putting above said directine , if i put  html tag  ""

the characters from resource_ja.properties  display perfectly  but  when redisplaying 
the form after submitting , japanese characters entered in the form does not display 
correctly.

But i want both to display perfectly.

Can anyone  suggest me the proceedure by which i can handle this situation perfectly.

thanx with regds

santhosh hegde A



struts-config.xml not loading - WL6.0 - urgent

2002-03-02 Thread Santhosh Kumar

Hi
I am using Weblogic 6.0. My problem is its not loading the action mapping at
the time of startup. I have kept struts-config.xml in web-inf and struts.jar
in classpath.
I have pasted down the console messages. Please let me know if any of you
have any clue. 
Thanks in advance
San

==
  
<[WebAppServletContext(5093971,applications/web)] action: init>

  
<[WebAppServletContext(5093971,applications/web)] action: Initializing
configuration from resource path /WEB-INF/struts-config.xml>

resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Not registered, use system identifier

resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Not registered, use system identifier

register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
'jar:file:/D:/Projects/sant/deploy/cma/applications/web/WEB-INF/lib/struts.j
ar!/org/apache/struts/resources/struts-config_1_0.dtd'

register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'jar:file:/D:/Projects/sant/deploy/cma/applications/web/WEB-INF/lib/struts.j
ar!/org/apache/struts/resources/web-app_2_2.dtd'

register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'jar:file:/D:/Projects/sant/deploy/cma/applications/web/WEB-INF/lib/struts.j
ar!/org/apache/struts/resources/web-app_2_3.dtd'

resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd')
 Resolving to alternate DTD
'jar:file:/D:/Projects/sant/deploy/cma/applications/web/WEB-INF/lib/struts.j
ar!/org/apache/struts/reso
urces/web-app_2_2.dtd'

Call
org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.St
ring,*.action/java.lang.String)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Form -> Bean conversion - Not getting values

2002-02-18 Thread Santhosh Kumar

Thanks James.
It works when I expose all the fields in the html outputs (though I don't
use them ) as hidden fields. But why do I need to do this ? Aren't my action
form fields that are populated in the first page available in the second
page if the scope of the bean is declared as session (or request) in the
struts-config.xml. 

Santhosh

> --
> From: James Mitchell
> Reply To: Struts Users Mailing List
> Sent: Sunday, February 17, 2002 4:45 AM
> To:   'Struts Users Mailing List'
> Subject:  RE: Form -> Bean conversion - Not getting values
> 
> I apologize for not getting back to you sooner.
> I realized that as I began responding to you last post, my response was
> quickly becoming a full blown tutorial on "wizards in struts".
> I think I'll publish a tutorial on my web site in a few days, but for
> now here is a summary what I wrote
> 
> 
> If I understand correctly:
> 1. You are trying to persist input values across multiple
>pages (such as a 3-step-wizard might do)
> 2. You are wanting to reuse existing bean classes within struts framework
> (perhaps and Entity Bean???)
> 
> 
> **Requirements - User must be able to hit next and previous (submit
> buttons
> on page  **Not Browser buttons**)
> and system should maintain state across pages. (Without using session or
> db
> persistence)
> 
> 
> 
> 
> I have written several wizards in struts and I have found that
> the best way to handle the persistance (on the servlet container side) is
> to
> create your wizard in such a way that you use the same jsp and same action
> class
> for each step in the process.  Just use a different section of the page.
> (Separated by logic:equal tags)
> 
> Doing this will:
> 1. Allow you to have better consistency across your pages (look and feel)
> 2. Allow for Code reuse (my personal favorite)
> 
> Lets assume this is a 3 step wizard.
> Step 1. - fill in first name and last name
> Step 2. = fill in address
> Step 3. - check an "I agree" on a terms page.
> 
> The ActionForms/Beans and fields we want to use are as follows:
> (assuming they have accessor methods implemented)
> 
> com.mybean.MyActionForm
>   boolean agreed
> 
> com.mybean.MyExistingCustomerBean (could be an Entity bean)
>   String firstName
>   String lastName
>   String address1
>   String address2
>   String city
>   String state
>   String zipCode
> 
> 
> Be sure to expose all fields into the html output (even if it's not used,
> just put it in a hidden input tag).  Doing this will
> persist your ActionForm and Bean fields from step1 to the end, and allows
> the user to hit previous and back "submit" buttons.
> 
> -
> --
> 
> I'm not sure how you want to validate the ActionForm or Bean class at any
> given step, but:
> 1. Change the ActionForm scope to "request"
> 2. Add a field in your ActionForm called "step" and put a hidden field in
> the jsp named "step".
> 3. Put two submit buttons (each named "action") in your jsp page (one is
> "<>"
> 
> So when you are in the action class you will know where you are coming
> from
> by getting the form.getStep() and you will know where you should forward
> to by getting the form.getAction().
> Therefore:
> if ( form.getStep().equals( "1" ) && ( form.getAction().equals(
> "Next>>" ) ){
>   form.setStep( "2" );
> }
> 
> if ( form.getStep().equals( "2" ) && ( form.getAction().equals(
> "Next>>" ) ){
>   form.setStep( "3" );
> }else{
>   form.setStep( "1" );
> }
> 
> // if the action is not "Finish" then forward to "next" (see action
> mapping
> forward below)
> ...
> ...
> 
> 
> 
> --- struts-config.xml ---
> 
>  
>
>  
> 
>   
> type="mypackage.MyAction"
>name="MyForm"
>scope="request"  <- make this request
>  validate="false">
>   
>   
> 
> 
> 
> 
> --- wizard.jsp ---
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ ta

RE: Form -> Bean conversion - Not getting values

2002-02-15 Thread Santhosh Kumar

I tried doing this but I'm not getting the form bean attribute values after
the second submit. Its like this. My form bean contains some properties and
a reference to my value bean. The first page submits and action class
forwards to second page after populating form fields except the value object
fields. The second form that contaning the value object fields submits to
the same action class and here I am getting the values from value object.
This part works fine. but I am not getting the form bean values that got
populated at the first submit.

Struts- config :
  

   
   

  
 

  
  


Any clue ? 

Thanks in advance

S

> --
> From: James Mitchell
> Reply To: Struts Users Mailing List
> Sent: Saturday, February 16, 2002 11:56 AM
> To:   'Struts Users Mailing List'
> Subject:  RE: Form -> Bean conversion
> 
> I have also seen this done as an "embedded bean" object for generic action
> form.
> 
> What you would do is create a generic ActionForm with a setBean() method
> and
> a getBean() method.
> 
> Then in your ActionClass, call setBean( bean ) in the form and pass it to
> the action forward.
> 
> Then in your jsp, always refer to the ActionForm with "bean."
> 
> This concept forces the struts ActionForm to act as a wrapper to your bean
> classes and you never have to write a single "duplicate" line of code.
> 
> Example:
> Say you have a bean called Customer:
> ---
> public class Customer {
>   private String firstName;
>   private String lastName;
> 
>  public String getFirstName() {
> return firstName;
>   }
>   public void setFirstName(String firstName) {
> this.firstName = firstName;
>   }
>   public void setLastName(String lastName) {
> this.lastName = lastName;
>   }
>   public String getLastName() {
> return lastName;
>   }
> }
> 
> 
> Now you want to use it in struts without using some mapping utility or
> writing a bunch of this:
> ...
> ...
> form.setFirstName( bean.getFirstName() );
> form.setLastName( bean.getLastName() );
> ...
> ...
> 
> right?
> 
> Then don't.
> 
> Create one ActionForm (for each bean) like so:
> ---
> public class GenericDetailForm extends ActionForm {
> 
>   private Customer bean = null;
> 
>   public void setBean( Customer bean ){
> this.bean = bean;
>   }
>   public Customer getBean(){
> return this.bean;
>   }
> ...
> ...
> //rest of required code here
> ...
> ...
> 
> }
> ---
> 
> 
> Then in your jsp page.do something like this:
> 
> ...
> ...
> 
>  
> ...
> ...
> 
> Struts will auto-populate your existing bean for you and hand it to you
> (stuffed) in your ActionForm (in the perform() of your Action class)
> 
> 
> 
> *Note - you could even take it a step further and use the same wrapper for
> **ALL** your beans.  Of course that would mean changing your bean field in
> the wrapper class to java.lang.Object and then casting it out of the form
> at
> the top of each jsp page, which isn't much work considering the time saved
> in code reuse. (Let's face it, some people just can't stand
> scripletslike me)
> 
> 
> James Mitchell
> Software Engineer
> Open-Tools.org
> Home Phone (770) 822-3359
> Cell Phone: (678) 910-8017
> 
> 
> -Original Message-
> From: CyberZombie [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 15, 2002 11:36 PM
> To: Struts Users Mailing List
> Subject: Re: Form -> Bean conversion
> 
> 
> Here's a rudimentary wrapper tool.  The commented out section is used
> when wrapping for Struts 1.0.x -- 1.1 does a much better job there.  I
> still have hardcoded the file masks (I assume all VO's end in
> Value.java).  And I assume that all wrapped getters have corresponding
> setters.  What can I say...I got lazy when I got it working and went
> back to solving the business problems on this app... :)
> 
> John M. Corro wrote:
> 
> >We have a bunch of existing beans that we'd like to use w/ ActionForms.
> For each bean we'll need to obviously expose the getters/setters in the
> corresponding ActionForm.  The ideal scenario we'd like to see happen is
> prevent the ActionForms from having all the corresponding getters/setters
> hardcoded into it.  We're ok w/ coding the validate() method for each
> class
> by hand, but we'd like to avoid having to code each ActionForm w/ a
> getter/setter (even if it is templated out for us by a Struts plug in or
> even a custom written batch file).
> >
> >Has anyone implemented something like this?
> >
> 
> 
> 
> 
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 

--
To unsubscribe, e-mail:   
For additional comman