RE: Disallow user to modify URL in browser address bar

2003-08-25 Thread thirumalai . veeraswamy
You can check the "HTTP_REFERRER" host header info.

If you click an url (hyperlink)
http://localhost:8080/app/str/testview_srchpost.do which is given in
http://localhost:8080/app/str/index.jsp page then the referrer would be
http://localhost:8080/app/str/index.jsp if you just type the url in the
location bar, then the referrer would be blank. You can check that out
and send a status 500 in the header.

> -Original Message-
> From: Syed, Nazeer [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 22, 2003 7:11 PM
> To: Struts Users Mailing List
> Subject: RE: Disallow user to modify URL in browser address bar
> 
> 
> 
> If testview_srchpost.do and  testtwoview_srchpost.do are 
> valid action then you cannot restrict. This means 
> testview_srchpost.do, esttwoview_srchpost.do are in Struts 
> Config File 
> 
> If that testtwoview_srchpost.do not Valid action then It will 
> go default page or Error Page
> 
> Thanks
> Nazeer
> 
> 
> -Original Message-
> From: sriram [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 22, 2003 2:16 AM
> To: 'Struts Users Mailing List'
> Subject: Disallow user to modify URL in browser address bar
> 
> How to identify if user has manipulated the URL in Address 
> Bar of the browser?
> 
> For ex., the application displays a page with the following URL:
> 
http://localhost:8080/app/str/testview_srchpost.do

Now, the user modifies the URL in the address bard. Instead of
testview_srchpost.do, user types testtwoview_srchpost.do and clicks
ENTER.

I want to restrict such types of URL modification Struts application. I
should take the user to a default access denied page when ever user does
such changes.

How to identify this action of the user? Pl. give some ideas.

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

RE: Pop-up a window on Submit

2003-08-14 Thread thirumalai . veeraswamy


> -Original Message-
> From: Au-Yeung, Stella H [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 12, 2003 7:37 AM
> To: 'Struts Users Mailing List'
> Subject: Pop-up a window on Submit
> 
> Hi:
> The bottom of my Search.jsp has two buttons.  They are for displaying
> different report (a Main report and a Procedure Summary):
> 
>  key="button.mainReport"/>
>  key="button.procedureSummary"/>
> 
> In my Struts Action class ReportAction I do the following:
> if (formBean.isMainReportAction())
> {
>   this.validateAction(formBean, request, errors);  // validate search
> filters
>   if(errors.empty())
>   retrieve data for main report and display main report
>   else
>   displayed error message
> }
> else if (formBean.isProcedureSummaryAction())
> {
>   this.validateAction(formBean, request, errors); // validate
search
> filters
>   if(errors.empty())
>   retrieve data for procedure summary report
>   << forward to the template "ProcSummTemplate"
>   else
>   displayed error message
> }
> 
> My struts-config file sort of like this:
> 
>  path="/app/report/ProcedureSummary.jsp"/>
> 
> 
> type="com.test.action.report.ReportAction"
>name="SearchFormBean"
>scope="request"
>validate="false">
> 
> 
> 
> 
> All the above works fine, but now I need to enhance it to do these:
> - If there are no validation errors, pop-up a new window to display
the
> selected report (MainReport.jsp or ProcedureSummary.jsp)
> - If there are validation errors, stay on the same window to display
> validation messages in Search.jsp so user can reenter search filters.
> My questions are:
> 1) How do I pop up a new window with the  tag?  Since I
> cannot
> do onSubmit()="return popUpAWindow()" inside the  tags
> 2) How do I force Struts to stay in the same window if there are
> validation
> errors, otherwise do the pop-up? My validation method is in the Action
> class
> and not a javascript function.

Hi Pat,

   Try the html code. Name it as test.html. The point is frm.target. You
can manipulate that and achieve what you want. But one issue is the
window which pops up will have location bar, buttons, etc., I don't know
how to hide them. If you do manual window.open you won't receive the
submitted values.









 name: 
 




> 
> Thanks in advance.
> Pat
> 
> 

Regards
Thiru

> 
> 
> 
> Regards,
> Stella Auyeung
> EDS Digital Enablement - Saginaw
> 6200 State Street, Suite 1
> Saginaw,  MI  48603
> 
> * phone: 989-497-5766 (8-399)
> * pager: 989-201-1030
> * mailto:[EMAIL PROTECTED]
> 

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

[OT] XProgramming - Continues Integration - Cruise Control

2003-08-14 Thread thirumalai . veeraswamy
Guys,

  Hope you guys have heard about the keywords in the subject. I just
want to share about this particular tool which helps a lot in building a
java application. 

  Those of you, who are already aware of it and used it, please excuse
me and skip this mail.

  It helps during development stage (mostly during hectic schedules)
where you want to build and see the application running as soon as the
team members complete their portion and checked-in their sources.  

  This does a good job of polling your Version Control System and as
soon as there is a change it automatically starts building the
application (of course you should have used Ant), prepare a report of
changes happened from VCS. It will send a mail with the report if it is
successful or error logs if it fails.

  It encourages unit testing using JUnit and using it while building
cruise control itself.

  It supports all the famous VCS (PVCS, VSS, CVS, etc.).

  It is an open source hosted in http://cruisecontrol.sourceforge.net

Best Regards
Thiru

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

RE: force precompilation of JSPs

2003-08-05 Thread thirumalai . veeraswamy
I am using iPlanet where I use the following ant target to rebuild the
jsps


  
 
 
  
  
  
 
  


or you can use this to do for each one

   
 
   
  
 
  



@echo off
java -classpath  org.apache.jasper.JspC -d %2 -v0 -die9 %3

jspengine.jar should be in classpath

best regards
Thiru

> -Original Message-
> From: Ionel Gardais [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 05, 2003 12:18 PM
> To: Struts Users Mailing List
> Subject: force precompilation of JSPs
> 
> Hi,
> 
> I am experiencing a slow down when I access a JSP page for the first
> time after I deploy e web app.
> Is there a way to force precompilation of these files as soon as the
web
> app is deployed ?
> 
> Thanks,
> ionel

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

RE: IPlanet 6 SP2 and Struts 1.1 with templates TLD

2003-07-30 Thread thirumalai . veeraswamy

> -Original Message-
> From: Philippe Van Der Gucht [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 24, 2003 4:32 PM
> To: Struts Users Mailing List
> Subject: Re: IPlanet 6 SP2 and Struts 1.1 with templates TLD
> 
> Philippe Van Der Gucht wrote:
> > Hello,
> >
> > Another unlucky one trying to get it to work on IPlanet...
> 
> It would seem that the problem is classpath related.
> 
> I can't seem to make struts find the application resources files...
> 
> I get this when I'm trying to write a message:
> ???en_US.test???


See reply from craig - message no 86721


> 
> 
> Thanks to all who tried to help,
> Philippe.


Best Regards
Thiru
This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

struts 1.0.2 - application deployed in root (/) gives invalid form actions(//) in iPlanet/Sun ONE Web Server

2003-07-30 Thread thirumalai . veeraswamy
Hi,

  In struts 1.0.2, I have deployed an application in the root (/)
instead of virtual folder. In this case my form actions rendered as
//. Because of this the browser assumes I have given some web
site name and navigates to http:// instead of
http:///.





This generates the following html code



When I saw the html:form tag class, the following code does it

protected String getActionMappingURL() {

StringBuffer value = new StringBuffer(request.getContextPath());
// it gives "/"
...
  String actionMapping = getActionMappingName();
  if (servletMapping.startsWith("*.")) {
  value.append(actionMapping); // in struts-config /execute_report,
result is //execute_report.do
  value.append(servletMapping.substring(1));
  } else if (servletMapping.endsWith("/*")) {
 value.append(servletMapping.substring
(0, servletMapping.length() - 2));
 value.append(actionMapping);
 }
  if (queryString != null)
  value.append(queryString);
...
 

  Do I need to change any configuration for this to work? As of now I am
testing in a virtual folder setup.

Best Regards,
Thiru

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

RE:IPlanet 6 SP2 and Struts 1.1 with templates TLD

2003-07-23 Thread thirumalai . veeraswamy
Philippe,

You haven't pasted the full exception stack trace (1st half). Have you
tried the struts-template application bundled with struts 1.1?

Regards,

Thiru

-
Philippe Wrote:

Hello,

Another unlucky one trying to get it to work on IPlanet...

I'm using the templates taglib and IPlanet throws an exception from the JSP
page:

root cause: javax.servlet.jsp.JspException:
org.apache.struts.taglib.template.
InsertTag
 at
org.apache.struts.taglib.template.PutTag.getAncestor(PutTag.java:288)
 at
org.apache.struts.taglib.template.PutTag.doEndTag(PutTag.java:208)
 at _jsps._jsp._list_jsp._jspService(_list_jsp.java:103)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer
vlet.java:247)

etc.

When I look at the source the jsp compiler (_list_jsp.java) generated I see
it
throws an exception on this line:

  if (_jspx_th_template_put_0.doEndTag() == Tag.SKIP_PAGE)

Anybody know the answer?

I hereby add the jsp page causing trouble:

---8<---
<%@ taglib uri='/tags/struts-template' prefix='template' %>



   
   

---8<---


Greetings,
Philippe.


This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

Re: Craig/Ted .. Need help classLoader.getResourceAsStream(name) doesn'tnot work in iPlanet

2003-07-22 Thread thirumalai . veeraswamy

Craig,

   Thanks for the reply. Now I understand the purpose.

   To make it work on iPlanet/Sun ONE Web Server, I am planning to do
the fix where the class loader can be retrieved from a single static
procedure.

   Any idea how to make it parameterised so that it works as expected
in Tomcat also.

Regards
Thiru



   

"Craig R.  

McClanahan"  To: Struts Users Mailing List <[EMAIL 
PROTECTED]>
<[EMAIL PROTECTED]cc: [EMAIL PROTECTED]
   
che.org> Subject: Re: Craig/Ted .. Need help   

 classLoader.getResourceAsStream(name) doesn't 
not work in iPlanet 
07/22/2003 

09:50 PM   

   

   







On Tue, 22 Jul 2003 [EMAIL PROTECTED] wrote:

> Date: Tue, 22 Jul 2003 18:12:58 +0530
> From: [EMAIL PROTECTED]
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Craig/Ted .. Need help classLoader.getResourceAsStream(name)
> doesn't not work in iPlanet
>
> Hi Craig/Ted,
>
>  I am not getting enough attention to this thread. I am trying to
give
> different subjects, but no reply. Could you please reply.
>

I suspect it's a bug in the webserver, perhaps not setting the thread
context class loader reliably.

>   When I was debugging the code and verifying the log. I found the
code
> snippet mentioned below is behaving erratically in iPlanet/Sun ONE Web
> Server. I  have no idea what is the purpose of the following code and why
> it should behave differently in two different web servers.
>
> PropertyMessageResources.java
>
> ClassLoader classLoader = Thread.currentThread
> ().getContextClassLoader();
> if (classLoader == null) {
> classLoader = this.getClass().getClassLoader();
> }
>
> is = classLoader.getResourceAsStream(name);
>
> is always returns NULL in iPlanet/Sun ONE Platform
>
>If I change the code as mentioned below, it works. This is the code
> which was there in struts 1.0.2.
>
>ClassLoader classLoader = this.getClass().getClassLoader();
>

This will not work when we ultimately support putting struts.jar into a
shared parent class loader (in Tomcat, that would mean being able to put
it into $CATALINA_HOME/common/lib).  The problem is that code in the
parent class loader can't see classes in the webapp class loader, so you
would get "class not found" on all your actions, form beans, and so on.

I'd file a bug against S1WS on this issue.

>And wherever this code block is used there also it throws exceptions.
>
>The same code is used in the following sources also.
>
> ActionServlet.java(437)
> FormBeanConfig.java(315)
> FormPropertyConfig.java(257)
> RequestUtils.java(201)
>

The key issue is that when a class tries to load another class (via the
"new" operator or this.getClass.getClassLoader()), it can only look *up*
the class loader hierarchy, but not *down*.  For detailed information on
how servlet containers are typically organized (the exact info is specific
to Tomcat, but most of them do something similar), see:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

>Could somebody explain the purpose of this code and why was it changed
> in 1.1?
>

In order to move towards being able to put struts.jar and the commons
libraries in a shared repository.

>If I change the code to 1.0.2 style will it have any impact on the
> struts functionality.
>

Not for you, but it would for others, so we can't go back.

> Best Regards,
> Thiru
>
>

Craig





This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

-
To unsubscribe, e

Craig/Ted .. Need help classLoader.getResourceAsStream(name) doesn't notwork in iPlanet

2003-07-22 Thread thirumalai . veeraswamy
Hi Craig/Ted,

 I am not getting enough attention to this thread. I am trying to give
different subjects, but no reply. Could you please reply.

  When I was debugging the code and verifying the log. I found the code
snippet mentioned below is behaving erratically in iPlanet/Sun ONE Web
Server. I  have no idea what is the purpose of the following code and why
it should behave differently in two different web servers.

PropertyMessageResources.java

ClassLoader classLoader = Thread.currentThread
().getContextClassLoader();
if (classLoader == null) {
classLoader = this.getClass().getClassLoader();
}

is = classLoader.getResourceAsStream(name);

is always returns NULL in iPlanet/Sun ONE Platform

   If I change the code as mentioned below, it works. This is the code
which was there in struts 1.0.2.

   ClassLoader classLoader = this.getClass().getClassLoader();

   And wherever this code block is used there also it throws exceptions.

   The same code is used in the following sources also.

ActionServlet.java(437)
FormBeanConfig.java(315)
FormPropertyConfig.java(257)
RequestUtils.java(201)

   Could somebody explain the purpose of this code and why was it changed
in 1.1?

   If I change the code to 1.0.2 style will it have any impact on the
struts functionality.

Best Regards,
Thiru

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

difference between Thread.currentThread().getContextClassLoader() and this.getClass().getClassLoader()

2003-07-21 Thread thirumalai . veeraswamy
Hi,
  When I was debugging the code and verifying the log. I found the code
snippet mentioned below is behaving erratically in iPlanet/Sun ONE Web
Server. I  have no idea what is the purpose of the following code and why
it should behave differently in two different web servers.

PropertyMessageResources.java

ClassLoader classLoader = Thread.currentThread
().getContextClassLoader();
if (classLoader == null) {
classLoader = this.getClass().getClassLoader();
}

   If I change the code as mentioned below, it works. This is the code
which was there in struts 1.0.2.

   ClassLoader classLoader = this.getClass().getClassLoader();

   And wherever this code block is used there also it throws exceptions.

   The same code is used in the following sources also.

ActionServlet.java(437)
FormBeanConfig.java(315)
FormPropertyConfig.java(257)
RequestUtils.java(201)

   Could somebody explain the purpose of this code and why was it changed
in 1.1?

   If I change the code to 1.0.2 style will it have any impact on the
struts functionality.

Best Regards,
Thiru

- Message from JavaXML Developer <[EMAIL PROTECTED]> on Fri, 18
Jul 2003 06:19:23 -0700 (PDT) -

  To: Struts Users Mailing List
  <[EMAIL PROTECTED]>

 Subject: Re: Struts in iPlanet/Sun ONE Web Server 6.0
  SP5 throws exception


Sometimes back i had issue with iPlanet web server 6.0 with SP1. Now my app
is running well on iWS with SP1. Am sure it should work well with later SP
versions. Did you make sure your lib and tlds are getting picked up? Take a
look at your _Welcome_jsp.java line 226 on which you are getting error in
your error trace.

-Vicky

[EMAIL PROTECTED] wrote:

Hi,

When I debugged the location of the line of messagetag.java, i
found it is not able to retrieve the message from the properties file.

But the message source has been configured in the struts-config.xml
file. I said null=true in action servet configuration, then it started
giving the values like ???en.welcome.heading???, ???en.welcome.message???.

I commented the message resouces entry in struts-config file and
added the application entry in web.xml. Still it is not picking up the
messages.

This happens only in iPlanet, in Tomcat as soon as deployed it
started working.

Regards
Thiru




thirumalai.ve
eraswamy To: [EMAIL PROTECTED]
cc:
07/18/2003 Subject: Struts in iPlanet/Sun ONE Web Server 6.0 SP5 throws
10:17 AM exception





Hi,

I have deployed the struts-blank.war file in Sun ONE Web Server
6.0(iPlanet) SP5. When I access the application through the URL it throws
an exception as mentioned below.

In the documentation I believe it mentions it will work in SP2+.

Please do the needful.

Regards
Thiru

[18/Jul/2003:10:04:52] info ( 2448): iPlanet-WebServer-Enterprise/6.0SP5
B10/31/2002 14:41

[18/Jul/2003:10:10:53] failure ( 2448): Internal error: servlet service
function had thrown ServletException (uri=/struts-blank/Welcome.do):
javax.servlet.ServletException, stack: javax.servlet.ServletException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)


at _jsps._pages._Welcome_jsp._jspService(_Welcome_jsp.java:226)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:248)


at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:238)


