• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlets-HTML

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Is there is anyway to pass a parameters/data to HTML page. I am using response.sendRedirect() in my servlet pgm and wanted to pass the data to my redirect HTML page.
Thanks a Lot
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could add "?paramName=value" to the end of your request, and than get this value using javascript.
or you can use JSP instead of HTML and pass parameters using request or session
or use something else...
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joe;
You could use a simple HTML utility package for this provided by some vendor(esp if you want show the results(result set) of the servlet fetched from the database in a HTML page).Let me know if you are interested.
Ashwin
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody,
I am facing a problem similar to Joes , and the problem is....
.I need to call an html page from a servlet which is in shared drive in a LAN. I have tried response.sendRedirect and url openConnection .But both seems not to be working.Please let me know a possible alternative.
If any body can give details of the similar discussions earlier..
thanks
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
I would use JSP but I am fortunate in having a servlet container. I think Yuriy is right you can do it in javascript too. But javascript is not my strong suit.
Wait you said you have servlets, so just use JSP. It is just an html page with java code inside tags.
I have a JSP page that is just an html page with this one extra line:
<p>Are you sure thats all you want <%= request.getParameter("name") %>?
It is called by a servlet generated page:
"<input type='button' value ='Go To Checkout' onClick=\"parent.location='http://javaguy.yi.org/examples/LastChance.jsp?name=" + name + "'\">
[This message has been edited by Randall Twede (edited February 13, 2001).]
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"cibi",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements.
Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic