Try creating a new context with the blank struts application,which you said is working fine, and run the jsp there. Something seems to be missing or not properly configured ,I had a similar problem last year when I accidently mixed the config files of version 1.1 and 1.2

Deepesh Nandal.

----- Original Message ----- From: "Archana Soni" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Friday, September 23, 2005 9:56 AM
Subject: RE: Null Pointer exception when using struts html tag library injspfile


MC,

Actually, the jsp page is referring a page within my application. For
testing purpose, I tried with an absolute URL and I sent U that changed jsp.
Anyways, I noted that anything between the <html> tags is not affecting
b'coz even after removing the complete body and just leaving (<%@
taglib....) with an empty body, I am still getting the NullPOinterException. So I guess there is something wrong happening when jsp page is invoked thru
the struts framework and that too only when html taglibrary is used.

-Archana


-----Original Message-----
From: Murray Collingwood [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 22, 2005 6:11 PM
To: Struts Users Mailing List
Subject: RE: Null Pointer exception when using struts html tag library
in jsp file


Hi Archana

Try changing your html:link page to href.  ie From:

  <html:link page="http://yahoo.com";>Yahoo </html:link>

to

  <html:link href="http://yahoo.com";>Yahoo </html:link>


From what I gather the 'page'  parameters refers to a page within your
application.  You
should use the 'href' parameter to refer to a URI.

I've never found any good documentation on the use of various taglib
parameters,
maybe somebody else on this list could point us in the right direction.

PS If you leave the taglib statement in and take out the html:link commands
do you still
get the NullPointer error?

Also, because these URIs are external to the application there is nothing to
stop you
using a simple html anchor <a href=...>link</a>. The use of the html taglib
is only
really necessary when referring to elements within your application.

Kind regards
mc



On 22 Sep 2005 at 10:14, Archana Soni wrote:

This is my Welcome.jsp file content



<%@ taglib uri="/tags/struts-html" prefix="html" %>

<html:html locale="true">

<table align="center" cellspacing="2"cellpadding="5" border="0" >
<tr><th> Welcome </th></tr>
</table>

<table align="center" cellspacing="2"cellpadding="5" border="0"
bgcolor="#cbe3ed">
<tr>
<td><b><font face="verdana" size="2">
<html:link page="http://yahoo.com";>Yahoo </html:link>
</font></b></td>

<td><b><font face="verdana" size="2">
<html:link page="http://rediff.com";>Rediff</html:link>
</font></b></td>
</tr>
</table>

</html:html>


The application is working fine with just omitting the first line of the
jsp
( <%@ taglib ...). But as soon as I add it, it gives the
NullPointerexception

-----Original Message-----
From: Murray Collingwood [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 21, 2005 5:14 PM
To: Struts Users Mailing List
Subject: RE: Null Pointer exception when using struts html tag library
in jsp file


Can you post your jsp form?

On 21 Sep 2005 at 17:12, Archana Soni wrote:

> Global-forwards are not necessary to be defined. It will work even
without
> it. And the URL pattern can be anything (even other than *.do).
Important
is
> that it should be mapped with some servlet name.
>
> So I guess changing these will not have any impact. Still I did the
> correction you suggested. And I am still getting same error.
>
>
> -----Original Message-----
> From: Murray Collingwood [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 21, 2005 4:21 PM
> To: Struts Users Mailing List
> Subject: RE: Null Pointer exception when using struts html tag library
> in jsp file
>
>
> struts-config.xml
> Global-forwards are the application entry points.  You don't have any
> defined.  Mine
> look like this:
>   <global-forwards>
>     <forward name="Home" path="/Home.do" />
>     <forward name="Setup" path="/Setup.do" />
>   </global-forwards>
>
> web.xml
> Your servlet mapping is weird, normally you would specify something
like:
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>*.do</url-pattern>
>   </servlet-mapping>
>
> Maybe, I'm still thinking in Struts 1.2.7 (having not used 1.1).
>
> Have you looked at some example 1.1 applications?  I started with one
from
> JohnTopley, it's a good starting point for getting something running > and
> then you can
> grow from there.  Try this:
> http://www.sitepoint.com/article/struts-first-steps
>
> Kind regards
> mc
>
>
>
> On 21 Sep 2005 at 15:06, Archana Soni wrote:
>
> > I am attaching my web.xml and struts-config.xml files
> >
> >
> >
> > -----Original Message-----
> > From: Murugesan, Kathiresan (Cognizant)
> > [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 21, 2005 12:37 PM
> > To: Struts Users Mailing List
> > Subject: RE: Null Pointer exception when using struts html tag > > library
> > in jsp file
> >
> >
> > This e-mail and any files transmitted with it are for the sole use of
the
> > intended recipient(s) and may contain confidential and privileged
> > information.
> > If you are not the intended recipient, please contact the sender by
reply
> > e-mail and destroy all copies of the original message.
> > Any unauthorised review, use, disclosure, dissemination, forwarding,
> > printing or copying of this email or any action taken in reliance on
this
> > e-mail is strictly
> > prohibited and may be unlawful.
> >
> >   Visit us at http://www.cognizant.com
> >
>
>
>
> FOCUS Computing
> Mob: 0415 24 26 24
> [EMAIL PROTECTED]
> http://www.focus-computing.com.au
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.3/107 - Release Date:
20/09/2005
>
>
> ---------------------------------------------------------------------
> 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]
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.3/107 - Release Date:
20/09/2005
>



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.3/107 - Release Date: 20/09/2005


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



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 21/09/2005




FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 21/09/2005


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



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.5/110 - Release Date: 9/22/2005




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

Reply via email to