at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:519)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:588)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)


at
com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)


at
com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)


at
com.iplanet.server.http.servlet.NSServletSession.internalRedirect(Native
Method)
at
com.iplanet.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:48)


at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)


at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)


at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)


at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)


at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)


at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSS

Re: Struts in iPlanet/Sun ONE Web Server 6.0 SP5 throws exception- getClassLoader() behaves erratically

2003-07-20 Thread thirumalai . veeraswamy
Vicky,

  When I was debugging the code and verifying the log. I found the code
snippet mentioned below is behaving erratically in iPlanet/Sun ONE Web
Server. I  have no idea what is the purpose of the following code and why
it should behave differently in two different web servers.

PropertyMessageResources.java

ClassLoader classLoader = Thread.currentThread
().getContextClassLoader();
if (classLoader == null) {
classLoader = this.getClass().getClassLoader();
}

   If I change the code as mentioned below, it works. This is the code
which was there in struts 1.0.2.

   ClassLoader classLoader = this.getClass().getClassLoader();

   And wherever this code block is used there also it throws exceptions.

   The same code is used in the following sources also.

ActionServlet.java(437)
FormBeanConfig.java(315)
FormPropertyConfig.java(257)
RequestUtils.java(201)

   Could somebody explain the purpose of this code and why was it changed
