----- Original Message -----
From: "Irene Huang" <[EMAIL PROTECTED]>
To: "Jetspeed user" <[EMAIL PROTECTED]>
Sent: Friday, February 01, 2002 4:39 PM
Subject: Q:Servlets and Database search in Jetspeed


> Dear all,
>
> If I have a JSP portlet, and I have a form:
>
>     <form  method=get
action="http://localhost:8080/examples/servlet/Dtest";>
>
> Q:
> after click submit, i will go to the servlet page.
> Is there a way i can display the result in the same page (without going to
> the servlet page)?
> Or what's the "exact link path" that I could add to the servlet page so
that
> user can click back to go to the starting page?
>

Im not sure if I understand the question, but I think you are trying to
always keep the servlet in the portlet window as you navigate thru the
servlet.

If so, you may need to somehow track the state of your session between your
portlet and the servlet it is 'hosting'.
One simple way is to write the state into a query param or directly into the
HTML(into an INPUT)
A more complex way would be to completely proxy the whole session....
Also, you will also need to rewrite your links (something like in the
WebPagePortlet, but you want to rewrite back to Jetspeed)

> Q:
> If I want to add a portlet for user to do database search, what is the
> best/easist way to do it? any advice?
>

You can use whatever you like to access the database in Java (JDBC comes to
mind...), callout to any methods.
Don't recommend putting db code in the portlet, abstract it out, layer your
data access.
Take a look at Torque http://jakarta.apache.org/turbine/torque/index.html

>
>
> Thank you for help!!
>
> Irene
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to