You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Phase Communcations <ma...@phase.ws> on 2001/12/06 23:59:21 UTC

Alternate Query String( no "?" or "&")

Has anyone succefully swapped out the "?" and the "&" in a querystring with
another symbol , such as "/". A problem with various search engine spiders
(not all, but, several) is that they will not move past a ?. It would be
advantagous to allow for the use of a more compatible querystring (a way
around) especially when we  are talking about shopping carts and sites with
dynamic content that is accessed through links and not forms. I have seen
this done with other sites using php :( and it is very effective on the
search engines. I am endeavoring myself to figure a way around the "?" and
"&", using Struts (of course). Yet, if someone has attempted this succefully
I sure would appreciate some wisdom or code (code would be better, I think).
Otherwise, I will embark on my crusade alone.

Thanks ahead of time,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Alternate Query String( no "?" or "&")

Posted by "Edward Q. Bridges" <eb...@argotec.de>.
although i wasn't using struts, i've gotten this to work with no such effort
at all (using servlets and jetty, not to mention perl/cgi etc.).  basically,
i defined a path for a servlet in web.xml, and anything after that path, the
server placed in pathinfo.  i can provide examples if anyone would like.

whether a URI points to a physical location is not important, it is a
resource (hence the name URI).  one that is configured by the server and that
it knows about.  as soon as the server finds a resource that it knows about
when walking the path it should process that and return the rest as PathInfo.
 whether the actual resource is a file, a directory, a cgi script, or a
servlet is irrelevant.

fact is, that is the way the world did it before and after query strings --
heck, query strings have been around as long as pathinfo.

one should be able to use path info as the original poster is seeking (which
is just one of many ways that pathinfo can be incredibly useful).  can
someone explain how that info is getting lost when getting relayed via
ActionServlet?

thanks!
--e--




On Thu, 06 Dec 2001 20:23:57 -0500, Ted Husted wrote:

>As I understand it, this works because a Web server actually tries each
>part of the path component, to see if it is a file. So, given 
>
>/dir/dir/file/parm/parm
>
>it chants
>
>is /dir a file? (no, it's a folder)
>
>is /dir/dir a file? (no it's a folder)
>
>is /dir/dir/file a file? (why, yes, it is)
>
>and then passes /dir/dir/file along with whatever comes after. 
>
>Anything between /dir/dir/file and the first ? is "Extra Information". 
>
>This what the world did before we invented query strings. 
>
>Problem is, an Action URI is not a physical location. It's a logical
>construct. So there isn't a way for the servlet or the container to know
>where the Action path ends and the extra information begins. 
>
>The way to fix this might be to change the mappings class so it first
>looks for 
>
>/dir/dir/file/parm/parm
>
>and then not finding that, looks for 
>
>/dir/dir/file/parm
>
>and then
>
>/dir/dir/file
>
>We would then also have to add an ExtraInfo property for the mapping to
>put the /parm/parm into, or otherwise trick the request into doing it.
>
>I'd like to see this happen myself, but, well, you know ...
>
>-- Ted Husted, Husted dot Com, Fairport NY USA.
>-- Custom Software ~ Technical Services.
>-- Tel +1 716 737-3463
>-- http://www.husted.com/struts/
>
>
>
>Phase Communcations wrote:
>> 
>> Has anyone succefully swapped out the "?" and the "&" in a querystring with
>> another symbol , such as "/". A problem with various search engine spiders
>> (not all, but, several) is that they will not move past a ?. It would be
>> advantagous to allow for the use of a more compatible querystring (a way
>> around) especially when we  are talking about shopping carts and sites with
>> dynamic content that is accessed through links and not forms. I have seen
>> this done with other sites using php :( and it is very effective on the
>> search engines. I am endeavoring myself to figure a way around the "?" and
>> "&", using Struts (of course). Yet, if someone has attempted this succefully
>> I sure would appreciate some wisdom or code (code would be better, I think).
>> Otherwise, I will embark on my crusade alone.
>> 
>> Thanks ahead of time,
>> Brandon Goodin
>> Phase Web and Multimedia
>> P (406) 862-2245
>> F (406) 862-0354
>> mail@phase.ws
>> http://www.phase.ws
>> 
>> --
>> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>

--------------------------------------------
<argo_tec gmbh>
     ed.q.bridges
     tel. 089-368179.552
     fax 089-368179.79
     osterwaldstraße 10 
     (haus F eingang 21)
     80805 münchen
</argo_tec gmbh>
--------------------------------------------  



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Servlet : Security

Posted by Krishnamoorthy <ck...@india.hp.com>.
Yes its possible to do it.

Shri wrote:

> Hi Struts folks,
>
> I know this is not the proper forum to ask this question, but I am tempted
> ask, as in my experience, I have not found a more active and helpful mailing
> list than Struts mailing list.
>
> I am trying to use Form based authentication according to servlet
> specifications on IBM WebSphere 4. Specification requires that there be two
> text fields : "j_username" and "j_password". Is it possible that I add one
> more text field to the form and put its value in the session upon submission
> of the form??
>
> Thanks.
>
> Shri
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--    H  P    --
-  i  n  v  e  n  t  -
https://ecardfile.com/id/kicha



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Servlet : Security

Posted by Shri <sd...@gresham-computing.com.au>.
Hi Struts folks,

I know this is not the proper forum to ask this question, but I am tempted
ask, as in my experience, I have not found a more active and helpful mailing
list than Struts mailing list.

I am trying to use Form based authentication according to servlet
specifications on IBM WebSphere 4. Specification requires that there be two
text fields : "j_username" and "j_password". Is it possible that I add one
more text field to the form and put its value in the session upon submission
of the form??

Thanks.

Shri


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Alternate Query String( no "?" or "&")

Posted by Ted Husted <hu...@apache.org>.
As I understand it, this works because a Web server actually tries each
part of the path component, to see if it is a file. So, given 

/dir/dir/file/parm/parm

it chants

is /dir a file? (no, it's a folder)

is /dir/dir a file? (no it's a folder)

is /dir/dir/file a file? (why, yes, it is)

and then passes /dir/dir/file along with whatever comes after. 

Anything between /dir/dir/file and the first ? is "Extra Information". 

This what the world did before we invented query strings. 

Problem is, an Action URI is not a physical location. It's a logical
construct. So there isn't a way for the servlet or the container to know
where the Action path ends and the extra information begins. 

The way to fix this might be to change the mappings class so it first
looks for 

/dir/dir/file/parm/parm

and then not finding that, looks for 

/dir/dir/file/parm

and then

/dir/dir/file

We would then also have to add an ExtraInfo property for the mapping to
put the /parm/parm into, or otherwise trick the request into doing it.

I'd like to see this happen myself, but, well, you know ...

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/



Phase Communcations wrote:
> 
> Has anyone succefully swapped out the "?" and the "&" in a querystring with
> another symbol , such as "/". A problem with various search engine spiders
> (not all, but, several) is that they will not move past a ?. It would be
> advantagous to allow for the use of a more compatible querystring (a way
> around) especially when we  are talking about shopping carts and sites with
> dynamic content that is accessed through links and not forms. I have seen
> this done with other sites using php :( and it is very effective on the
> search engines. I am endeavoring myself to figure a way around the "?" and
> "&", using Struts (of course). Yet, if someone has attempted this succefully
> I sure would appreciate some wisdom or code (code would be better, I think).
> Otherwise, I will embark on my crusade alone.
> 
> Thanks ahead of time,
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Alternate Query String( no "?" or "&")

Posted by David Winterfeldt <dw...@yahoo.com>.
If you can use a servlet engine that supports v2.3
(tomcat 4.0), you could use a Filter to parse out the
url that was entered and extract any parameters that
you encoded differently.  Then you could forward the
request to the actual page or servlet it should go to.

David

--- Phase Communcations <ma...@phase.ws> wrote:
> Has anyone succefully swapped out the "?" and the
> "&" in a querystring with
> another symbol , such as "/". A problem with various
> search engine spiders
> (not all, but, several) is that they will not move
> past a ?. It would be
> advantagous to allow for the use of a more
> compatible querystring (a way
> around) especially when we  are talking about
> shopping carts and sites with
> dynamic content that is accessed through links and
> not forms. I have seen
> this done with other sites using php :( and it is
> very effective on the
> search engines. I am endeavoring myself to figure a
> way around the "?" and
> "&", using Struts (of course). Yet, if someone has
> attempted this succefully
> I sure would appreciate some wisdom or code (code
> would be better, I think).
> Otherwise, I will embark on my crusade alone.
> 
> Thanks ahead of time,
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>