in 1.1?

   If I change the code to 1.0.2 style will it have any impact on the
struts functionality.

Best Regards,
Thiru

- Message from JavaXML Developer <[EMAIL PROTECTED]> on Fri, 18
Jul 2003 06:19:23 -0700 (PDT) -
   
  To: Struts Users Mailing List
  <[EMAIL PROTECTED]> 
   
 Subject: Re: Struts in iPlanet/Sun ONE Web Server 6.0 
  SP5 throws exception 
   

Sometimes back i had issue with iPlanet web server 6.0 with SP1. Now my app
is running well on iWS with SP1. Am sure it should work well with later SP
versions. Did you make sure your lib and tlds are getting picked up? Take a
look at your _Welcome_jsp.java line 226 on which you are getting error in
your error trace.

-Vicky

[EMAIL PROTECTED] wrote:

Hi,

When I debugged the location of the line of messagetag.java, i
found it is not able to retrieve the message from the properties file.

But the message source has been configured in the struts-config.xml
file. I said null=true in action servet configuration, then it started
giving the values like ???en.welcome.heading???, ???en.welcome.message???.

I commented the message resouces entry in struts-config file and
added the application entry in web.xml. Still it is not picking up the
messages.

This happens only in iPlanet, in Tomcat as soon as deployed it
started working.

