Love90 / kaptcha

Automatically exported from code.google.com/p/kaptcha
Other
0 stars 0 forks source link

kaptcha access between hosted and server mode... #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I have a kaptcha which i have defined in my web.xml as

<servlet-mapping>
   <servlet-name>Kaptcha</servlet-name>
   <url-pattern>/kaptcha.jpg</url-pattern>
</servlet-mapping>

In hosted mode where the module is inherited ( no explicit web.xml
definition ), code like

Image img = new Image("/kaptcha.jpg");

works fine. But when i deploy my app, the code will not work, but code
below works...

Image img = new Image("kaptcha.jpg");

I dont want to change code just for the app server build alone.  Can
anybody help why this would happen ? Something to do with how the url
pattern is formed in hosted mode...any ideas ?

What is the expected output? What do you see instead?

I dont see the kaptcha when trying to use the same url access from an Image
in hosted and server mode.

What version of the product are you using? On what operating system?

kaptcha 2.2
gwt 1.4
win xp pro

Please provide any additional information below.

Original issue reported on code.google.com by padysr...@gmail.com on 3 Dec 2008 at 2:04

GoogleCodeExporter commented 8 years ago
/ means pull the image from the absolute root.
No / means pull the image from the relative root.

The way you reference the image is important. If you have the / there, then the 
webapp servlet context path 
gets ignored. In hosted mode, there probably isn't a context path and that is 
why deployed version works. 

The way to make it work with both situations is to make / your servlet context 
path and put the references to 
kaptcha in that web.xml.

If you don't understand what I'm talking about, then you need to get a better 
understanding of how servlets 
and servlet containers work. Go read a book, the servlet api spec or some web 
pages. This is not an issue in 
kaptcha itself. =)

Original comment by latch...@gmail.com on 3 Dec 2008 at 4:19

GoogleCodeExporter commented 8 years ago

Since you answered so rudely...

I didnt say it was a kaptcha issue. You dont have a newsgroup to ask questions. 
I
have searched gwt groups. I know about servlet context path and I know the 
issue is
around that. The issue is in hosting mode - since gwt handles the url in hosted 
mode,
I was not sure how that worked. Because the context path cannot be got from a
remoteserviceservlet. And GWT.getModuleBaseURL etc doesnt give me much clues. I
assumed that you guys might have run into such issues. Not that my web.xml for
hosting and deploy mode are the same. Deploy uses a "/mywebapp" for context 
path but
in hosted mode gwt makes it ( i think since i cannot find out ) as 
"/com.mypackage.Main".

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/1b5bddfd0
e03f21/d3e2ff7cb27bd50f?lnk=gst&q=getContextPath#d3e2ff7cb27bd50f

"Go read a book" ??? 

Thanks

-- pady

Original comment by padysr...@gmail.com on 3 Dec 2008 at 6:53

GoogleCodeExporter commented 8 years ago

This is an issue. Here is the solution. It is a GWT issue btw...

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/f4a27199c
bb5bf5d/801f4755a24c8adc?lnk=gst&q=image+and+urls#801f4755a24c8adc

Thx

-- pady

Original comment by padysr...@gmail.com on 3 Dec 2008 at 7:00

GoogleCodeExporter commented 8 years ago
a) There is a google group and an email address where you could have asked 
questions. It is listed on the 
homepage. Should I also make you a screen shot so you can find it?

b) I already said (on the homepage that you didn't read) "If you have a valid 
issue with the functionality or 
design of kaptcha, please click the Issues tab and file one." Thanks for not 
following the directions and filing 
a QUESTION in the issue system. Rude? Come on. At least I put a smily face in 
my response and I created a 
fucking rad project for you to use for FREE only to have you abuse the issue 
tracking system. Feel free to click 
that Donate button and send me some love for even responding to you at all.

c) If you understand how context paths work, then why didn't you say that in 
your original report? Based on 
what you said, it really sounded like you have no clue. Since you sounded like 
you don't have a clue, you 
might have also missed (again on the homepage) the part where it says "this 
really is a product for people 
who know what they are doing."

d) No shit it is a gwt issue. That is what I already told you.

Original comment by latch...@gmail.com on 3 Dec 2008 at 7:59

GoogleCodeExporter commented 8 years ago

I apologize if you didnt mean anything by your original reply.

-- pady 

Original comment by padysr...@gmail.com on 3 Dec 2008 at 8:04

GoogleCodeExporter commented 8 years ago

I did post to gwt group yesterday with no responses.

-- pady

Original comment by padysr...@gmail.com on 3 Dec 2008 at 8:05

GoogleCodeExporter commented 8 years ago
Oh, so people ignoring your posts in the gwt group is an excuse to come here 
and waste my time? I should have 
just ignored you here as well. Cya.

Original comment by latch...@gmail.com on 3 Dec 2008 at 8:26