woonsan thats great, it is working..... thanks a lot

> Date: Mon, 13 Oct 2008 09:21:26 -0700> From: [EMAIL PROTECTED]> Subject: RE: 
> Image verification on the login portlet> To: 
> [email protected]> > Hi Pradeep,> > I think you should put the 
> context path like the following (if the context is /j2-admin and the jsp 
> works as intended):> > <img src="/j2-admin/Cap_Img.jsp">> > Regards,> > 
> Woonsan> > > --- On Mon, 10/13/08, pradeep reddy <[EMAIL PROTECTED]> wrote:> 
> > > From: pradeep reddy <[EMAIL PROTECTED]>> > Subject: RE: Image 
> verification on the login portlet> > To: "Jetspeed Users List" 
> <[email protected]>> > Date: Monday, October 13, 2008, 5:13 
> PM> > I am sorry here again.> > When i use a jsp name in the src attribute of 
> the image tag> > like <img src="Cap_Img.jsp">> > In the login.jsp which is in 
> the j2-admin application, it> > is not rendering any image at all in first 
> place.> > > > Can anybody help me out in this one?> > > > The code in the 
> Cap_Img.jsp is in the below mail.> > > > Regards,> > Pradeep.> > > > > > > > 
> > From: [EMAIL PROTECTED]> To:> > [email protected]> Subject: 
> Image> > verification on the login portlet> Date: Mon, 13 Oct 2008> > 
> 15:41:35 +0530> > Hello all,> > i am some where> > at the end of completing 
> the portal demo project with the> > help of the members. I need to use the 
> image verification on> > the portal login page. i am using the default login 
> but> > added the <img tag and a jsp to draw the image.My plan is> > to add a 
> my own login proxy servlet to validate the form.> > the image tag is as 
> bellow <td> <img> > src="Cap_Img.jsp"></td> the Cap_Img.jsp> > is in the same 
> location as login.jsp. The problem is, image> > is coming up properly, but 
> when login failures, then the> > image tag is not showing any image.is 
> something that changes> > when redirecting to the same page on login failures 
> that> > causes img tag not to find the jsp location?> please help> > me in 
> this regard.> Content of the Cap_Img.jsp is as> > below. <%@ page 
> import="java.io.*" %><%@> > page import="java.awt.*"%><%@ page> > 
> import="java.awt.image.*"%><%@ page> > import="javax.imageio.ImageIO"%><%@ 
> page> > import="java.util.*"%><%int width=75;int> > height=35;Random rdm=new 
> Random();int> > rl=rdm.nextInt();String hash1 => > 
> Integer.toHexString(rl);String capstr=hash1.substring(0,5);> > 
> session.setAttribute("key",capstr);Color> > background = new 
> Color(204,204,204);Color fbl = new> > Color(0,100,0);Font fnt=new> > 
> Font("SansSerif",1,17);BufferedImage cpimg =new> > 
> BufferedImage(width,height,BufferedImage.TYPE_INT_RGB);Graphics> > g => > 
> cpimg.createGraphics();g.setColor(background);g.fillRect(0,0,width,height);g.setColor(fbl);g.setFont(fnt);g.drawString(capstr,10,25);g.setColor(background);g.drawLine(10,17,80,17);g.drawLine(10,22,80,22);response.setContentType("image/jpeg");OutputStream>
>  > strm => > 
> response.getOutputStream();ImageIO.write(cpimg,"jpeg",strm);strm.close();%>> 
> > Thanks & Regards,Pradeep. >> > 
> _________________________________________________________________>> > Want to 
> explore the world? Visit MSN Travel for the best> > deals.> 
> http://in.msn.com/coxandkings> > 
> _________________________________________________________________> > 
> Searching for weekend getaways? Try Live.com> > 
> http://www.live.com/?scope=video&form=MICOAL> > > > > 
> ---------------------------------------------------------------------> To 
> unsubscribe, e-mail: [EMAIL PROTECTED]> For additional commands, e-mail: 
> [EMAIL PROTECTED]> 
_________________________________________________________________
Movies, sports & news! Get your daily entertainment fix, only on live.com
http://www.live.com/?scope=video&form=MICOAL

Reply via email to