Regards
Thiru




thirumalai.ve
eraswamy To: [EMAIL PROTECTED]
cc:
07/18/2003 Subject: Struts in iPlanet/Sun ONE Web Server 6.0 SP5 throws
10:17 AM exception





Hi,

I have deployed the struts-blank.war file in Sun ONE Web Server
6.0(iPlanet) SP5. When I access the application through the URL it throws
an exception as mentioned below.

In the documentation I believe it mentions it will work in SP2+.

Please do the needful.

Regards
Thiru

[18/Jul/2003:10:04:52] info ( 2448): iPlanet-WebServer-Enterprise/6.0SP5
B10/31/2002 14:41

[18/Jul/2003:10:10:53] failure ( 2448): Internal error: servlet service
function had thrown ServletException (uri=/struts-blank/Welcome.do):
javax.servlet.ServletException, stack: javax.servlet.ServletException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)

at _jsps._pages._Welcome_jsp._jspService(_Welcome_jsp.java:226)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:248)

at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:238)

at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:519)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:588)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)

at
com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)

at
com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)

at
com.iplanet.server.http.servlet.NSServletSession.internalRedirect(Native
Method)
at
com.iplanet.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:48)

at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)

at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)

at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)

at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)

at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)

at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doGet(ActionServl

Re: Struts in iPlanet/Sun ONE Web Server 6.0 SP5 throws exception

2003-07-18 Thread thirumalai . veeraswamy

Hi,

When I debugged the location of the line of messagetag.java, i
found it is not able to retrieve the message from the properties file.

   But the message source has been configured in the struts-config.xml
file. I said null=true in action servet configuration, then it started
giving the values like ???en.welcome.heading???, ???en.welcome.message???.

I commented the message resouces entry in struts-config file and
added the application entry in web.xml. Still it is not picking up the
messages.

   This happens only in iPlanet, in Tomcat as soon as deployed it
started working.

Regards
Thiru



   

thirumalai.ve  

eraswamy To: [EMAIL PROTECTED] 
   
 cc:   

07/18/2003   Subject: Struts in iPlanet/Sun ONE Web 
Server 6.0 SP5 throws  
10:17 AM exception 

   

   




Hi,

  I have deployed the struts-blank.war file in Sun ONE Web Server
6.0(iPlanet) SP5. When I access the application through the URL it throws
an exception as mentioned below.

 In the documentation I believe it mentions it will work in SP2+.

 Please do the needful.

Regards
Thiru

[18/Jul/2003:10:04:52] info ( 2448): iPlanet-WebServer-Enterprise/6.0SP5
B10/31/2002 14:41

[18/Jul/2003:10:10:53] failure ( 2448): Internal error: servlet service
function had thrown ServletException (uri=/struts-blank/Welcome.do):
javax.servlet.ServletException, stack: javax.servlet.ServletException
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)
 at _jsps._pages._Welcome_jsp._jspService(_Welcome_jsp.java:226)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:248)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:238)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:519)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:588)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)
 at
