• 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

retrieve value from JSP

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
suppose i m in a.jsp and i have given a href to b.jsp so when i click on that link it takes me to b.jsp now i have to pick a value and want to bring that value to a.jsp
so any 1 who can help??
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pass the value on the URL as a request parameter.
 
Ameya Bhagwat
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the problem is i have a.jsp through which i am passing my value to 1.jsp and saving them in database.

nw b.jsp is retrieving value from 2.jsp.



nw if i am at a.jsp nd if i clicked on selct went to b.jsp nd select a value come again to a.jsp and value get inserted in that input box of select how is poosible??
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ameya Bhagwat wrote:the problem is i have a.jsp through which i am passing my value to 1.jsp and saving them in database.

nw b.jsp is retrieving value from 2.jsp.



nw if i am at a.jsp nd if i clicked on selct went to b.jsp nd select a value come again to a.jsp and value get inserted in that input box of select how is poosible??


Sorry but I cannot understand what you are trying to say. Your post is full of abbreviations like nw, nd, selct, that make it impossible to read. Please UseRealWords and try posting again.
 
Ameya Bhagwat
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i make session objects but still it giving error






org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 34 in the jsp file: /support.jsp
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
31: <tbody>
32: <tr>
33: <td>
34: <label> <a href="sale_new.jsp" onclick="transfer(<%=session.setAttribute("name",request.getParameter("org_name"))%>)"> <%=rs.getString("org_name")%>" </a></label>
35: </td>
36: <td>
37: <%=rs.getString("industry")%>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps you would have better luck folioing proper practices and moving all database access code to a Java class rather than inappropriately trying to shove it into the JSP. Putting Java code in a JSP has been obsolete for 12 years for good reasons.

Please read these articles:
  • The Secret Life of JSPs
  • The Front Man

  •  
    Can you shoot lasers out of your eyes? Don't look at this tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic