url 1 « URL « JSP-Servlet Q&A





1. Mask urls in JSP    stackoverflow.com

Related to this question: URL characters replacement in JSP with UrlRewrite I want to have masked URLs in this JSP Java EE web project. For example if I had this:

http://mysite.com/products.jsp?id=42&name=Programming_Book
I would like ...

2. How to create a URL in a servlet?    stackoverflow.com

i want to know how to generate a url in a servlet. I have a login servlet, and every time that add a user i want to gen. a url for ...

3. How can I pass a variable to a JSP class using the URL?    stackoverflow.com

I'm trying to modify someone's written JavaScript code to pass a URL variable (called manufacturer) into a Java class. The interesting thing is the file is an HTML file with ...

4. How do I get URLs of other servlets from within a servlet    stackoverflow.com

I have two servlets (S1 and S2). S1 renders a HTML-Page which acces S2 via an URL (img src="URL"). I know the servlet name of S2, but not the URL. The ...

5. Java URL - Passing Arguments - Servlets    stackoverflow.com

Currently using the HTTPServletRequest class and specifically the .getQueryString method to retrieve an inputted URL. The URL it will parse is say server/package/servlet?args1/args2/arg3.. I'd like to remove the question mark (?) from ...

6. Root URl of the servlet    stackoverflow.com

I want to get the root url of my web application from one of the servlet. If I deploy my application in "www.mydomain.com" I want to get the root url like "http://www.mydomain.com". Same ...

7. How can I put an active URL in a textbox?    stackoverflow.com

Using JSP, how can I put an active URL in a textbox?

8. Portlet URL Generation From AJAX Servlet    stackoverflow.com

I am trying to modify a portlet to load data for a table over AJAX because the WS calls take a ridiculous amount of time to complete. The table is ...

9. Converting GET method url's to logical permanent links    stackoverflow.com

I have a J2EE application with a web service which goes like

http://servername/service?task=getFile&id=25
How can I convert these type of urls to
http://servername/service/getFile/25
http://servername/service/getFile/26
etc? Please provide your suggestions.





10. How to call javascript function when url variable is sent    stackoverflow.com

heres basically what I need to get done. I have a jsp page which allows me to add/modify/delete an item. The items are stored in a database which I have controller classes to ...

11. How do I alter the URL?    stackoverflow.com

I'm currently working on a big web application for a company and we are about 4 months in, but we have a harmless(but annoying) problem that we have just left because ...

12. How to catch non exist requested URL in Java servlet?    stackoverflow.com

My objects are stored online in two different places : <1> On my nmjava.com site, where I can put them in a directory called "Dir_My_App/Dir_ABC/" <2> On Google App Engine datastore When my Java ...

13. How do you access URL text following the # sign through Java?    stackoverflow.com

Using Java (.jsp or whatever) is there a way where I can send a request for this page: http://www.mystore.com/store/shelf.jsp?category=mens#page=2 and have the Java code parse the URL and see the #page=2 ...

14. How can I find out a servlet's URL?    stackoverflow.com

Let's say I have this in my web.xml:


<servlet>
    <description></description>
    <display-name>MainServ</display-name>
    <servlet-name>MainServ</servlet-name>
    <servlet-class>MainServ</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>MainServ</servlet-name>
    ...

15. DisplayTag Sort and Pagination links(url) generated is too long    stackoverflow.com

When using displaytag the URL it's generating for paging and sorting is too long for IE. Is there a way around this without resorting to external paging and sorting? Cheers.

16. How to identify the URL of an Java web application from within?    stackoverflow.com

My Java web application contains a startup servlet. Its init() method is invoked, when the web application server (Tomcat) is started. Within this method I need the URL of my web ...





17. JSP deny direct access to URL by non-logged in user    stackoverflow.com

I have a login and a user info page which is displayed after login. How can I block user info page from direct access by user? How can I implement that ...

18. Clean URLs using jsp/ servlets?    stackoverflow.com