com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)
 at
com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)
 at
com.iplanet.server.http.servlet.NSServletSession.internalRedirect(Native
Method)
 at
com.iplanet.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:48)
 at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
 at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
 at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
 at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
 at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)
 at
com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)
 at
com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)
, root cause: javax.servlet.jsp.JspException
 at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)
 at _jsps._pages._Welcome_jsp._jspService(_Welcome_jsp.java:89)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:248)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:238)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServ

Struts in iPlanet/Sun ONE Web Server 6.0 SP5 throws exception

2003-07-17 Thread thirumalai . veeraswamy
Hi,

  I have deployed the struts-blank.war file in Sun ONE Web Server
6.0(iPlanet) SP5. When I access the application through the URL it throws
an exception as mentioned below.

 In the documentation I believe it mentions it will work in SP2+.

 Please do the needful.

Regards
Thiru

[18/Jul/2003:10:04:52] info ( 2448): iPlanet-WebServer-Enterprise/6.0SP5
B10/31/2002 14:41

[18/Jul/2003:10:10:53] failure ( 2448): Internal error: servlet service
function had thrown ServletException (uri=/struts-blank/Welcome.do):
javax.servlet.ServletException, stack: javax.servlet.ServletException
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)
 at _jsps._pages._Welcome_jsp._jspService(_Welcome_jsp.java:226)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:248)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:238)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:519)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:588)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)
 at
com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)
 at
com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)
 at
com.iplanet.server.http.servlet.NSServletSession.internalRedirect(Native
Method)
 at
com.iplanet.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:48)
 at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
 at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
 at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
 at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
 at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)
 at
com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)
 at
com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)
, root cause: javax.servlet.jsp.JspException
 at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)
 at _jsps._pages._Welcome_jsp._jspService(_Welcome_jsp.java:89)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:248)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6(JspServlet.java:238)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:519)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:588)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:919)
 at
com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1061)
 at
com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:981)
 at
com.iplanet.server.http.servlet.NSServletSession.internalRedirect(Native
Method)
 at
com.iplanet.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:48)
 at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
 at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
 at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
 at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
 at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribut

RE: Can I pass an object through request object from Action class

2003-06-25 Thread thirumalai . veeraswamy
Anurag,

   Thanks for the reply. I didn't visualize the connection closure.

   The issue is crystal reports has a method where I can pass only the
resultset object, 

public void setDataSource(java.sql.ResultSet data,
  java.lang.String oldTableAlias,
  java.lang.String newTableAlias)
   throws ReportSDKException

   In that case, I have to pass just the sql, call some java class/bean
to get the resultset and pass it to the report.

   But then again the same connection issue will be there. Oops! I need
to check with Crystal Reports forum.

   Will come back once that doubt is cleared?