I am planning to make a CMS using jsp and servlets. Could anyone tell me how to implement clean urls using this technologies?

19. JSP url argument passing    stackoverflow.com

Is there any way to pass params to the function in this way:
      www.smth.com/func.jsp/1/2/3
but not like this:
      www.smth.com/func.jsp?a=1&b=2&c3
Using PHP i just define the method
      function ...

20. How to constrcuct servlet URL    stackoverflow.com

Right now I have a servlet URL as below in one of my stored procedure , which is a working one. URL:'http://server600.ctm.com/batch/shyamServletClass?parameter=' || Incoming; The above points to the servlet calss EAR which ...

21. JSP defining values    stackoverflow.com

I have two values in JSP. For 1 I defined a=http:// and for 2nd I defined b=google.com Currently I am using concat_urls= "<%=a%><%=b%>" . Can I join them as concat_urls= "<%=ab%>" ...

22. How to get the base url in jsp?    stackoverflow.com

Im creating a simple project by using jsp and servlet. I want to link the css in my jsp file. So any one can tell me the way to do this?? ...

23. Url matching in java web application    stackoverflow.com

In the context of url matching in java web applications, what is the difference between * / and *.* Which of these patterns includes the others? Shouldn't * pattern accept / and ...

24. Servlet : After servlet Dispatch servlet action name in url    stackoverflow.com

I created a simple login page. If the user entered right username and password the page ill be redirected to the success page otherwise it will be redirected to the index ...

25. URL rooting Java Servlets    stackoverflow.com

The incoming request URL looks like: /{root}/Details/View/{id}. I have a servlet DetailsController which based on if a person is logged in or not will show either the "Edit" view or the ...

26. Equivalent of for Velocity    stackoverflow.com