Regards
Thiru



-Original Message-
From: Anurag Garg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2003 11:49 AM
To: Struts Users Mailing List
Subject: RE: Can I pass an object through request object from Action
class

Hi,

If you are closing the connection object in the action class, in that
scenario you cannot use the resultset object in your report generation
code.
To pass the result set object in the report generation code, use
CachedRowSet class and populate it from resultset object and  than pass
your
object of the CachedResultSet object in report generation code using
request
or session object whatever you like.

It will work..

Anurag Garg

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 11:32 AM
To: [EMAIL PROTECTED]
Subject: Can I pass an object through request object from Action class
Importance: High


Hi,

   Already I raised this question to this list. But no reply.

   Let me rephrase the question again.

   I need to execute and show the reports using struts.

   I have input jsp, action class and action form associated to that. In
the action class I will generate the sql based on the input from jsp
page/action form, create a result set. Now I need to pass the resultset
to the report generation code.

   Can I put the resultset object in the request object and pass the
resultset to the success page defined for the action?

   If this approach is not good/possible, please let me know with the
correct approach.

Thanks,
Thiru


This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

Can I pass an object through request object from Action class

2003-06-24 Thread thirumalai . veeraswamy
Hi,

   Already I raised this question to this list. But no reply. 

   Let me rephrase the question again.

   I need to execute and show the reports using struts.

   I have input jsp, action class and action form associated to that. In
the action class I will generate the sql based on the input from jsp
page/action form, create a result set. Now I need to pass the resultset
to the report generation code.

   Can I put the resultset object in the request object and pass the
resultset to the success page defined for the action?

   If this approach is not good/possible, please let me know with the
correct approach.

Thanks,
Thiru

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

How to pass information between action and jsp

2003-06-20 Thread thirumalai . veeraswamy
Hi,

   I need to create input pages for crystal reports 9 reports. What I am
planning to do is create Action, Form and JSP page for each input pages.
>From JSP the information will be passed to Form bean and Action will be
called. Here what I will do is collect the parameters, generate the SQL.


   Now I need to forward it to a common JSP/Action page where I will
collect the generated SQL and call crystal reports to generate the
report.

   How can I pass the SQL info to the common JSP/Action page without
using session? Here I assume if I use session then it could create
issues if the user generates more than one report at a time. Of course,
I can store the SQL for each report in different attribute and retrieve
it. But user can not view the same report simultaneously with different
parameters.

   Hope I explained things clearly.

Regards
Thiru

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

RE: How to use variant of Locale Class in Struts

2003-05-29 Thread thirumalai . veeraswamy
We can use the following method to use variant.

<%! Locale loc; %>
<%
Locale loc = new Locale("en", "US", "supp");
session.putValue("locale", loc);
%>
Message is 

Here I am giving the variant as my project id, and while retrieving I am
giving the session key of locale object.


-Original Message-
From: thirumalai.veeraswamy [mailto:[EMAIL PROTECTED]

Sent: Tuesday, May 27, 2003 7:52 PM
To: '[EMAIL PROTECTED]'
Subject: How to use variant of Locale Class in Struts
Importance: High

Hi,

   From the struts document and example code, I understood that we can
use internationalization by using properties file, html tag library and
bean tag library. But how can I configure to use variant parameter of
Locale class. 

   In other words, based on one more input other than language and
country code I would like to retrieve the strings from properties file. 

   For example, assume the properties file name is
appresouce.properties, then for the language and country code selection
it will behave like appresouce__.properties. Here I
would like to pass one more parameter (Variant of Locale class), so the
property file could become
appresouce___.properties.

   How can I pass the variant to struts to retrieve from the respective
properties file?


Regards, 
Thiru


This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

Can I have more than one properties file and retrieve from them based onthe context

2003-05-29 Thread thirumalai . veeraswamy
Hi,

   I am using struts  tag to retrieve messages from
properties file. I need to specify the properties file name in web.xml
for the action servlet. Can I have more than one properties file and
retrieve it from the properties file by specifying some identifier.

   For e.g., .

Regards,
Thiru

This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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