Is there an equivalent of the <c:url/> tag (of jsp core taglib fame) for Apache Velocity? I'd like to create urls when I don't always know the path/context root (a la ...

27. EController 8.4 url with eHit option    stackoverflow.com

I' am administrator to the Content Manager 8.4 in my company.I using Econtroller urls to display the CM items directly with eHit option ,for example http://myserver:9081/eclient/EController?&eUserID=ViewUser&ePassword=1&eAction=search&eEntity=ItemTypeName&AttributeName=000000000003&eHit=1 I ...

28. How do I get the URL of a .jsp (portlet)?    stackoverflow.com

I have a view.jsp and I want to load another .jsp via AJAX and need the URL of this .jsp. How do I get it?

29. Creating fake URL in Java    stackoverflow.com

I am working on an ERP project. We have a URL like this: domain.com/home-appns keeping this URL for the request I want to display another URL in address bar like: domain.com\home\home-appns. I an looking ...

30. In a JSP, how do I make a static content URL dynamic based on whether I'm in development or production?    stackoverflow.com

In a JSP-based web application, let's say I'm hosting my static content on a CDN, but during development I want serve that content from my web application -- just to make ...

31. How to get URL of a running app inside ServletContextListener?    stackoverflow.com

I'm inside ServletContextListener, and need to get a URL of the application in full format, including protocol, server, port, and path. How can I do this?

32. JSP FileReader URL Issue    stackoverflow.com

I get the strangest thing going on... I have a JSP file which read a file from given path, but somehow the http:// is changed to http:\

BufferedReader in = new BufferedReader(new FileReader("http://server/path/file.sql"));
the ...

33. Can I have custom servlet URL in java?    stackoverflow.com

I want that when user hit following url:

http://host:8080/AppName/ServletName/Param1/Param2
It should go in Servlet named ServletName and Param1 and Param2 becomes request parameters. I have seen this kind of urls in ruby projects. ...

34. How to get the url from a frame?    stackoverflow.com

I have this jsp page that includes the following frames:

<frameset cols="20%,*">
    <frame src=�SideBar.jsp� name="frameA">
    <frame src=�http://www.w3schools.com/� name="frameB" target="_self">
</frameset>
In frameB,it's an external link, the user can ...

35. How do I get the source of a given URL from a servlet?    stackoverflow.com

I want to read a source code(html tags) of a given url from my servlet. For example, url is www.google.com and my servlet needs to read the html source code. Why ...

36. Not able to run .jsp url from Flexbuider 3?    stackoverflow.com

Following is a .mxml code that should run behind URL http://localhost:8084/HelloWorld/index.jsp:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
            xmlns:maps="com.google.maps.*"
   ...

37. how to add two variables to URL in JSP?    stackoverflow.com

I want to add two variables to URL in JSP

<a href="buyOrSell.do?symbol=<%=trade.getSymbol()%>&mktPrice="<%=trade.getCurrentMktPrice()%>>Buy</a>
ex - http://loclhost:8080/myProj/buyOrSell.do?symbol=anySymbol&mktPrice=price but I am not able to get second variable.

38. Unit testing a servlet that makes an URL call    stackoverflow.com

I want to write a unit test for a servlet class that makes a call to a web service through java.net.URL. I can create mock request and response objects to send to ...

39. get the url in jsp    coderanch.com

40. How do I get my current URL???    coderanch.com

41. Get a URL from a Webpage    coderanch.com

request.getRequestURI() should give you everything after the / following the server name in the url. You can get the protocol, server name and other info from other request methods. I'd suggest writing a small JSP that shows the results of various request methods to pick which one (or combination) gives you what you want. hth, bear

42. Get Full URL from Header?    coderanch.com

43. URL display    coderanch.com

44. URL arguments    coderanch.com

I am trying to pass a URL as argument to another jsp page, unfortunately the URL (argument) also contains an argument and I cannot get the value of the URL. eg: test.jsp?url=microsoft.com/default.asp?x=5 I want the value of url to be "microsoft.com/default.asp?x=5" but when I do a request.getparameter("url"), I am getting null for the url. Thanks in advance. Joshi

45. Replace URL    coderanch.com

46. How to trap the URL    coderanch.com

Hello, I am working in JSP. In an application, I am having Frameset with two rows. On the top frame, I am having HTML page and in the bottom frame I am displaying JSP page. Now in this JSP page, i want to trap the URL which is being shown in the addressbar. If I use request.getRequestURL(), I get the path ...

47. spaces in url    coderanch.com

48. GET limitation of url lenght ?    coderanch.com

49. Checking for url existence    coderanch.com

If you'd rather not set up for using JSTL just to get this working, I think your problem is that after openConnection() you need to call connect() to actually establish contact and read headers. Check out the Javadoc on UrlConnection. Another thought: if the image is on the same server on which your code is running, it might be a tad ...

50. Simple Web App, Referring URL    coderanch.com

51. Incorrect escaping by c:url    coderanch.com

53. URL to servlet?    coderanch.com

54. URL address    coderanch.com

55. url data into variable    coderanch.com

56. show different URL than my server..    coderanch.com

57. URL problem    coderanch.com

hi, if i want to call a file which located into my web root folder, how to i call it from coding? let say my web root folder on c:\myweb , and i want to call/invoke a file(callme.jsp) which reside in c:\myweb\callme.jsp , should it be "../callme.jsp" ? but tomcat generate error like "not start symbol "/"" thank you ! [ ...

58. How do I get the whole URL?    coderanch.com

59. can I get brower's previous url?    coderanch.com

60. Chinese name in URL    coderanch.com

62. how to get first part of URL ?    coderanch.com

63. URL... but not specific    coderanch.com

i have one doubt by seeing this thread why we need to specify more than one welcome file in welcome-file-list tag?? if reason for that is, suppose first welcome file is not available then second one is called. how the deployer deploy the application without knowing whether file is exists or not?? Suppose if 3 files are specfied in welcome-file-list and ...

64. generate URL, difference    coderanch.com

65. URL for JSPSmartUpload.jar    coderanch.com

66. what is the lenght of the URL in internet explorer    coderanch.com

The spec for URL length does not dictate a minimum or maximum URL length, but implementation varies by browser. On Windows: Opera supports ~4050 characters, IE 4.0+ supports exactly 2083 characters, Netscape 3 -> 4.78 support up to 8192 characters before causing errors on shut-down, and Netscape 6 supports ~2000 before causing errors on start-up.

67. go to a web url using java code    coderanch.com

68. core:url has generates extra slashes    coderanch.com

thanks pradheesh, Yes, the server was running at the time. Actually what i do is supply this url to an XmlHttpRequest.open call. i get a "permission denied" error (JavaScript side). When i hardcoded the single leading "/" url, it progressed past the XHR.open call. I suppose I could easily just put the url together myself but I'm curious as to why ...

69. c url doubt    coderanch.com

70. Replacement of c:url    coderanch.com

71. port number in url    coderanch.com

73. url    coderanch.com

74. Consume XML in JSP from a URL    coderanch.com

The best way to approach the problem is to develop a freestanding Java class that opens the URL and reads the stream into an XML parser. Once you are able to parse the XML add methods to extract whatever you need from it. Note that none of the above involves JSP because code inside a JSP just complicates things. Get it ...

75. Giving Standard URL to JSP Application    coderanch.com

76. url related    coderanch.com

77. URL configuring for a web application    coderanch.com

78. url rules    coderanch.com

hi Can some one tell me how to set url path starting from home directory. I have home/html and home/WEB-INF/jsp but I have to give the url with reference to the last page that was called. But I want all url in my pages to start from home. I tried searching it on net, and some body told me to set ...

79. How to get Requesting URL    coderanch.com

81. dispaly values in url    coderanch.com

83. Why should the URL have /servlet/    coderanch.com

84. Add url to searchengine using servlets    coderanch.com

85. JSP and URLS !!!!    coderanch.com

86. url direction in jsp!    coderanch.com

my problem: if i find some parameters using getParameter("") then i should redirect to a particular url and a particular target frame , how can i do this thro jsp!!! any sample snippet will be helpul. scenario: i A.jsp(2 frames) im using the request.getParameters() and if they satisfy my requirement then the result should be a Show.jsp which should be displayed ...

87. Generalizing servlet URL    coderanch.com

88. URL writing in JSP    coderanch.com

Hi Guys, I'm facing fifficulty in URL writing. What should I write at the end of the string to say it is continuing. Because in the following string it works fine if I give it as it is but if I do the one below it it says string not properly concluded. Can somebody write me URL writing concepts. out.println("

89. URL Writing in JSP    coderanch.com

neha, why don't you post your code which you think throws the exception. meanwhile try this - Search this way you will get an empty string as the value instead of null when you do req.getParameter("abc") ofcourse, i don't know what SCREENTO is. [This message has been edited by shilpa kulkarni (edited October 05, 2001).]

90. servlet URL    coderanch.com

91. Servlet URL repeating    coderanch.com

94. jsp > servlet > jsp......URLs???    coderanch.com

95. servlet URL question    coderanch.com

96. URGENT--Url encription using servlets    coderanch.com

97. getting url from where servlet called    coderanch.com

getRequestUrl() will not yeild that info; it will return the URL of the current request. What you need to check out is the request header for "Referer". And, "Subtle Solo", We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please ...

98. straing servlet URL    coderanch.com

99. URL not getting through to servlet    coderanch.com

100. Custom WebApp servlet url problem    coderanch.com

Hi all , I am new to this so if this is a stupid question don't hate me too much. Btw I am using Tomcat 5.5.9. I created a custom WebApp by copying and renaming the ROOT dir in Tomcats WebApps dir. I can hit pages and servlets by usig the url host/myWebApp/my.html and host/myWebApp/servlet.package.myservlet fine. My problem is when I ...